forked from mitogen-hq/mitogen
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ansible_mitogen: Support templated become passwords
refs mitogen-hq#1083
- Loading branch information
Showing
8 changed files
with
99 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
- name: integration/become/templated_by_inv.yml | ||
hosts: tt_become_by_inv | ||
gather_facts: false | ||
gather_facts: true | ||
tasks: | ||
- meta: reset_connection | ||
- name: Templated become in inventory | ||
vars: | ||
expected_become_users: | ||
tt-become-pass: mitogen__pw_required | ||
tt-become-user: root | ||
command: | ||
cmd: whoami | ||
changed_when: false | ||
check_mode: false | ||
register: become_templated_by_inv_whoami | ||
failed_when: | ||
- become_templated_by_inv_whoami is failed | ||
or become_templated_by_inv_whoami.stdout != 'root' | ||
or become_templated_by_inv_whoami.stdout != expected_become_users[inventory_hostname] | ||
when: | ||
# https://github.com/ansible/ansible/pull/70785 | ||
- ansible_become_user in ['root'] | ||
or ansible_facts.distribution not in ["MacOSX"] | ||
or ansible_version.full is version("2.11", ">=", strict=True) | ||
or is_mitogen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters