ansible/playbooks/manual/fas-readonly/rollback-readonly.yml
Ryan Lerch 2cf38c1f17 [yaml-lint] fix yamllint errors and warnings on plabooks
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-11-25 19:04:25 +10:00

17 lines
609 B
YAML

---
- name: change fas db to writable again
hosts: db-fas01.iad2.fedoraproject.org:db-fas01.stg.iad2.fedoraproject.org
user: root
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- name: copy the sql script to file
template: src=rollback.sql dest=/var/lib/pgsql/rollback.sql
- name: rollback permissions for relevant tables in the fas db
shell: psql -1 -v ON_ERROR_STOP=1 fas2 </var/lib/pgsql/rollback.sql
become: yes
become_user: postgres
become_method: su