mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
standardize connection variable names (#51776)
* standardize user/password connection vars * docs: use ansible_user and ansible_password * docs: var precedence for connection vars * docs: ansible_become_pass -> ansible_become_password etc
This commit is contained in:
parent
51061f8a5f
commit
953058d025
35 changed files with 120 additions and 93 deletions
|
@ -135,7 +135,7 @@ So let us assume we have our target configured in the inventory using the FQDN n
|
|||
my-apic-1:
|
||||
ansible_host: apic01.fqdn.intra
|
||||
ansible_user: admin
|
||||
ansible_pass: my-password
|
||||
ansible_password: my-password
|
||||
|
||||
One way to set this up is to add to every task the directive: ``delegate_to: localhost``.
|
||||
|
||||
|
@ -146,7 +146,7 @@ One way to set this up is to add to every task the directive: ``delegate_to: loc
|
|||
aci_tenant:
|
||||
host: '{{ ansible_host }}'
|
||||
username: '{{ ansible_user }}'
|
||||
password: '{{ ansible_pass }}'
|
||||
password: '{{ ansible_password }}'
|
||||
|
||||
state: query
|
||||
delegate_to: localhost
|
||||
|
@ -168,7 +168,7 @@ In this case the inventory may look like this:
|
|||
my-apic-1:
|
||||
ansible_host: apic01.fqdn.intra
|
||||
ansible_user: admin
|
||||
ansible_pass: my-password
|
||||
ansible_password: my-password
|
||||
ansible_connection: local
|
||||
|
||||
But used tasks do not need anything special added.
|
||||
|
@ -179,7 +179,7 @@ But used tasks do not need anything special added.
|
|||
aci_tenant:
|
||||
host: '{{ ansible_host }}'
|
||||
username: '{{ ansible_user }}'
|
||||
password: '{{ ansible_pass }}'
|
||||
password: '{{ ansible_password }}'
|
||||
|
||||
state: query
|
||||
register: all_tenants
|
||||
|
|
|
@ -130,7 +130,7 @@ The rax module returns data about the nodes it creates, like IP addresses, hostn
|
|||
add_host:
|
||||
hostname: "{{ item.name }}"
|
||||
ansible_host: "{{ item.rax_accessipv4 }}"
|
||||
ansible_ssh_pass: "{{ item.rax_adminpass }}"
|
||||
ansible_password: "{{ item.rax_adminpass }}"
|
||||
groups: raxhosts
|
||||
loop: "{{ rax.success }}"
|
||||
when: rax.action == 'create'
|
||||
|
@ -511,7 +511,7 @@ Build a complete webserver environment with servers, custom networks and load ba
|
|||
add_host:
|
||||
hostname: "{{ item.name }}"
|
||||
ansible_host: "{{ item.rax_accessipv4 }}"
|
||||
ansible_ssh_pass: "{{ item.rax_adminpass }}"
|
||||
ansible_password: "{{ item.rax_adminpass }}"
|
||||
ansible_user: root
|
||||
groups: web
|
||||
loop: "{{ rax.success }}"
|
||||
|
@ -592,7 +592,7 @@ Using a Control Machine
|
|||
add_host:
|
||||
hostname: "{{ item.name }}"
|
||||
ansible_host: "{{ item.rax_accessipv4 }}"
|
||||
ansible_ssh_pass: "{{ item.rax_adminpass }}"
|
||||
ansible_password: "{{ item.rax_adminpass }}"
|
||||
ansible_user: root
|
||||
rax_id: "{{ item.rax_id }}"
|
||||
groups: web,new_web
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue