Updating static asset deploy to point to s3 since it looked like it was pointing to ec2. Also adding a postgres permission fix after bringing up a standby.

This commit is contained in:
Samuel Clay 2023-04-29 20:12:19 -04:00
parent 2bb30d6472
commit 0e05ed6985
2 changed files with 14 additions and 1 deletions

View file

@ -78,6 +78,7 @@
overwrite: different
aws_access_key: "{{ lookup('ini', 'aws_access_key_id section=default file=/srv/secrets-newsblur/keys/aws.s3.token') }}"
aws_secret_key: "{{ lookup('ini', 'aws_secret_access_key section=default file=/srv/secrets-newsblur/keys/aws.s3.token') }}"
endpoint_url: "https://s3.us-east-1.amazonaws.com"
tags:
- never
- static
@ -93,6 +94,7 @@
overwrite: different
aws_access_key: "{{ lookup('ini', 'aws_access_key_id section=default file=/srv/secrets-newsblur/keys/aws.s3.token') }}"
aws_secret_key: "{{ lookup('ini', 'aws_secret_access_key section=default file=/srv/secrets-newsblur/keys/aws.s3.token') }}"
endpoint_url: "https://s3.us-east-1.amazonaws.com"
tags:
- never
- static

View file

@ -103,7 +103,18 @@
become: yes
command:
docker run --rm --name=pg_basebackup --network=host -e POSTGRES_PASSWORD=newsblur -v /srv/newsblur/docker/volumes/postgres/data:/var/lib/postgresql/data postgres:13 pg_basebackup -h db-postgres.service.nyc1.consul -p 5432 -U newsblur -D /var/lib/postgresql/data -Fp -R -Xs -P -c fast
- name: Create Postgres docker volumes with correct permissions
become: yes
file:
path: "{{ item }}"
state: directory
recurse: yes
owner: "{{ ansible_effective_user_id|int }}"
group: "{{ ansible_effective_group_id|int }}"
with_items:
- /srv/newsblur/docker/volumes/postgres/archive
- /srv/newsblur/docker/volumes/postgres/backups
- /srv/newsblur/docker/volumes/postgres/data
- name: start postgresql
become: yes
command: