tests: Templated "remote_user" provided as Ansible playbook keyword
The password is provided as a variable because there is no corresponding keyword. I get the impression that keywords are considered a legacy mechanism, so most (new) options are only overridable by variables. The port is proved as a variable for now, to test remote_name in isolation.pull/1153/head
parent
24e39b241f
commit
5d6a185242
@ -0,0 +1,11 @@
|
||||
- name: integration/ssh/templated_by_play_keyword.yml
|
||||
hosts: tt_targets_bare
|
||||
gather_facts: false
|
||||
remote_user: "{{ 'mitogen__has_sudo_nopw' | trim }}"
|
||||
vars:
|
||||
ansible_password: has_sudo_nopw_password
|
||||
ansible_port: "{{ hostvars[groups['test-targets'][0]].ansible_port | default(22) }}"
|
||||
tasks:
|
||||
- meta: reset_connection
|
||||
- name: Templated variables in play keywords
|
||||
ping:
|
Loading…
Reference in New Issue