Setup user and DB in the playbook
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
b16343052b
commit
30e6953c2d
1 changed files with 24 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
- name: Set-up that instance for datanommer
|
||||
- name: Set-up that database for datanommer
|
||||
hosts: datanommer
|
||||
user: fedora
|
||||
gather_facts: True
|
||||
|
@ -6,16 +6,29 @@
|
|||
|
||||
vars_files:
|
||||
- "host_vars/datanommer.yml"
|
||||
|
||||
tasks:
|
||||
- name: get kernel version
|
||||
command: uname -a
|
||||
register: uname_output
|
||||
|
||||
- name: Show kernel info
|
||||
debug:
|
||||
msg: "{{uname_output}}"
|
||||
|
||||
- "secrets/secrets.yml"
|
||||
|
||||
roles:
|
||||
- postgresql_server
|
||||
|
||||
tasks:
|
||||
- name: Set up the datanommer DB user
|
||||
postgresql_user:
|
||||
name: "{{ datanommer_user }}"
|
||||
password: "{{ datanommer_password }}"
|
||||
- name: Create the datanommer DB
|
||||
postgresql_db:
|
||||
name: "datanommer"
|
||||
owner: "{{ datanommer_user }}"
|
||||
encoding: UTF-8
|
||||
|
||||
# Just some debugging tasks - to drop at some point
|
||||
|
||||
- name: get kernel version
|
||||
command: uname -a
|
||||
register: uname_output
|
||||
|
||||
- name: Show kernel info
|
||||
debug:
|
||||
msg: "{{uname_output}}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue