From a74af47939f1f6b6a422cbb2938aea2ef6ed4529 Mon Sep 17 00:00:00 2001 From: Travis Truman Date: Sat, 17 Sep 2016 17:50:47 -0400 Subject: [PATCH] Address ansible_ssh_* var deprecation Replacing usage of ansible_ssh_host, ansible_ssh_user, ansible_ssh_port with ansible_host, ansible_user and ansible_port Change-Id: I4adb6484c13523a2527adc62846b736b0c5f228e --- tasks/keystone_credential_distribute.yml | 2 +- tasks/keystone_fernet_keys_distribute.yml | 2 +- tasks/keystone_service_setup.yml | 4 ++-- templates/keystone-credential-rotate.sh.j2 | 2 +- templates/keystone-fernet-rotate.sh.j2 | 2 +- tests/inventory | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tasks/keystone_credential_distribute.yml b/tasks/keystone_credential_distribute.yml index 1239de8a..8af20fae 100644 --- a/tasks/keystone_credential_distribute.yml +++ b/tasks/keystone_credential_distribute.yml @@ -19,7 +19,7 @@ -avz \ --delete \ {{ keystone_credential_key_repository }}/ \ - {{ keystone_system_user_name }}@{{ hostvars[item]['ansible_ssh_host'] }}:{{ keystone_credential_key_repository }}/ + {{ keystone_system_user_name }}@{{ hostvars[item]['ansible_host'] }}:{{ keystone_credential_key_repository }}/ become: yes become_user: "{{ keystone_system_user_name }}" with_items: "{{ groups['keystone_all'][1:] }}" diff --git a/tasks/keystone_fernet_keys_distribute.yml b/tasks/keystone_fernet_keys_distribute.yml index 807e2072..92d342d2 100644 --- a/tasks/keystone_fernet_keys_distribute.yml +++ b/tasks/keystone_fernet_keys_distribute.yml @@ -19,7 +19,7 @@ -avz \ --delete \ {{ keystone_fernet_tokens_key_repository }}/ \ - {{ keystone_system_user_name }}@{{ hostvars[item]['ansible_ssh_host'] }}:{{ keystone_fernet_tokens_key_repository }}/ + {{ keystone_system_user_name }}@{{ hostvars[item]['ansible_host'] }}:{{ keystone_fernet_tokens_key_repository }}/ become: yes become_user: "{{ keystone_system_user_name }}" with_items: "{{ groups['keystone_all'][1:] }}" diff --git a/tasks/keystone_service_setup.yml b/tasks/keystone_service_setup.yml index 5e40ffc4..0ee2821f 100644 --- a/tasks/keystone_service_setup.yml +++ b/tasks/keystone_service_setup.yml @@ -15,14 +15,14 @@ - name: Wait for keystone admin to come up wait_for: - host: "{{ ansible_ssh_host }}" + host: "{{ ansible_host }}" port: "{{ keystone_admin_port }}" timeout: 25 delay: 10 - name: Wait for keystone service to come up wait_for: - host: "{{ ansible_ssh_host }}" + host: "{{ ansible_host }}" port: "{{ keystone_service_port }}" timeout: 25 delay: 10 diff --git a/templates/keystone-credential-rotate.sh.j2 b/templates/keystone-credential-rotate.sh.j2 index 5cc07650..56f16f34 100644 --- a/templates/keystone-credential-rotate.sh.j2 +++ b/templates/keystone-credential-rotate.sh.j2 @@ -46,7 +46,7 @@ function autorotate { -avz \ --delete \ {{ keystone_credential_key_repository }}/ \ - {{ keystone_system_user_name }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ keystone_credential_key_repository }}/ + {{ keystone_system_user_name }}@{{ hostvars[host]['ansible_host'] }}:{{ keystone_credential_key_repository }}/ {%- endif %} diff --git a/templates/keystone-fernet-rotate.sh.j2 b/templates/keystone-fernet-rotate.sh.j2 index 43239027..121b383a 100644 --- a/templates/keystone-fernet-rotate.sh.j2 +++ b/templates/keystone-fernet-rotate.sh.j2 @@ -35,7 +35,7 @@ function autorotate { -avz \ --delete \ {{ keystone_fernet_tokens_key_repository }}/ \ - {{ keystone_system_user_name }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ keystone_fernet_tokens_key_repository }}/ + {{ keystone_system_user_name }}@{{ hostvars[host]['ansible_host'] }}:{{ keystone_fernet_tokens_key_repository }}/ {%- endif %} diff --git a/tests/inventory b/tests/inventory index 0039f11c..f51dd7a8 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,8 +1,8 @@ [all] localhost ansible_become=True -infra1 ansible_ssh_host=10.1.0.2 ansible_host=10.1.0.2 ansible_become=True ansible_user=root -keystone1 ansible_ssh_host=10.1.0.3 ansible_host=10.1.0.3 ansible_become=True ansible_user=root -keystone2 ansible_ssh_host=10.1.0.4 ansible_host=10.1.0.4 ansible_become=True ansible_user=root +infra1 ansible_host=10.1.0.2 ansible_become=True ansible_user=root +keystone1 ansible_host=10.1.0.3 ansible_become=True ansible_user=root +keystone2 ansible_host=10.1.0.4 ansible_become=True ansible_user=root [all_containers] infra1