Simplify with become_user.
This commit is contained in:
@@ -22,9 +22,10 @@
|
|||||||
- name: Server | OnlyOffice | Postgres | Configure
|
- name: Server | OnlyOffice | Postgres | Configure
|
||||||
shell: '{{ item }}'
|
shell: '{{ item }}'
|
||||||
loop:
|
loop:
|
||||||
- sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice;"
|
- psql -c "CREATE DATABASE onlyoffice;"
|
||||||
- sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
|
- psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
|
||||||
- sudo -i -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
|
- psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
|
||||||
|
become_user: postgres
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Server | OnlyOffice | RabbitMQ | Install
|
- name: Server | OnlyOffice | RabbitMQ | Install
|
||||||
|
Reference in New Issue
Block a user