Initial rough commit to save the code before cleanup
This commit is contained in:
commit
e0e7b07468
29 files changed
+942
No files matched your search
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#################################################
|
||||
# DO Community Playbooks: Docker
|
||||
#################################################
|
||||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
vars_files:
|
||||
- vars/default.yml
|
||||
|
||||
tasks:
|
||||
- name: Pull default Postgresql image
|
||||
docker_image:
|
||||
name: "{{ postgres_image }}"
|
||||
source: pull
|
||||
|
||||
# Creates the number of containers defined by the variable create_containers, using values from vars file
|
||||
- name: Create postgres container
|
||||
docker_container:
|
||||
name: "{{ postgres_name }}"
|
||||
image: "{{ postgres_image }}"
|
||||
state: started
|
||||
env:
|
||||
POSTGRESQL_USER: "{{ pg_user }}"
|
||||
POSTGRESQL_PASSWORD: "{{ pg_password }}"
|
||||
POSTGRESQL_DATABASE: 'postgres'
|
||||
PGDATA: '/var/lib/postgresql/data/pgdata'
|
||||
exposed_ports:
|
||||
- 5432
|
||||
published_ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- /var/lib/postgresql/data:/var/lib/postgresql/data
|
||||
Reference in new issue
Block a user