ansible_mitogen: Fix --ask-become-pass, add test coverage
Previously f1503874de
fixed the priority of
ansible_become_pass over ansible_become_password, but broke --ask-become-pass.
Fixes #952.
pull/1007/head
parent
c4cf0d5ba2
commit
d5e9186289
@ -0,0 +1,9 @@
|
|||||||
|
- name: regression/become_test.yml
|
||||||
|
hosts: test-targets:&linux_containers
|
||||||
|
become: true
|
||||||
|
become_user: mitogen__pw_required
|
||||||
|
strategy: mitogen_linear
|
||||||
|
tasks:
|
||||||
|
- command: whoami
|
||||||
|
changed_when: false
|
||||||
|
check_mode: false
|
@ -0,0 +1,21 @@
|
|||||||
|
- name: regression/issue_952__ask_become_pass.yml
|
||||||
|
hosts: test-targets[0]:&linux_containers
|
||||||
|
gather_facts: false
|
||||||
|
tags:
|
||||||
|
- issue_952
|
||||||
|
tasks:
|
||||||
|
- name: Test --ask-become-pass
|
||||||
|
delegate_to: localhost
|
||||||
|
expect:
|
||||||
|
command: >
|
||||||
|
ansible-playbook
|
||||||
|
{% for inv in ansible_inventory_sources %}
|
||||||
|
-i "{{ inv }}"
|
||||||
|
{% endfor %}
|
||||||
|
--ask-become-pass
|
||||||
|
regression/become_test.yml
|
||||||
|
chdir: ../
|
||||||
|
responses:
|
||||||
|
'BECOME password:': pw_required_password
|
||||||
|
changed_when: false
|
||||||
|
check_mode: false
|
Loading…
Reference in New Issue