`ansible_ssh_*` variables deprecated in Ansible 2.x

Bug #1636606 reported by Nolan Brubaker on 2016-10-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-ansible
Low
Nolan Brubaker

Bug Description

Per http://docs.ansible.com/ansible/intro_inventory.html,

"Ansible 2.0 has deprecated the “ssh” from ansible_ssh_user, ansible_ssh_host, and ansible_ssh_port to become ansible_user, ansible_host, and ansible_port. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (ansible_ssh_*). These shorter variables are ignored, without warning, in older versions of Ansible."

The dyanmic_inventory.py script will generate both ansible_ssh_host and ansible_host, however `ansible_ssh_host` should be removed due to the deprecation.

Before that happens, though, the following uses will have to be updated:

/etc/ansible/roles/galera_server/tests/test-galera-server-functional.yml:60: when: ansible_ssh_host == '10.100.100.101'
/etc/ansible/roles/galera_server/tests/test-galera-server-functional.yml:74: when: ansible_ssh_host == '10.100.100.102'
/etc/ansible/roles/resolvconf/tests/inventory:2:localhost ansible_connection=local ansible_become=True ansible_ssh_host=127.0.0.1
/etc/ansible/roles/resolvconf/templates/resolvconf-base.j2:14:nameserver {{ hostvars[item]['ansible_ssh_host'] }}
/etc/ansible/roles/unbound/tests/inventory:2:localhost ansible_connection=local ansible_become=True ansible_ssh_host=127.0.0.1
/etc/ansible/roles/unbound/templates/openstack.conf.j2:5: {%- if hostvars[container]['ansible_ssh_host'] is defined %}
/etc/ansible/roles/unbound/templates/openstack.conf.j2:6: local-data: "{{ container }}.{{ unbound_regional_zone }} A {{ hostvars[container]['ansible_ssh_host'] }}"
/etc/ansible/roles/unbound/templates/openstack.conf.j2:9: local-data: "{{ target_rfc_1034_1035_name }}.{{ unbound_regional_zone }} A {{ hostvars[container]['ansible_ssh_host'] }}"
/etc/ansible/roles/unbound/templates/openstack.conf.j2:18: local-data: "{{ container }}-lm.{{ unbound_regional_zone }} A {{ hostvars[container]['ansible_ssh_host'] }}"
/etc/ansible/roles/unbound/templates/openstack.conf.j2:24: {%- if hostvars[container]['ansible_ssh_host'] is defined %}
/etc/ansible/roles/unbound/templates/openstack.conf.j2:25: local-data: "{{ group_name }}.{{ unbound_regional_zone }} A {{ hostvars[container]['ansible_ssh_host'] }}"
/etc/ansible/roles/haproxy_server/templates/service.j2:87:{% set _ = entry.append(hostvars[host_name]['ansible_ssh_host'] + ":" + haproxy_backend_port | string) %}
/etc/ansible/roles/haproxy_server/templates/service.j2:104:{% set _ = entry.append(hostvars[host_name]['ansible_ssh_host'] + ":" + haproxy_backend_port | string) %}
Binary file /etc/ansible/roles/plugins/strategy/linear.pyc matches
/etc/ansible/roles/plugins/strategy/linear.py:140: ansible_host = ph.vars.get('ansible_ssh_host')
/etc/ansible/roles/os_ceilometer/tests/test-install-mongodb.yml:60: command: "mongo --host {{ ansible_ssh_host }} --eval ' '"
/etc/ansible/roles/os_ceilometer/templates/ceilometer.conf.j2:95:messaging_urls = rabbit://{{ swift_rabbitmq_telemetry_userid }}:{{ swift_rabbitmq_telemetry_password }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ swift_rabbitmq_telemetry_port }}/{{ swift_rabbitmq_telemetry_vhost }}
/etc/ansible/roles/bird/tests/inventory:2:localhost ansible_connection=local ansible_become=True ansible_ssh_host=127.0.0.1
/etc/ansible/roles/os_aodh/tests/group_vars/all_containers.yml:16:ansible_ssh_host: "{{ ansible_host }}"
/etc/ansible/roles/os_aodh/tests/os_aodh-overrides.yml:17:aodh_db_address: "{{ hostvars[groups['galera_all'][0]]['ansible_ssh_host'] }}"
/etc/ansible/roles/os_aodh/tests/os_aodh-overrides.yml:27:aodh_service_publicuri: "{{ aodh_service_proto }}://{{ hostvars[groups['aodh_all'][0]]['ansible_ssh_host'] }}:{{ aodh_service_port }}"
/etc/ansible/roles/os_aodh/tests/os_aodh-overrides.yml:28:aodh_service_internaluri: "{{ aodh_service_proto }}://{{ hostvars[groups['aodh_all'][0]]['ansible_ssh_host'] }}:{{ aodh_service_port }}"
/etc/ansible/roles/os_aodh/tests/os_aodh-overrides.yml:29:aodh_service_adminuri: "{{ aodh_service_proto }}://{{ hostvars[groups['aodh_all'][0]]['ansible_ssh_host'] }}:{{ aodh_service_port }}"
/etc/ansible/roles/os_aodh/tests/inventory:3:infra1 ansible_ssh_host=10.100.100.2 ansible_host=10.100.100.2 ansible_become=True ansible_user=root
/etc/ansible/roles/os_aodh/tests/inventory:4:openstack1 ansible_ssh_host=10.100.100.3 ansible_host=10.100.100.3 ansible_become=True ansible_user=root
/etc/ansible/roles/os_magnum/tests/host_vars/infra1.yml:17:ansible_ssh_host: 10.1.1.101
/etc/ansible/roles/os_magnum/tests/host_vars/localhost.yml:19:ansible_ssh_host: 10.1.1.1
/etc/ansible/roles/os_magnum/tests/host_vars/openstack1.yml:17:ansible_ssh_host: 10.1.1.102
/etc/ansible/roles/os_magnum/extras/os-magnum-install.yml:37: host: "{{ ansible_ssh_host }}"
/etc/ansible/roles/os_magnum/templates/magnum.conf.j2:4:host = {{ ansible_ssh_host | default(ansible_host) }}
/etc/ansible/roles/os_magnum/templates/magnum.conf.j2:8:host = {{ ansible_ssh_host | default(ansible_host) }}
/etc/ansible/roles/os_rally/tests/group_vars/all_containers.yml:16:ansible_ssh_host: "{{ ansible_host }}"
/etc/ansible/roles/os_rally/tests/inventory:3:infra1 ansible_ssh_host=10.100.100.2 ansible_host=10.100.100.2 ansible_become=True ansible_user=root
/etc/ansible/roles/os_rally/tests/inventory:4:openstack1 ansible_ssh_host=10.100.100.3 ansible_host=10.100.100.3 ansible_become=True ansible_user=root
/etc/ansible/roles/os_rally/tests/test-vars.yml:16:rally_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_ssh_host'] }}"
/etc/ansible/roles/os_ironic/defaults/main.yml:136:ironic_tftp_server_address: "{{ ansible_ssh_host }}"

