Refactored use of variables

This commit is contained in:
2023-12-05 18:45:26 +01:00
parent 5ca94d6ecc
commit 3b06b5bcf4
50 changed files with 107 additions and 102 deletions

View File

@@ -2,14 +2,14 @@
- name: rebuild wordpress container
command:
cmd: docker build --no-cache -t custom_wordpress .
chdir: "{{docker_compose_wordpress_path}}"
chdir: "{{docker_compose_instance_directory}}"
environment:
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600
- name: recreate wordpress
command:
cmd: docker-compose -p wordpress up -d --force-recreate
chdir: "{{docker_compose_wordpress_path}}"
chdir: "{{docker_compose_instance_directory}}"
environment:
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600

View File

@@ -13,28 +13,28 @@
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ domain }}.conf
notify: restart nginx
- name: "create {{docker_compose_wordpress_path}}"
- name: "create {{docker_compose_instance_directory}}"
file:
path: "{{docker_compose_wordpress_path}}"
path: "{{docker_compose_instance_directory}}"
state: directory
mode: 0755
- name: "Transfering upload.ini to {{docker_compose_wordpress_path}}"
- name: "Transfering upload.ini to {{docker_compose_instance_directory}}"
template:
src: upload.ini.j2
dest: "{{docker_compose_wordpress_path}}upload.ini"
dest: "{{docker_compose_instance_directory}}upload.ini"
notify:
- recreate wordpress
- rebuild wordpress container
- name: "Transfering Dockerfile to {{docker_compose_wordpress_path}}"
- name: "Transfering Dockerfile to {{docker_compose_instance_directory}}"
copy:
src: Dockerfile
dest: "{{docker_compose_wordpress_path}}Dockerfile"
dest: "{{docker_compose_instance_directory}}Dockerfile"
notify:
- recreate wordpress
- rebuild wordpress container
- name: "add docker-compose.yml to {{docker_compose_wordpress_path}}"
template: src=docker-compose.yml.j2 dest={{docker_compose_wordpress_path}}docker-compose.yml
- name: "add docker-compose.yml to {{docker_compose_instance_directory}}"
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
notify: recreate wordpress

View File

@@ -1,2 +1,2 @@
docker_compose_wordpress_path: "{{path_docker_compose_files}}wordpress/"
docker_compose_instance_directory: "{{path_docker_compose_files}}wordpress/"
wordpress_max_upload_size: "64M"