Skip to content

Commit

Permalink
Flake this!
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Jun 23, 2017
1 parent 59621cc commit b5eee72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion actions/ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, *args, **kwargs):

def handle_json_arg(self):
if next((True for arg in self.args if arg.startswith('--tree')), False):
msg = "--json uses --tree internally, so setting both --tree and --json is not supported."
msg = "--json uses --tree internally. Setting both --tree and --json is not supported."
raise ParamaterConflict(msg)
execution_id = os.environ.get('ST2_ACTION_EXECUTION_ID', 'EXECUTION_ID_NA')
self.tree_dir = tempfile.mkdtemp(prefix='{}.'.format(execution_id))
Expand Down
10 changes: 6 additions & 4 deletions actions/ansible_playbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def __init__(self, *args, **kwargs):
def handle_json_arg(self):
os.environ['ANSIBLE_CALLBAKC_PLUGIN'] = 'json'
self.stdout = subprocess.PIPE
# TODO: --json is probably not be compatible with syntax-check, verbose, and possibly other options.
# TODO: --json is probably not be compatible with other options
# like syntax-check, verbose, and possibly others

def popen_call(self, p):
"""
Expand All @@ -60,7 +61,7 @@ def popen_call(self, p):
# lines that should go to stderr instead of stdout
stderr_lines = re.compile(
r'('

# these were identified in this closed PR:
# https://github.com/ansible/ansible/pull/17448/files
# see https://github.com/ansible/ansible/issues/17122
Expand All @@ -69,13 +70,14 @@ def popen_call(self, p):
r"^skipping playbook include '.*' due to conditional test failure$"
r'|'
r"^statically included: .*$"

# other possibilities:
# r'|'
# r'^to see the full traceback, use -vvv$'
# r'|'
# r"^The full traceback was:$"

# but then I would somehow have to include the traceback as well...

r')'
)

Expand Down
2 changes: 1 addition & 1 deletion actions/lib/ansible_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _json_output_arg(self):
self.json_output = True
self.handle_json_arg()
# if ansible-playbook, add env arg
del self.args[i] # The json arg is a ST2 specific addition, and should not be passed on.
del self.args[i] # The json arg is a ST2 specific addition & should not pass on.
break
elif '--one_line' in arg:
self.one_line = True
Expand Down

0 comments on commit b5eee72

Please sign in to comment.