Execution
Date 08 Dec 2025 13:50:33 +0000
Duration 00:06:27.80
Controller aio1.openstack.local
User root
Versions
Ansible 2.18.6
ara 1.7.4 / 1.7.4
Python 3.12.11
Summary
7 Hosts
589 Tasks
576 Results
37 Plays
222 Files
0 Records

File: /home/zuul/src/opendev.org/openstack/openstack-ansible-repo_server/tasks/repo_pre_install.yml

---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Create the system group
  ansible.builtin.group:
    name: "{{ repo_service_group_name }}"
    state: "present"
    system: "yes"

- name: Create the system user
  ansible.builtin.user:
    name: "{{ repo_service_user_name }}"
    group: "{{ repo_service_group_name }}"
    comment: "Apache Web Server user"
    shell: "/usr/bin/false"
    system: "yes"
    createhome: "no"
    home: "{{ repo_service_home_folder }}"

- name: Mount any remote volumes
  ansible.builtin.include_role:
    name: systemd_mount
  vars:
    systemd_mounts: "{{ repo_server_systemd_mounts }}"
  when: repo_server_systemd_mounts | length > 0

# 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 }}
  ansible.builtin.command: mountpoint -q {{ repo_server_directory_root }}
  changed_when: false
  register: _repo_folder_is_mounted
  retries: 5
  delay: 2
  until: _repo_folder_is_mounted.rc == 0
  when: repo_server_systemd_mounts | length > 0

- name: File and directory setup (non-root user)
  ansible.builtin.file:
    path: "{{ item.path }}"
    state: "{{ item.state | default('directory') }}"
    owner: "{{ repo_service_user_name }}"
    group: "{{ repo_service_group_name }}"
    mode: "{{ item.mode | default('2755') }}"
  with_items:
    - path: "{{ repo_server_directory_root }}"
      mode: "0755"
    - path: "{{ repo_server_directory_root }}/os-releases"
    - path: "{{ repo_server_directory_root }}/os-releases/{{ openstack_release }}"
    - path: "{{ repo_server_directory_root }}/constraints"