add rollback playbook
Signed-off-by: Stephen Coady <scoady@redhat.com>
This commit is contained in:
parent
78b504b204
commit
5db769751c
2 changed files with 28 additions and 0 deletions
17
playbooks/manual/fas-readonly/rollback-readonly.yml
Normal file
17
playbooks/manual/fas-readonly/rollback-readonly.yml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
- 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
|
11
playbooks/manual/fas-readonly/rollback.sql
Normal file
11
playbooks/manual/fas-readonly/rollback.sql
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--
|
||||||
|
-- Make fas writable again
|
||||||
|
--
|
||||||
|
|
||||||
|
|
||||||
|
GRANT ALL PRIVILEGES on people to fas;
|
||||||
|
GRANT ALL PRIVILEGES on groups to fas;
|
||||||
|
GRANT ALL PRIVILEGES on group_roles to fas;
|
||||||
|
GRANT ALL PRIVILEGES on person_roles to fas;
|
||||||
|
GRANT ALL PRIVILEGES on person_roles_fcpa to fas;
|
||||||
|
GRANT ALL PRIVILEGES on bugzilla_queue to fas;
|
Loading…
Add table
Add a link
Reference in a new issue