diff --git a/playbooks/redeploy-dynamic.yaml b/playbooks/redeploy-dynamic.yaml index fb943a9f1..61c53eeca 100644 --- a/playbooks/redeploy-dynamic.yaml +++ b/playbooks/redeploy-dynamic.yaml @@ -72,4 +72,3 @@ until: node_info.node.provision_state == "active" retries: "{{ active_state_wait_retries | default(30) }}" delay: "{{ provision_state_retry_interval | default(20) }}" - diff --git a/playbooks/roles/bifrost-configdrives-dynamic/tasks/update_facts_from_ironic.yaml b/playbooks/roles/bifrost-configdrives-dynamic/tasks/update_facts_from_ironic.yaml index 6e13acc6f..19a90d593 100644 --- a/playbooks/roles/bifrost-configdrives-dynamic/tasks/update_facts_from_ironic.yaml +++ b/playbooks/roles/bifrost-configdrives-dynamic/tasks/update_facts_from_ironic.yaml @@ -18,15 +18,15 @@ auth: {} when: noauth_mode is defined and noauth_mode | bool == true -- name: "Execute os_client_config to collect facts" - os_client_config: +- name: "Execute openstack.cloud.config to collect facts" + openstack.cloud.config: no_log: yes when: noauth_mode is defined and noauth_mode | bool == false -# NOTE(TheJulia): The first record returned by os_client_config +# NOTE(TheJulia): The first record returned by openstack.cloud.config # is utilized as the default. A user can still define the parameters # if so desired. -- name: "Set os_client_config's auth parameters if not already set." +- name: "Set openstack.cloud.config auth parameters if not already set." set_fact: auth: "{{ openstack.clouds[0].auth }}" auth_type: "{{ openstack.clouds[0].auth_type }}" diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/README.md b/playbooks/roles/bifrost-deploy-nodes-dynamic/README.md index b0084ee0b..529ca170e 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/README.md +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/README.md @@ -23,7 +23,7 @@ ironic_url: This is the URL to the ironic server. By default, this is set to network_interface: This is the network interface that the nodes receive DHCP/PXE/iPXE. This is utilized to generate the url that - Ironic is configured with for image retrieval. This + Ironic is configured with for image retrieval. This variable does not have a default in this role and expects to receive this information from the calling playbook. diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml index 668cdc96d..f81182c13 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml @@ -27,15 +27,15 @@ auth: {} when: noauth_mode is defined and noauth_mode | bool == true -- name: "Execute os_client_config to collect facts" - os_client_config: +- name: "Execute openstack.cloud.config to collect facts" + openstack.cloud.config: no_log: yes when: noauth_mode is defined and noauth_mode | bool == false -# NOTE(TheJulia): The first record returned by os_client_config +# NOTE(TheJulia): The first record returned by openstack.cloud.config # is utilized as the default. A user can still define the parameters # if so desired. -- name: "Set os_client_config's auth parameters if not already set." +- name: "Set openstack.cloud.config auth parameters if not already set." set_fact: auth: "{{ openstack.clouds[0].auth }}" auth_type: "{{ openstack.clouds[0].auth_type }}" @@ -70,7 +70,7 @@ when: (inventory_dhcp | bool == true) or (inventory_dns | bool == true) - name: "Deploy to hardware - Using custom instance_info." - os_ironic_node: + openstack.cloud.baremetal_node_action: auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" ironic_url: "{{ ironic_url }}" @@ -96,7 +96,7 @@ when: instance_info is not defined and test_deploy_image.stat.exists | bool == false - name: "Deploy to hardware - bifrost default" - os_ironic_node: + openstack.cloud.baremetal_node_action: cloud: "{{ cloud_name | default(omit) }}" auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" diff --git a/playbooks/roles/bifrost-ironic-install/tasks/keystone_setup.yml b/playbooks/roles/bifrost-ironic-install/tasks/keystone_setup.yml index 2504b4ece..f1101b6b4 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/keystone_setup.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/keystone_setup.yml @@ -52,7 +52,7 @@ no_log: true - name: "Create service user for ironic" - os_user: + openstack.cloud.identity_user: name: "{{ ironic.service_catalog.username }}" password: "{{ ironic.service_catalog.password }}" state: present @@ -70,7 +70,7 @@ no_log: true - name: "Associate ironic user to admin role" - os_user_role: + openstack.cloud.role_assignment: user: "{{ ironic.service_catalog.username }}" role: "admin" project: "{{ ironic.service_catalog.project_name }}" @@ -86,7 +86,7 @@ no_log: true - name: "Create keystone service record for ironic" - os_keystone_service: + openstack.cloud.catalog_service: state: present name: "ironic" service_type: "baremetal" @@ -200,7 +200,7 @@ when: test_ironic_internal_endpoint.rc != 0 or test_ironic_internal_endpoint.stdout == '[]' - name: "Create baremetal_admin role" - os_keystone_role: + openstack.cloud.identity_role: name: "baremetal_admin" state: present auth: @@ -214,7 +214,7 @@ no_log: true - name: "Create baremetal_observer role" - os_keystone_role: + openstack.cloud.identity_role: name: "baremetal_observer" state: present auth: @@ -245,7 +245,7 @@ no_log: true - name: "Create bifrost user" - os_user: + openstack.cloud.identity_user: name: "{{ ironic.keystone.default_username }}" password: "{{ ironic.keystone.default_password }}" default_project: "baremetal" @@ -262,7 +262,7 @@ no_log: true - name: "Associate bifrost user with baremetal_admin" - os_user_role: + openstack.cloud.role_assignment: user: "{{ ironic.keystone.default_username }}" role: "baremetal_admin" project: "baremetal" diff --git a/playbooks/roles/bifrost-ironic-install/tasks/keystone_setup_inspector.yml b/playbooks/roles/bifrost-ironic-install/tasks/keystone_setup_inspector.yml index 516282901..33a42f83b 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/keystone_setup_inspector.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/keystone_setup_inspector.yml @@ -34,7 +34,7 @@ ironic_inspector.keystone.default_password is undefined - name: "Create service user for ironic-inspector" - os_user: + openstack.cloud.identity_user: name: "{{ ironic_inspector.service_catalog.username }}" password: "{{ ironic_inspector.service_catalog.password }}" state: present @@ -52,7 +52,7 @@ no_log: true - name: "Associate ironic_inspector user to admin role" - os_user_role: + openstack.cloud.role_assignment: user: "{{ ironic_inspector.service_catalog.username }}" role: admin project: "{{ ironic_inspector.service_catalog.project_name | default('service') }}" @@ -68,7 +68,7 @@ no_log: true - name: "Create keystone service record for ironic-inspector" - os_keystone_service: + openstack.cloud.catalog_service: state: present name: ironic-inspector service_type: baremetal-introspection @@ -182,7 +182,7 @@ when: test_ironic_inspector_internal_endpoint.rc != 0 or test_ironic_inspector_internal_endpoint.stdout == '[]' - name: "Create inspector_user user" - os_user: + openstack.cloud.identity_user: name: "{{ ironic_inspector.keystone.default_username }}" password: "{{ ironic_inspector.keystone.default_password }}" default_project: "baremetal" @@ -199,7 +199,7 @@ no_log: true - name: "Associate inspector_user with baremetal_admin" - os_user_role: + openstack.cloud.role_assignment: user: "{{ ironic_inspector.keystone.default_username }}" role: "baremetal_admin" project: baremetal diff --git a/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml b/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml index 273bc46fb..d67775a88 100644 --- a/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml @@ -18,14 +18,14 @@ auth: {} when: noauth_mode is defined and noauth_mode | bool == true -- name: "Execute os_client_config to collect facts" - os_client_config: +- name: "Execute openstack.cloud.config to collect facts" + openstack.cloud.config: no_log: yes -# NOTE(TheJulia): The first record returned by os_client_config +# NOTE(TheJulia): The first record returned by openstack.cloud.config # is utilized as the default. A user can still define the parameters # if so desired. -- name: "Set os_client_config's auth parameters if not already set." +- name: "Set openstack.cloud.config auth parameters if not already set." set_fact: auth: "{{ openstack.clouds[0].auth }}" auth_type: "{{ openstack.clouds[0].auth_type }}" @@ -34,7 +34,7 @@ when: noauth_mode is defined and noauth_mode | bool == false - name: "Unprovision node" - os_ironic_node: + openstack.cloud.baremetal_node_action: cloud: "{{ cloud_name | default(omit) }}" auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" diff --git a/playbooks/roles/ironic-delete-dynamic/tasks/main.yml b/playbooks/roles/ironic-delete-dynamic/tasks/main.yml index 4ff83c519..4b5ad10a0 100644 --- a/playbooks/roles/ironic-delete-dynamic/tasks/main.yml +++ b/playbooks/roles/ironic-delete-dynamic/tasks/main.yml @@ -18,15 +18,15 @@ auth: {} when: noauth_mode is defined and noauth_mode | bool == true -- name: "Execute os_client_config to collect facts" - os_client_config: +- name: "Execute openstack.cloud.config to collect facts" + openstack.cloud.config: no_log: yes when: noauth_mode is defined and noauth_mode | bool == false -# NOTE(TheJulia): The first record returned by os_client_config +# NOTE(TheJulia): The first record returned by openstack.cloud.config # is utilized as the default. A user can still define the parameters # if so desired. -- name: "Set os_client_config's auth parameters if not already set." +- name: "Set openstack.cloud.config auth parameters if not already set." set_fact: auth: "{{ openstack.clouds[0].auth }}" auth_type: "{{ openstack.clouds[0].auth_type }}" @@ -34,7 +34,7 @@ no_log: yes - name: "Delete hardware" - os_ironic: + openstack.cloud.baremetal_node: cloud: "{{ cloud_name | default(omit) }}" auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" diff --git a/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml b/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml index bf866d650..b5659bf62 100644 --- a/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml +++ b/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml @@ -22,15 +22,15 @@ auth: {} when: noauth_mode is defined and noauth_mode | bool == true -- name: "Execute os_client_config to collect facts" - os_client_config: +- name: "Execute openstack.cloud.config to collect facts" + openstack.cloud.config: no_log: yes when: noauth_mode is defined and noauth_mode | bool == false -# NOTE(TheJulia): The first record returned by os_client_config +# NOTE(TheJulia): The first record returned by openstack.cloud.config # is utilized as the default. A user can still define the parameters # if so desired. -- name: "Set os_client_config's auth parameters if not already set." +- name: "Set openstack.cloud.config auth parameters if not already set." set_fact: auth: "{{ openstack.clouds[0].auth }}" auth_type: "{{ openstack.clouds[0].auth_type }}" diff --git a/playbooks/roles/ironic-inspect-node/tasks/main.yml b/playbooks/roles/ironic-inspect-node/tasks/main.yml index 5ffaf3d4b..be32aa2aa 100644 --- a/playbooks/roles/ironic-inspect-node/tasks/main.yml +++ b/playbooks/roles/ironic-inspect-node/tasks/main.yml @@ -22,15 +22,15 @@ auth: {} when: noauth_mode is defined and noauth_mode | bool == true -- name: "Execute os_client_config to collect facts" - os_client_config: +- name: "Execute openstack.cloud.config to collect facts" + openstack.cloud.config: no_log: yes when: noauth_mode is defined and noauth_mode | bool == false -# NOTE(TheJulia): The first record returned by os_client_config +# NOTE(TheJulia): The first record returned by openstack.cloud.config # is utilized as the default. A user can still define the parameters # if so desired. -- name: "Set os_client_config's auth parameters if not already set." +- name: "Set openstack.cloud.config auth parameters if not already set." set_fact: auth: "{{ openstack.clouds[0].auth }}" auth_type: "{{ openstack.clouds[0].auth_type }}" @@ -63,7 +63,7 @@ when: (inventory_dhcp | bool == true) or (inventory_dns | bool == true) - name: "Execute node introspection - noauth_mode" - os_ironic_inspect: + openstack.cloud.baremetal_inspect: cloud: "{{ cloud_name | default(omit) }}" auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" @@ -78,7 +78,7 @@ # which raises a bug in the inspection module where auth_type must be # defined, as it is otherwise always sent as a null value. - name: "Execute node introspection" - os_ironic_inspect: + openstack.cloud.baremetal_inspect: cloud: "{{ cloud_name | default(omit) }}" auth_type: "{{ auth_type | default('password') }}" auth: "{{ auth | default(omit) }}" diff --git a/releasenotes/notes/switch_to_openstack_collection-a6eb3e24a68a1a82.yaml b/releasenotes/notes/switch_to_openstack_collection-a6eb3e24a68a1a82.yaml new file mode 100644 index 000000000..f752dca53 --- /dev/null +++ b/releasenotes/notes/switch_to_openstack_collection-a6eb3e24a68a1a82.yaml @@ -0,0 +1,14 @@ +--- +other: + - | + Bifrost now uses the equivalent modules from the openstack.cloud collection. + The change on modules is listed below. + + * `os_client_config` is `config` + * `os_ironic` is `baremetal_node` + * `os_ironic_inspect` is `baremetal_inspect` + * `os_ironic_node` is `baremetal_node_action` + * `os_keystone_role` is `identity_role` + * `os_keystone_service` is `catalog_service` + * `os_user` is `identity_user` + * `os_user_role` is `role_assignment`