diff --git a/handlers/main.yml b/handlers/main.yml index d128547..87b604c 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -14,7 +14,7 @@ # limitations under the License. - name: Restart masakari services - service: + ansible.builtin.service: name: "{{ item.value.service_name }}" state: restarted daemon_reload: true diff --git a/tasks/main.yml b/tasks/main.yml index 002f124..8ad1863 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -14,7 +14,7 @@ # limitations under the License. - name: Gather variables for each operating system - include_vars: "{{ lookup('first_found', params) }}" + ansible.builtin.include_vars: "{{ lookup('first_found', params) }}" vars: params: files: @@ -29,7 +29,7 @@ - always - name: Including osa.db_setup role - include_role: + ansible.builtin.include_role: name: openstack.osa.db_setup apply: tags: @@ -51,7 +51,7 @@ - always - name: Including osa.mq_setup role - include_role: + ansible.builtin.include_role: name: openstack.osa.mq_setup apply: tags: @@ -77,12 +77,12 @@ - always - name: Importing masakari_pre_install tasks - import_tasks: masakari_pre_install.yml + ansible.builtin.import_tasks: masakari_pre_install.yml tags: - masakari-install - name: Create and install SSL certificates - include_role: + ansible.builtin.include_role: name: pki tasks_from: main_certs.yml apply: @@ -102,7 +102,7 @@ - always - name: Install the python venv - import_role: + ansible.builtin.import_role: name: "python_venv_build" vars: venv_python_executable: "{{ masakari_venv_python_executable }}" @@ -122,13 +122,13 @@ - masakari-install - name: Importing masakari_post_install tasks - import_tasks: masakari_post_install.yml + ansible.builtin.import_tasks: masakari_post_install.yml tags: - masakari-config - post-install - name: Run the systemd service role - import_role: + ansible.builtin.import_role: name: systemd_service vars: systemd_user_name: "{{ masakari_system_user_name }}" @@ -160,12 +160,12 @@ - systemd-service - name: Importing masakari_db_sync tasks - import_tasks: masakari_db_sync.yml + ansible.builtin.import_tasks: masakari_db_sync.yml when: - "_masakari_is_first_play_host" - name: Including osa.service_setup role - include_role: + ansible.builtin.include_role: name: openstack.osa.service_setup apply: tags: @@ -206,4 +206,4 @@ - always - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/tasks/masakari_db_sync.yml b/tasks/masakari_db_sync.yml index 9c50510..e91b518 100644 --- a/tasks/masakari_db_sync.yml +++ b/tasks/masakari_db_sync.yml @@ -14,7 +14,7 @@ # limitations under the License - name: Perform a synchronization of the Masakari database - command: "{{ masakari_bin }}/masakari-manage db sync" + ansible.builtin.command: "{{ masakari_bin }}/masakari-manage db sync" become: true become_user: "{{ masakari_system_user_name }}" changed_when: false diff --git a/tasks/masakari_post_install.yml b/tasks/masakari_post_install.yml index f1f5dad..b9030b9 100644 --- a/tasks/masakari_post_install.yml +++ b/tasks/masakari_post_install.yml @@ -62,7 +62,7 @@ - masakari-policy-override - name: Remove legacy policy.yaml file - file: + ansible.builtin.file: path: "{{ masakari_etc_dir }}/policy.yaml" state: absent when: @@ -72,7 +72,7 @@ - masakari-policy-override - name: Deploy masakari-monitors sudoers files - template: + ansible.builtin.template: src: "masakari_sudoers.j2" dest: "/etc/sudoers.d/masakari_sudoers" owner: "root" diff --git a/tasks/masakari_pre_install.yml b/tasks/masakari_pre_install.yml index 79854bb..e449eee 100644 --- a/tasks/masakari_pre_install.yml +++ b/tasks/masakari_pre_install.yml @@ -14,14 +14,14 @@ # limitations under the License. - name: Create the system group - group: + ansible.builtin.group: name: "{{ masakari_system_group_name }}" gid: "{{ masakari_system_group_gid | default(omit) }}" state: "present" system: "yes" - name: Create the masakari system user - user: + ansible.builtin.user: name: "{{ masakari_system_user_name }}" uid: "{{ masakari_system_user_uid | default(omit) }}" group: "{{ masakari_system_group_name }}" @@ -32,7 +32,7 @@ home: "{{ masakari_system_user_home }}" - name: Create masakari dir - file: + ansible.builtin.file: path: "{{ item.path | realpath }}" state: directory owner: "{{ item.owner | default(masakari_system_user_name) }}"