Use FQCN for modules
Change-Id: I71144b22afdfda094b3caa2419eaa4a8d27bd8df
This commit is contained in:
parent
73dcf7c341
commit
150705d467
@ -14,7 +14,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Gather variables for each operating system
|
- name: Gather variables for each operating system
|
||||||
include_vars: "{{ lookup('first_found', params) }}"
|
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
|
||||||
vars:
|
vars:
|
||||||
params:
|
params:
|
||||||
files:
|
files:
|
||||||
@ -54,4 +54,4 @@
|
|||||||
tags: repo_server-config
|
tags: repo_server-config
|
||||||
|
|
||||||
- name: Flush handlers
|
- name: Flush handlers
|
||||||
meta: flush_handlers
|
ansible.builtin.meta: flush_handlers
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
|
|
||||||
# TODO: remove this task after 2025.1 (Epoxy) release
|
# TODO: remove this task after 2025.1 (Epoxy) release
|
||||||
- name: Remove nginx web server
|
- name: Remove nginx web server
|
||||||
package:
|
ansible.builtin.package:
|
||||||
name: nginx-*
|
name: nginx-*
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Install distro packages
|
- name: Install distro packages
|
||||||
package:
|
ansible.builtin.package:
|
||||||
name: "{{ repo_server_distro_packages | reject('equalto', '') | list }}"
|
name: "{{ repo_server_distro_packages | reject('equalto', '') | list }}"
|
||||||
state: "{{ repo_server_package_state }}"
|
state: "{{ repo_server_package_state }}"
|
||||||
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Ensure deploy host u-c directory exists
|
- name: Ensure deploy host u-c directory exists
|
||||||
file:
|
ansible.builtin.file:
|
||||||
state: directory
|
state: directory
|
||||||
path: "{{ repo_upper_constraints_path }}"
|
path: "{{ repo_upper_constraints_path }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
# by default the u-c file is retrieved by https
|
# by default the u-c file is retrieved by https
|
||||||
- name: Retrieve upper constraints using 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')) }}"
|
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' }}"
|
dest: "{{ repo_upper_constraints_path }}/{{ 'upper_constraints_' ~ requirements_git_install_branch | default('master') ~ '.txt' }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
@ -35,7 +35,7 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Retrieve local filesystem upper constraints in CI
|
- 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
|
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://')
|
when: requirements_git_repo is search('file://')
|
||||||
register: _uc_contents_git
|
register: _uc_contents_git
|
||||||
@ -44,7 +44,7 @@
|
|||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
|
|
||||||
- name: Copy local upper constraints content to a file in CI
|
- name: Copy local upper constraints content to a file in CI
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ _uc_contents_git.stdout }}"
|
content: "{{ _uc_contents_git.stdout }}"
|
||||||
dest: "{{ repo_upper_constraints_path }}/{{ 'upper_constraints_' ~ requirements_git_install_branch | default('master') ~ '.txt' }}"
|
dest: "{{ repo_upper_constraints_path }}/{{ 'upper_constraints_' ~ requirements_git_install_branch | default('master') ~ '.txt' }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
@ -52,7 +52,7 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Copy all constraints files from the deploy host to the first repo server
|
- name: Copy all constraints files from the deploy host to the first repo server
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repo_upper_constraints_path }}/"
|
src: "{{ repo_upper_constraints_path }}/"
|
||||||
dest: "{{ repo_server_directory_root }}/constraints/"
|
dest: "{{ repo_server_directory_root }}/constraints/"
|
||||||
owner: "{{ repo_service_user_name }}"
|
owner: "{{ repo_service_user_name }}"
|
||||||
@ -60,7 +60,7 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
- name: Create a symlink for constraints file
|
- 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' }}"
|
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"
|
dest: "{{ repo_server_directory_root }}/constraints/upper_constraints_cached.txt"
|
||||||
owner: "{{ repo_service_user_name }}"
|
owner: "{{ repo_service_user_name }}"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Enable git automatic thread count detection
|
- name: Enable git automatic thread count detection
|
||||||
git_config:
|
community.general.git_config:
|
||||||
scope: system
|
scope: system
|
||||||
name: pack.threads
|
name: pack.threads
|
||||||
value: '0'
|
value: '0'
|
||||||
|
@ -14,13 +14,13 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Create the system group
|
- name: Create the system group
|
||||||
group:
|
ansible.builtin.group:
|
||||||
name: "{{ repo_service_group_name }}"
|
name: "{{ repo_service_group_name }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
system: "yes"
|
system: "yes"
|
||||||
|
|
||||||
- name: Create the system user
|
- name: Create the system user
|
||||||
user:
|
ansible.builtin.user:
|
||||||
name: "{{ repo_service_user_name }}"
|
name: "{{ repo_service_user_name }}"
|
||||||
group: "{{ repo_service_group_name }}"
|
group: "{{ repo_service_group_name }}"
|
||||||
comment: "Apache Web Server user"
|
comment: "Apache Web Server user"
|
||||||
@ -30,7 +30,7 @@
|
|||||||
home: "{{ repo_service_home_folder }}"
|
home: "{{ repo_service_home_folder }}"
|
||||||
|
|
||||||
- name: Mount any remote volumes
|
- name: Mount any remote volumes
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: systemd_mount
|
name: systemd_mount
|
||||||
vars:
|
vars:
|
||||||
systemd_mounts: "{{ repo_server_systemd_mounts }}"
|
systemd_mounts: "{{ repo_server_systemd_mounts }}"
|
||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
# NOTE(jrosser) ensure there is no race condition between mounting and using the filesystem
|
# 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 }}
|
- 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
|
changed_when: false
|
||||||
register: _repo_folder_is_mounted
|
register: _repo_folder_is_mounted
|
||||||
retries: 5
|
retries: 5
|
||||||
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
# TODO(noonedeadpunk): Clean-up absent paths after 2025.1
|
# TODO(noonedeadpunk): Clean-up absent paths after 2025.1
|
||||||
- name: File and directory setup (non-root user)
|
- name: File and directory setup (non-root user)
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: "{{ item.state | default('directory') }}"
|
state: "{{ item.state | default('directory') }}"
|
||||||
owner: "{{ repo_service_user_name }}"
|
owner: "{{ repo_service_user_name }}"
|
||||||
@ -75,7 +75,7 @@
|
|||||||
|
|
||||||
# NOTE: Remove after 2025.1 (Epoxy) release
|
# NOTE: Remove after 2025.1 (Epoxy) release
|
||||||
- name: File and directory setup (root user)
|
- name: File and directory setup (root user)
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: "{{ item.state | default('directory') }}"
|
state: "{{ item.state | default('directory') }}"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user