diff --git a/roles/awx/defaults/main.yml b/roles/awx/defaults/main.yml index 5f8c5b4..e5eea0b 100644 --- a/roles/awx/defaults/main.yml +++ b/roles/awx/defaults/main.yml @@ -62,8 +62,7 @@ traefik_http_port: 8013 http_port: 8013 https_port: 8043 sdb_port_base: 15899 -#database_dump_file: pg_dumpall_awx_17.1.0_2021-05-30_23.00.01.sql.gz -database_dump_file: pg_dump_awx_2021-06-09_11.23.45.sql.gz +database_dump_file: pg_dump_awx_2021-06-11_05.00.01.sql.gz docker_registry: pi4.seboto.net:50000 # # AWX Host for Traefik diff --git a/roles/awx/files/pg_dump_awx_2021-06-11_05.00.01.sql.gz b/roles/awx/files/pg_dump_awx_2021-06-11_05.00.01.sql.gz new file mode 100644 index 0000000..e02cd64 Binary files /dev/null and b/roles/awx/files/pg_dump_awx_2021-06-11_05.00.01.sql.gz differ diff --git a/roles/awx/tasks/awx2_deploy.yml b/roles/awx/tasks/awx2_deploy.yml index 6ffc714..22fd6c5 100644 --- a/roles/awx/tasks/awx2_deploy.yml +++ b/roles/awx/tasks/awx2_deploy.yml @@ -386,6 +386,17 @@ group: "{{ awx_group }}" mode: '0644' +# +# Create directory to store the postrgres database data files +# +- name: create directory {{ pg_volume_datapath | default(awx_composedir + '/postgres/data') }} + file: + path: "{{ pg_volume_datapath | default(awx_composedir + '/postgres/data') }}" + state: directory + owner: "{{ awx_user }}" + group: "{{awx_group }}" + mode: '0750' + # # Create directory to store the database dumps # diff --git a/roles/awx/templates/docker-compose.override.yml.j2 b/roles/awx/templates/docker-compose.override.yml.j2 index e158eb8..53c7b04 100644 --- a/roles/awx/templates/docker-compose.override.yml.j2 +++ b/roles/awx/templates/docker-compose.override.yml.j2 @@ -88,6 +88,15 @@ services: volumes: - "{{ awx_composedir }}/initdb.d:/docker-entrypoint-initdb.d:ro" +volumes: + awx_db: + name: {{ awx_prefix }}_awx_db + driver: local + driver_opts: + type: none + o: bind + device: {{ pg_volume_datapath | default(awx_composedir + '/postgres/data') }} + networks: ansible-net: traefik-net: