From 150705d4675ff2679ec1ce78942d359a335f05f5 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 26 Dec 2024 18:01:44 +0100 Subject: [PATCH] Use FQCN for modules Change-Id: I71144b22afdfda094b3caa2419eaa4a8d27bd8df --- tasks/main.yml | 4 ++-- tasks/repo_install.yml | 4 ++-- tasks/repo_install_constraints.yml | 12 ++++++------ tasks/repo_post_install.yml | 2 +- tasks/repo_pre_install.yml | 12 ++++++------ 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index c51786e..9309c77 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: @@ -54,4 +54,4 @@ tags: repo_server-config - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/tasks/repo_install.yml b/tasks/repo_install.yml index 1823b38..938a46d 100644 --- a/tasks/repo_install.yml +++ b/tasks/repo_install.yml @@ -15,12 +15,12 @@ # TODO: remove this task after 2025.1 (Epoxy) release - name: Remove nginx web server - package: + ansible.builtin.package: name: nginx-* state: absent - name: Install distro packages - package: + ansible.builtin.package: name: "{{ repo_server_distro_packages | reject('equalto', '') | list }}" state: "{{ repo_server_package_state }}" update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" diff --git a/tasks/repo_install_constraints.yml b/tasks/repo_install_constraints.yml index 671bc60..ca6fdbf 100644 --- a/tasks/repo_install_constraints.yml +++ b/tasks/repo_install_constraints.yml @@ -14,7 +14,7 @@ # limitations under the License. - name: Ensure deploy host u-c directory exists - file: + ansible.builtin.file: state: directory path: "{{ repo_upper_constraints_path }}" mode: "0755" @@ -22,7 +22,7 @@ # by default the u-c file is retrieved by https - name: Retrieve upper constraints using https - get_url: + ansible.builtin.get_url: url: "{{ user_requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}" dest: "{{ repo_upper_constraints_path }}/{{ 'upper_constraints_' ~ requirements_git_install_branch | default('master') ~ '.txt' }}" mode: "0644" @@ -35,7 +35,7 @@ delegate_to: localhost - name: Retrieve local filesystem upper constraints in CI - command: + ansible.builtin.command: git --git-dir={{ requirements_git_repo.split('file://')[1] }}/.git show {{ requirements_git_install_branch | default('master') }}:upper-constraints.txt when: requirements_git_repo is search('file://') register: _uc_contents_git @@ -44,7 +44,7 @@ - skip_ansible_lint - name: Copy local upper constraints content to a file in CI - copy: + ansible.builtin.copy: content: "{{ _uc_contents_git.stdout }}" dest: "{{ repo_upper_constraints_path }}/{{ 'upper_constraints_' ~ requirements_git_install_branch | default('master') ~ '.txt' }}" mode: "0644" @@ -52,7 +52,7 @@ delegate_to: localhost - name: Copy all constraints files from the deploy host to the first repo server - copy: + ansible.builtin.copy: src: "{{ repo_upper_constraints_path }}/" dest: "{{ repo_server_directory_root }}/constraints/" owner: "{{ repo_service_user_name }}" @@ -60,7 +60,7 @@ mode: "0644" - name: Create a symlink for constraints file - file: + ansible.builtin.file: src: "{{ repo_server_directory_root }}/constraints/{{ 'upper_constraints_' ~ requirements_git_install_branch | default('master') ~ '.txt' }}" dest: "{{ repo_server_directory_root }}/constraints/upper_constraints_cached.txt" owner: "{{ repo_service_user_name }}" diff --git a/tasks/repo_post_install.yml b/tasks/repo_post_install.yml index 6cd577c..2e93be4 100644 --- a/tasks/repo_post_install.yml +++ b/tasks/repo_post_install.yml @@ -14,7 +14,7 @@ # limitations under the License. - name: Enable git automatic thread count detection - git_config: + community.general.git_config: scope: system name: pack.threads value: '0' diff --git a/tasks/repo_pre_install.yml b/tasks/repo_pre_install.yml index 6c88517..caa63d6 100644 --- a/tasks/repo_pre_install.yml +++ b/tasks/repo_pre_install.yml @@ -14,13 +14,13 @@ # limitations under the License. - name: Create the system group - group: + ansible.builtin.group: name: "{{ repo_service_group_name }}" state: "present" system: "yes" - name: Create the system user - user: + ansible.builtin.user: name: "{{ repo_service_user_name }}" group: "{{ repo_service_group_name }}" comment: "Apache Web Server user" @@ -30,7 +30,7 @@ home: "{{ repo_service_home_folder }}" - name: Mount any remote volumes - include_role: + ansible.builtin.include_role: name: systemd_mount vars: systemd_mounts: "{{ repo_server_systemd_mounts }}" @@ -38,7 +38,7 @@ # NOTE(jrosser) ensure there is no race condition between mounting and using the filesystem - name: Wait until mount will finish for {{ repo_server_directory_root }} - command: mountpoint -q {{ repo_server_directory_root }} + ansible.builtin.command: mountpoint -q {{ repo_server_directory_root }} changed_when: false register: _repo_folder_is_mounted retries: 5 @@ -48,7 +48,7 @@ # TODO(noonedeadpunk): Clean-up absent paths after 2025.1 - name: File and directory setup (non-root user) - file: + ansible.builtin.file: path: "{{ item.path }}" state: "{{ item.state | default('directory') }}" owner: "{{ repo_service_user_name }}" @@ -75,7 +75,7 @@ # NOTE: Remove after 2025.1 (Epoxy) release - name: File and directory setup (root user) - file: + ansible.builtin.file: path: "{{ item.path }}" state: "{{ item.state | default('directory') }}" owner: "root"