diff --git a/tasks/keystone_credential.yml b/tasks/keystone_credential.yml index 7b3d79e2..3f1c33c1 100644 --- a/tasks/keystone_credential.yml +++ b/tasks/keystone_credential.yml @@ -14,11 +14,10 @@ # limitations under the License. - include: keystone_credential_create.yml - when: > - inventory_hostname == groups['keystone_all'][0] + static: no + when: inventory_hostname == groups['keystone_all'][0] - include: keystone_credential_distribute.yml - when: > - inventory_hostname == groups['keystone_all'][0] + when: inventory_hostname == groups['keystone_all'][0] - include: keystone_credential_autorotate.yml diff --git a/tasks/keystone_fernet.yml b/tasks/keystone_fernet.yml index 83ab41e4..ed2ecbca 100644 --- a/tasks/keystone_fernet.yml +++ b/tasks/keystone_fernet.yml @@ -14,11 +14,11 @@ # limitations under the License. - include: keystone_fernet_keys_create.yml - when: > - inventory_hostname == groups['keystone_all'][0] + static: no + when: inventory_hostname == groups['keystone_all'][0] - include: keystone_fernet_keys_distribute.yml - when: > - inventory_hostname == groups['keystone_all'][0] + static: no + when: inventory_hostname == groups['keystone_all'][0] - include: keystone_fernet_keys_autorotate.yml diff --git a/tasks/keystone_idp_setup.yml b/tasks/keystone_idp_setup.yml index 71c3a12d..d0486e52 100644 --- a/tasks/keystone_idp_setup.yml +++ b/tasks/keystone_idp_setup.yml @@ -14,19 +14,19 @@ # limitations under the License. - include: keystone_idp_self_signed_create.yml - when: - - inventory_hostname == groups['keystone_all'][0] + static: no + when: inventory_hostname == groups['keystone_all'][0] - include: keystone_idp_self_signed_store.yml - when: - - inventory_hostname == groups['keystone_all'][0] + static: no + when: inventory_hostname == groups['keystone_all'][0] - include: keystone_idp_self_signed_distribute.yml - when: - - inventory_hostname != groups['keystone_all'][0] + static: no + when: inventory_hostname != groups['keystone_all'][0] - include: keystone_idp_metadata.yml - include: keystone_idp_sp_setup.yml - when: - - keystone_service_setup | bool + static: no + when: keystone_service_setup | bool diff --git a/tasks/keystone_init_common.yml b/tasks/keystone_init_common.yml index 12234d2b..31d631f7 100644 --- a/tasks/keystone_init_common.yml +++ b/tasks/keystone_init_common.yml @@ -14,9 +14,11 @@ # limitations under the License. - include: keystone_init_upstart.yml + static: no when: pid1_name == "init" - include: keystone_init_systemd.yml + static: no when: pid1_name == "systemd" - name: Load service diff --git a/tasks/keystone_install.yml b/tasks/keystone_install.yml index d7a45afe..1a0391c9 100644 --- a/tasks/keystone_install.yml +++ b/tasks/keystone_install.yml @@ -14,12 +14,12 @@ # limitations under the License. - include: keystone_install_apt.yml - when: - - ansible_pkg_mgr == 'apt' + static: no + when: ansible_pkg_mgr == 'apt' - include: keystone_install_yum.yml - when: - - ansible_pkg_mgr == 'yum' + static: no + when: ansible_pkg_mgr == 'yum' - name: Create WSGI symlinks file: diff --git a/tasks/keystone_ssl.yml b/tasks/keystone_ssl.yml index d89dd082..4f0cb1df 100644 --- a/tasks/keystone_ssl.yml +++ b/tasks/keystone_ssl.yml @@ -14,8 +14,9 @@ # limitations under the License. - include: keystone_ssl_self_signed.yml - when: > - keystone_ssl | bool and - (keystone_user_ssl_cert is not defined or keystone_user_ssl_key is not defined) + static: no + when: + - keystone_ssl | bool + - keystone_user_ssl_cert is not defined or keystone_user_ssl_key is not defined - include: keystone_ssl_user_provided.yml diff --git a/tasks/keystone_ssl_self_signed.yml b/tasks/keystone_ssl_self_signed.yml index a55991d2..12b621cb 100644 --- a/tasks/keystone_ssl_self_signed.yml +++ b/tasks/keystone_ssl_self_signed.yml @@ -14,13 +14,13 @@ # limitations under the License. - include: keystone_ssl_key_create.yml - when: > - inventory_hostname == groups['keystone_all'][0] + static: no + when: inventory_hostname == groups['keystone_all'][0] - include: keystone_ssl_key_store.yml - when: > - inventory_hostname == groups['keystone_all'][0] + static: no + when: inventory_hostname == groups['keystone_all'][0] - include: keystone_ssl_key_distribute.yml - when: > - inventory_hostname != groups['keystone_all'][0] + static: no + when: inventory_hostname != groups['keystone_all'][0] diff --git a/tasks/main.yml b/tasks/main.yml index bc9f08d4..ca95869d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -72,38 +72,41 @@ - keystone-install - include: keystone_fernet.yml - tags: - - keystone-install - - keystone-config + static: no when: - "'fernet' in keystone_token_provider" - keystone_service_setup | bool + tags: + - keystone-install + - keystone-config - include: keystone_credential.yml - when: - - keystone_service_setup | bool + static: no + when: keystone_service_setup | bool tags: - keystone-install - include: keystone_federation_sp_setup.yml + static: no + when: keystone_sp != {} tags: - keystone-install - keystone-config - when: - - keystone_sp != {} - include: keystone_db_setup.yml - tags: - - keystone-install + static: no when: - keystone_database_enabled | bool - inventory_hostname == groups['keystone_all'][0] - -- include: keystone_token_cleanup.yml tags: - keystone-install + +- include: keystone_token_cleanup.yml + static: no when: - "'sql' in keystone_token_driver" + tags: + - keystone-install - include: keystone_ssl.yml tags: @@ -111,56 +114,61 @@ - keystone-config - include: keystone_apache.yml + static: no + when: keystone_apache_enabled | bool tags: - keystone-install - keystone-config - when: keystone_apache_enabled | bool - include: keystone_nginx.yml + static: no + when: not keystone_apache_enabled | bool tags: - keystone-install - keystone-config - when: not keystone_apache_enabled | bool - include: keystone_uwsgi.yml + static: no + when: not keystone_mod_wsgi_enabled | bool tags: - keystone-install - keystone-config - when: not keystone_mod_wsgi_enabled | bool - name: Flush handlers meta: flush_handlers - include: keystone_service_setup.yml - tags: - - keystone-install - - keystone-config + static: no when: - keystone_service_setup | bool - inventory_hostname == groups['keystone_all'][0] + tags: + - keystone-install + - keystone-config - include: keystone_ldap_setup.yml - when: - - keystone_service_setup | bool + static: no + when: keystone_service_setup | bool tags: - keystone-install - keystone-config - include: keystone_federation_sp_idp_setup.yml - tags: - - keystone-install - - keystone-config + static: no when: - keystone_service_setup | bool - keystone_sp != {} - inventory_hostname == groups['keystone_all'][0] + tags: + - keystone-install + - keystone-config - name: Flush handlers meta: flush_handlers - include: keystone_idp_setup.yml + static: no + when: keystone_idp != {} tags: - keystone-install - keystone-config - when: - - keystone_idp != {} diff --git a/tests/ansible-role-requirements.yml b/tests/ansible-role-requirements.yml index 890c584f..904ca78e 100644 --- a/tests/ansible-role-requirements.yml +++ b/tests/ansible-role-requirements.yml @@ -10,6 +10,10 @@ src: https://git.openstack.org/openstack/openstack-ansible-memcached_server scm: git version: master +- name: openstack_hosts + src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts + scm: git + version: master - name: lxc_hosts src: https://git.openstack.org/openstack/openstack-ansible-lxc_hosts scm: git