New WeightGrapher Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
746 B

- name: Install packages to support postgres
apt:
name: [
'libssl-dev',
'libpq-dev',
'libz-dev',
'libexpat1-dev',
'postgresql-client',
'postgresql-contrib',
'postgresql',
'python3-psycopg2',
]
state: present
- name: Start & enable postgres
service:
name: postgresql
state: started
enabled: true
- name: Create db user account for weightgrapher
postgresql_user:
name: "{{ database.user }}"
password: "{{ database.pass }}"
state: present
become_user: postgres
become: true
- name: Create weightgrapher database
postgresql_db:
name: "{{ database.name }}"
owner: "{{ database.user }}"
state: present
become_user: postgres
become: true