Changed in openstack-ansible:
assignee: nobody → Nolan Brubaker (nolan-brubaker)
status: New → In Progress

Reviewed: https://review.openstack.org/390643
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-ops/commit/?id=baf0553a3631eccc4072516d2ffae40471885537
Submitter: Jenkins
Branch: master

commit baf0553a3631eccc4072516d2ffae40471885537
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:36:21 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: Ie34bb924b55d4e1c7b4568c2eadd2a7a1a60a821
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390653
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-plugins/commit/?id=e566c20b24b085a0d797de534e5e4315413b9f18
Submitter: Jenkins
Branch: master

commit e566c20b24b085a0d797de534e5e4315413b9f18
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:38:31 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: I39892435950eca6da773dd947894da2125eab147
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390642
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-haproxy_server/commit/?id=c91ef29f6561e0f6f8fe5b2c22765e4b5bc36beb
Submitter: Jenkins
Branch: master

commit c91ef29f6561e0f6f8fe5b2c22765e4b5bc36beb
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:35:47 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: Ic9b64da4db166c6c9cdacbef4825bb4605dfb439
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390647
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_cloudkitty/commit/?id=b13646c7166486053475c75b87ec0ccd41d8f3a4
Submitter: Jenkins
Branch: master

commit b13646c7166486053475c75b87ec0ccd41d8f3a4
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:36:50 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: I667cb70dd0fef80699cc9f6cb44091cddaaaa57b
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390652
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_zaqar/commit/?id=d355447d75efb17ec966276c49fd4a7a075f359d
Submitter: Jenkins
Branch: master

commit d355447d75efb17ec966276c49fd4a7a075f359d
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:38:19 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: I7290dd50db66234a81a40c5613bf850f23afc938
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390651
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_rally/commit/?id=60a1889001fd3c7b94f5bec0e8feb6fd16d0ee30
Submitter: Jenkins
Branch: master

commit 60a1889001fd3c7b94f5bec0e8feb6fd16d0ee30
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:37:45 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: Icd0874e88d7d2d8c14d568256e6fd59951b95858
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390644
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_aodh/commit/?id=37f0f088bb35a1f738ba1077176bfce8845d63c1
Submitter: Jenkins
Branch: master

