snackpot.yml etc. - refine docker-compose config deploy
The main job of this commit: - Be explicit about templates: expect the .j2 extension - Copy all other files, so that they can be binary - Don't deploy dotfiles or dotdirectories. This snuck in: - Remove `test` tag - Refine some descriptions
This commit is contained in:
30
snackpot.yml
30
snackpot.yml
@@ -76,12 +76,12 @@
|
|||||||
path: "{{ docker_compose_base_dir }}/{{ item.path }}"
|
path: "{{ docker_compose_base_dir }}/{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
with_filetree: templates/docker-compose
|
with_filetree: templates/docker-compose
|
||||||
when: item.state == "directory"
|
when: item.state == "directory" and item.path.count("/.") == 0
|
||||||
tags: docker-config
|
tags: docker-config
|
||||||
|
|
||||||
- name: configure docker compose files
|
- name: deploy docker compose templates
|
||||||
template:
|
template:
|
||||||
dest: "{{ docker_compose_base_dir }}/{{ item.path }}"
|
dest: "{{ docker_compose_base_dir }}/{{ item.path | splitext | first }}"
|
||||||
src: "docker-compose/{{ item.path }}"
|
src: "docker-compose/{{ item.path }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@@ -89,15 +89,33 @@
|
|||||||
backup: yes
|
backup: yes
|
||||||
notify: restart docker compose services
|
notify: restart docker compose services
|
||||||
with_filetree: templates/docker-compose
|
with_filetree: templates/docker-compose
|
||||||
when: item.state == "file" and not item.path.endswith("~")
|
when: item.state == "file" and item.path.endswith(".j2")
|
||||||
|
tags: docker-config
|
||||||
|
|
||||||
|
- name: deploy docker compose files
|
||||||
|
copy:
|
||||||
|
dest: "{{ docker_compose_base_dir }}/{{ item.path }}"
|
||||||
|
src: "templates/docker-compose/{{ item.path }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0660
|
||||||
|
backup: yes
|
||||||
|
notify: restart docker compose services
|
||||||
|
with_filetree: templates/docker-compose
|
||||||
|
when: |-
|
||||||
|
item.state == "file" and not (
|
||||||
|
item.path.endswith("~") or item.path.endswith(".j2")
|
||||||
|
or item.path.count("/.") > 0
|
||||||
|
)
|
||||||
tags: docker-config
|
tags: docker-config
|
||||||
|
|
||||||
- name: ensure directory exists
|
- name: ensure directory exists
|
||||||
file:
|
file:
|
||||||
path: "{{ docker_compose_base_dir }}/bin"
|
path: "{{ docker_compose_base_dir }}/bin"
|
||||||
state: directory
|
state: directory
|
||||||
|
tags: docker-config
|
||||||
|
|
||||||
- name: install binaries
|
- name: install executables
|
||||||
template:
|
template:
|
||||||
dest: "{{ docker_compose_base_dir }}/bin/{{ item.path }}"
|
dest: "{{ docker_compose_base_dir }}/bin/{{ item.path }}"
|
||||||
src: "bin/{{ item.path }}"
|
src: "bin/{{ item.path }}"
|
||||||
@@ -106,6 +124,6 @@
|
|||||||
mode: 0550
|
mode: 0550
|
||||||
with_filetree: templates/bin
|
with_filetree: templates/bin
|
||||||
when: item.state == "file" and not item.path.endswith("~")
|
when: item.state == "file" and not item.path.endswith("~")
|
||||||
tags: test
|
tags: docker-config
|
||||||
# config nextcloud
|
# config nextcloud
|
||||||
# hide pg password
|
# hide pg password
|
||||||
|
|||||||
Reference in New Issue
Block a user