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
@@ -73,12 +73,12 @@
|
||||
path: "{{ docker_compose_base_dir }}/{{ item.path }}"
|
||||
state: directory
|
||||
with_filetree: templates/docker-compose
|
||||
when: item.state == "directory"
|
||||
when: item.state == "directory" and item.path.count("/.") == 0
|
||||
tags: docker-config
|
||||
|
||||
- name: configure docker compose files
|
||||
- name: deploy docker compose templates
|
||||
template:
|
||||
dest: "{{ docker_compose_base_dir }}/{{ item.path }}"
|
||||
dest: "{{ docker_compose_base_dir }}/{{ item.path | splitext | first }}"
|
||||
src: "docker-compose/{{ item.path }}"
|
||||
owner: root
|
||||
group: root
|
||||
@@ -86,15 +86,33 @@
|
||||
backup: yes
|
||||
notify: restart docker compose services
|
||||
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
|
||||
|
||||
- name: ensure directory exists
|
||||
file:
|
||||
path: "{{ docker_compose_base_dir }}/bin"
|
||||
state: directory
|
||||
tags: docker-config
|
||||
|
||||
- name: install binaries
|
||||
- name: install executables
|
||||
template:
|
||||
dest: "{{ docker_compose_base_dir }}/bin/{{ item.path }}"
|
||||
src: "bin/{{ item.path }}"
|
||||
@@ -103,6 +121,6 @@
|
||||
mode: 0550
|
||||
with_filetree: templates/bin
|
||||
when: item.state == "file" and not item.path.endswith("~")
|
||||
tags: test
|
||||
tags: docker-config
|
||||
# config nextcloud
|
||||
# hide pg password
|
||||
|
||||
Reference in New Issue
Block a user