commit 37f0f088bb35a1f738ba1077176bfce8845d63c1
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:36:27 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: If4515f257c9d5e0de21eb16f8faea2c249392d69
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390641
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-galera_server/commit/?id=98e3a515b53d62330a1ca30d3e340b420344842c
Submitter: Jenkins
Branch: master

commit 98e3a515b53d62330a1ca30d3e340b420344842c
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:35:36 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: If133068625584b8794615bf212c700b6253dce19
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390648
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_designate/commit/?id=9eca6e47a276a2b7fd8ed10f9ff2b0d80211bba2
Submitter: Jenkins
Branch: master

commit 9eca6e47a276a2b7fd8ed10f9ff2b0d80211bba2
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:36:54 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: I8ff8d0227fccff8c41d762a83802e1e7bab61bfe
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390645
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_barbican/commit/?id=3b6acb925792b521ec8704316fff4052927522e2
Submitter: Jenkins
Branch: master

commit 3b6acb925792b521ec8704316fff4052927522e2
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:36:32 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: Ib434763dc662279c41d80597f94869a29a4c1265
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390646
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_ceilometer/commit/?id=c1671ea0ce05cf9512e828c459295ae59d76609f
Submitter: Jenkins
Branch: master

commit c1671ea0ce05cf9512e828c459295ae59d76609f
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:36:37 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: I9afd09d4c76febea5896cf6bf7bc284dabea38c3
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390649
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_ironic/commit/?id=cf909ad90762357e8c2e0ff32805d90ae85297ce
Submitter: Jenkins
Branch: master

commit cf909ad90762357e8c2e0ff32805d90ae85297ce
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:37:15 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: I7f405b30a90b2671ff01b49747ad9f3a9486445a
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/390907
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=a420d11cd2bc141a111fe166baf0c7e17ec3c416
Submitter: Jenkins
Branch: master

commit a420d11cd2bc141a111fe166baf0c7e17ec3c416
Author: Nolan Brubaker <email address hidden>
Date: Wed Oct 26 11:47:00 2016 -0400

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups
    Related-Bug: #1636606

    Change-Id: I974c17d6c666a9bac0be1f6db93d0cb915ac0fe7

Reviewed: https://review.openstack.org/390672
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=20e246de8f628e23d372c6ccdacea529acbbfba7
Submitter: Jenkins
Branch: master

commit 20e246de8f628e23d372c6ccdacea529acbbfba7
Author: Nolan Brubaker <email address hidden>
Date: Tue Oct 25 17:39:54 2016 -0400

    Remove ansible_ssh_host variable from inventory

    Due to upstream Ansible deprecating the `ansible_ssh_host` variable,
    this key is removed from the generated inventory in order to avoid
    confusion. While Newton also supports Ansible 2.x, this change is
    intended to only be in effect from Ocata forward.

    From
    http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups:

    "Ansible 2.0 has deprecated the “ssh” from ansible_ssh_user,
    ansible_ssh_host, and ansible_ssh_port to become ansible_user,
    ansible_host, and ansible_port. If you are using a version of Ansible
    prior to 2.0, you should continue using the older style variables
    (ansible_ssh_*). These shorter variables are ignored, without warning,
    in older versions of Ansible."

    Fixes-Bug: #1636606

    Change-Id: If43b28247a9df3db76217b1147fab785f1235532

Changed in openstack-ansible:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/390650
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_magnum/commit/?id=64825eb4a110d940c08bfc39d65ab68434b7ac18
Submitter: Jenkins
Branch: master

commit 64825eb4a110d940c08bfc39d65ab68434b7ac18
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:37:29 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: I06c26bc22ecbbbd7e858027a6b7fef22316efa22
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>

Reviewed: https://review.openstack.org/400559
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_aodh/commit/?id=973262c9ad1270909db93ef4f5216ccb070f8bcc
Submitter: Jenkins
Branch: stable/newton

commit 973262c9ad1270909db93ef4f5216ccb070f8bcc
Author: Kevin Carter <email address hidden>
Date: Tue Oct 25 14:36:27 2016 -0500

    Remove deprecated ansible_ssh_host variable

    This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
    variable has been deprecated as noted here: [0].

    [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

    Change-Id: If4515f257c9d5e0de21eb16f8faea2c249392d69
    Related-Bug: #1636606
    Signed-off-by: Kevin Carter <email address hidden>
    (cherry picked from commit 37f0f088bb35a1f738ba1077176bfce8845d63c1)

tags: added: in-stable-newton
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers