ipv4 address for overcloud nodes in ssh.config.ansible
The ansible_fqdn variable appears to be getting overwritten during fact gathering. Create a unique variable to define the default address for overcloud nodes. Closes-Bug: #1742528 Change-Id: I85a2e76c4582e3a95f407e2d1edbf6051bf3525b
This commit is contained in:
parent
c97105f06b
commit
92b1142ad6
|
@ -34,7 +34,7 @@
|
|||
name: '{{ item.key }}'
|
||||
groups: "overcloud,{{ item.key | regex_replace('overcloud-(?:nova)?([a-zA-Z0-9_]+)-[0-9]+$', '\\1') }}"
|
||||
ansible_host: '{{ item.key }}'
|
||||
ansible_fqdn: '{{ item.value }}'
|
||||
inventory_ip: '{{ item.value }}'
|
||||
ansible_user: "{{ overcloud_user | default('heat-admin') }}"
|
||||
ansible_private_key_file: "{{ overcloud_key }}"
|
||||
ansible_ssh_extra_args: '-F "{{ local_working_dir }}/ssh.config.ansible"'
|
||||
|
@ -51,7 +51,7 @@
|
|||
name: 'subnode-{{ item.0 + 2 }}'
|
||||
groups: "overcloud"
|
||||
ansible_host: '{{ item.1 }}'
|
||||
ansible_fqdn: '{{ item.1 }}'
|
||||
inventory_ip: '{{ item.1 }}'
|
||||
ansible_user: "{{ lookup('env','USER') }}"
|
||||
ansible_private_key_file: "/etc/nodepool/id_rsa"
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ Host supplemental
|
|||
{% for host in groups["overcloud"] %}
|
||||
|
||||
Host {{ host }}
|
||||
ProxyCommand ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=60 -F {{ local_working_dir }}/ssh.config.ansible undercloud -W {{ hostvars[host].ansible_fqdn }}:22
|
||||
ProxyCommand ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=60 -F {{ local_working_dir }}/ssh.config.ansible undercloud -W {{ hostvars[host].inventory_ip }}:22
|
||||
IdentityFile {{ hostvars[host].ansible_private_key_file }}
|
||||
User {{ overcloud_user | default ('heat-admin') }}
|
||||
StrictHostKeyChecking no
|
||||
|
|
|
@ -17,8 +17,8 @@ Host undercloud
|
|||
{% for host in groups["overcloud"] %}
|
||||
|
||||
Host {{ host }}
|
||||
Hostname {{ hostvars[host].ansible_fqdn }}
|
||||
ProxyCommand ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=60 -F {{ local_working_dir }}/ssh.config.local.ansible undercloud -W {{ hostvars[host].ansible_fqdn }}:22
|
||||
Hostname {{ hostvars[host].ansible_host }}
|
||||
ProxyCommand ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=60 -F {{ local_working_dir }}/ssh.config.local.ansible undercloud -W {{ hostvars[host].inventory_ip }}:22
|
||||
IdentityFile {{ local_working_dir }}/id_rsa_overcloud
|
||||
User {{ overcloud_user | default('heat-admin') }}
|
||||
StrictHostKeyChecking no
|
||||
|
|
Loading…
Reference in New Issue