Skip to content
Permalink
Browse files

Introduce a "run ID" to tag files which are created in shared directo…

…ries.
  • Loading branch information...
riccardomurri committed Mar 11, 2019
1 parent 95a7b4d commit d80ac75f8a283b1d82ced10a7185544482dfb329
Showing with 11 additions and 0 deletions.
  1. +11 −0 elasticluster/providers/ansible_provider.py
@@ -22,8 +22,10 @@

# stdlib imports
from collections import defaultdict
from datetime import datetime
import logging
import os
import platform
import tempfile
import shlex
import shutil
@@ -199,6 +201,15 @@ def resume_cluster(self, cluster, extra_args=tuple()):
return self.setup_cluster(cluster, extra_args)

def _run_playbook(self, cluster, playbook, extra_args):
run_id = (
'elasticluster.{name}.{date}.{pid}@{host}'
.format(
name=cluster.name,
date=datetime.now().isoformat(),
pid=os.getpid(),
host=platform.node(),
)
)
inventory_path = self._build_inventory(cluster)
if inventory_path is None:
# no inventory file has been created: this can only happen

0 comments on commit d80ac75

Please sign in to comment.
You can’t perform that action at this time.