42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
|
---
|
||
|
- hosts: localhost
|
||
|
# ask_pass: yes
|
||
|
gather_facts: no
|
||
|
|
||
|
vars:
|
||
|
# short site name to use as dir/file name
|
||
|
site_name: lexperimental
|
||
|
site_url: lexperimental.fr
|
||
|
docker_image: wordpress:apache
|
||
|
docker_volumes:
|
||
|
- "/var/www/arvuhez/wp-content/:/var/www/html/wp-content"
|
||
|
mysql_database: lexperimental
|
||
|
mysql_username: lexperimental
|
||
|
mysql_password: "azlhqsdh"
|
||
|
subnet_cidr_address: 172.100.0.0/24
|
||
|
subnet_gateway_ip: 172.100.0.1
|
||
|
subnet_site_ip: 172.100.0.2
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
tasks:
|
||
|
- name: "Create target directory {{ site_name }}"
|
||
|
file:
|
||
|
name: "{{ site_name }}"
|
||
|
state: directory
|
||
|
- name: Generate a docker-compose.yml file for our site
|
||
|
template:
|
||
|
src: templates/docker-compose.yml.j2
|
||
|
dest: "{{ site_name }}/docker-compose.yml"
|
||
|
# - debug: "Do the MySQL users thingy"
|
||
|
#- name: Generate a new nginx server config file
|
||
|
#- template:
|
||
|
#- src: templates/site.conf.j2
|
||
|
#- dest: "/etc/nginx/sites-available/{{ site_url }}"
|
||
|
# become: yes
|
||
|
# - debug: "Now do `ln -s /etc/nginx/sites-available/{{ site_url }} /etc/nginx/sites-enabled/"
|
||
|
|
||
|
|
||
|
|