Add facility to store repo contents on a remote mount

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/837706
Change-Id: I9008680a5f41287599d67f4ce70605b60bccabf3
This commit is contained in:
Jonathan Rosser 2022-04-12 16:21:48 +01:00
parent 5aefc76d47
commit c966363bd4
3 changed files with 28 additions and 1 deletions

View File

@ -86,3 +86,21 @@ repo_ssh_keypairs_install_ca: "{{ openstack_ssh_keypairs_authorities }}"
repo_ssh_keypairs_principals:
- user: "{{ repo_service_user_name }}"
principals: "{{ repo_ssh_key_principals | default(['repo']) }}"
# Temporary variable which allows the lsyncd/rsync installation to be disabled outside this
# role when transtioning to using a shared filesystem to sync contents between repo_servers.
# The default is to enable the sync manager to give backward compatibility and allow code to
# merge.
repo_server_enable_sync_manager: True
# Multiple repo servers must have a shared /var/www/repo
repo_server_systemd_mounts: []
# Example using remote shared filesystem to synchronise the repo contents between
# several repo servers
#repo_server_systemd_mounts:
# - what: "gluster-server:gluster-volume-name"
# where: "/var/www/repo"
# type: glusterfs
# state: 'started'
# enabled: true

View File

@ -66,7 +66,9 @@
state: absent
- include: repo_sync_manager.yml
when: inventory_hostname == groups['repo_all'][0]
when:
- repo_server_enable_sync_manager
- inventory_hostname == groups['repo_all'][0]
tags:
- repo_server-config

View File

@ -29,6 +29,13 @@
createhome: "yes"
home: "{{ repo_service_home_folder }}"
- name: Mount any remote volumes
include_role:
name: systemd_mount
vars:
systemd_mounts: "{{ repo_server_systemd_mounts }}"
when: repo_server_systemd_mounts | length > 0
- name: File and directory setup (non-root user)
file:
path: "{{ item.path }}"