tests: more Ansible fixes.

issue510
David Wilson 6 years ago
parent acf0b04876
commit 8972dbb7b9

@ -63,5 +63,6 @@ with ci_lib.Fold('job_setup'):
with ci_lib.Fold('ansible'):
run('/usr/bin/time ./run_ansible_playbook.py all.yml -i "%s" %s',
HOSTS_DIR, ' '.join(sys.argv[1:]))
playbook = os.environ.get('PLAYBOOK', 'all.yml')
run('/usr/bin/time ./run_ansible_playbook.py %s -i "%s" %s',
playbook, HOSTS_DIR, ' '.join(sys.argv[1:]))

@ -2,7 +2,7 @@
# state of dependent contexts (e.g. sudo, connection delegation, ..).
- name: integration/context_service/disconnect_cleanup.yml
hosts: test-targets
hosts: test-targets[0]
any_errors_fatal: true
tasks:
- meta: end_play

@ -2,7 +2,7 @@
# issue #294: ensure running mixed vanilla/Mitogen succeeds.
- name: integration/strategy/_mixed_vanilla_mitogen.yml (linear)
hosts: test-targets
hosts: test-targets[0]
any_errors_fatal: true
strategy: linear
tasks:
@ -16,7 +16,7 @@
that: strategy == 'ansible.plugins.strategy.linear.StrategyModule'
- name: integration/strategy/_mixed_vanilla_mitogen.yml (mitogen_linear)
hosts: test-targets
hosts: test-targets[0]
any_errors_fatal: true
strategy: mitogen_linear
tasks:
@ -31,7 +31,7 @@
- name: integration/strategy/_mixed_vanilla_mitogen.yml (linear)
hosts: test-targets
hosts: test-targets[0]
any_errors_fatal: true
strategy: linear
tasks:

@ -1,12 +1,13 @@
- name: integration/strategy/mixed_vanilla_mitogen.yml (linear->mitogen->linear)
hosts: test-targets
hosts: test-targets[0]
any_errors_fatal: true
tasks:
- connection: local
command: |
ansible-playbook
-i "{{inventory_file}}"
-vvv
integration/strategy/_mixed_mitogen_vanilla.yml
args:
chdir: ../..
@ -16,6 +17,7 @@
command: |
ansible-playbook
-i "{{inventory_file}}"
-vvv
integration/strategy/_mixed_vanilla_mitogen.yml
args:
chdir: ../..

@ -12,6 +12,11 @@ GIT_BASEDIR = os.path.dirname(
)
)
# Ensure VIRTUAL_ENV is exported.
os.environ.setdefault(
'VIRTUAL_ENV',
os.path.dirname(os.path.dirname(sys.executable))
)
# Used by delegate_to.yml to ensure "sudo -E" preserves environment.
os.environ['I_WAS_PRESERVED'] = '1'

Loading…
Cancel
Save