Added more defaults

This commit is contained in:
Kris Lamoureux 2019-11-02 23:34:03 -04:00
parent 0ce49da441
commit a43b038b68
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
6 changed files with 22 additions and 13 deletions

View File

@ -0,0 +1 @@
docker_user: vagrant

View File

@ -43,8 +43,9 @@
- name: Add user to docker group - name: Add user to docker group
user: user:
name: vagrant name: "{{ docker_user }}"
groups: docker groups: docker
append: yes
- name: Install docker-compose - name: Install docker-compose
script: install-compose.sh script: install-compose.sh

View File

@ -1,3 +1,4 @@
traefik_name: traefik
traefik_version: latest traefik_version: latest
traefik_port: 8000 traefik_port: 8000
traefik_admin_port: 8080 traefik_admin_port: 8080

View File

@ -5,7 +5,7 @@
- name: Start Traefik container - name: Start Traefik container
docker_container: docker_container:
name: traefik name: "{{ traefik_name }}"
image: traefik:{{ traefik_version }} image: traefik:{{ traefik_version }}
restart_policy: always restart_policy: always
ports: ports:

View File

@ -0,0 +1,6 @@
mariadb_name: mariadb
mariadb_version: latest
wordpress_version: latest
wordpress_dbname: wordpress
wordpress_dbuser: wordpress

View File

@ -1,25 +1,25 @@
- name: Start MariaDB container - name: Start MariaDB container
docker_container: docker_container:
name: mariadb name: "{{ mariadb_name }}"
image: mariadb:10.4.8 image: mariadb:{{ mariadb_version }}
restart_policy: always restart_policy: always
volumes: mariadb:/var/lib/mysql volumes: mariadb:/var/lib/mysql
env: env:
MYSQL_RANDOM_ROOT_PASSWORD: "true" MYSQL_RANDOM_ROOT_PASSWORD: "true"
MYSQL_DATABASE: wordpress MYSQL_DATABASE: "{{ wordpress_dbname }}"
MYSQL_USER: wordpress MYSQL_USER: "{{ wordpress_dbuser }}"
MYSQL_PASSWORD: Password1 MYSQL_PASSWORD: "{{ wordpress_dbpass }}"
- name: Start WordPress container - name: Start WordPress container
docker_container: docker_container:
name: wordpress name: wordpress
image: wordpress:5.2.3 image: wordpress:{{ wordpress_version }}
restart_policy: always restart_policy: always
volumes: wordpress:/var/www/html volumes: wordpress:/var/www/html
links: links:
- mariadb - "{{ mariadb_name }}"
env: env:
WORDPRESS_DB_NAME: wordpress WORDPRESS_DB_NAME: "{{ wordpress_dbname }}"
WORDPRESS_DB_USER: wordpress WORDPRESS_DB_USER: "{{ wordpress_dbuser }}"
WORDPRESS_DB_PASSWORD: Password1 WORDPRESS_DB_PASSWORD: "{{ wordpress_dbpass }}"
WORDPRESS_DB_HOST: mariadb WORDPRESS_DB_HOST: "{{ mariadb_name }}"