Compare commits

...

1 Commits

Author SHA1 Message Date
c46c763c1f testing 2023-07-23 19:54:08 -04:00
3 changed files with 30 additions and 1 deletions

8
dev/docker.yml Normal file
View File

@ -0,0 +1,8 @@
- name: Install Docker Server
hosts: all
become: true
vars_files:
- host_vars/docker.yml
roles:
- base
- docker

13
dev/host_vars/docker.yml Normal file
View File

@ -0,0 +1,13 @@
# base
allow_reboot: false
manage_network: false
# docker
docker_users:
- vagrant
docker_compose_deploy:
- name: docs
url: git@git.krislamo.org:kris/homelab-docs.git
version: main
sync: true

View File

@ -53,13 +53,21 @@
loop: "{{ docker_compose_deploy }}"
when: docker_compose_deploy is defined
- name: Copy docker-compose project directory
ansible.builtin.copy:
src: "{{ docker_repos_path }}/{{ item.name }}/"
dest: "{{ docker_compose_root }}/{{ item.name }}/"
remote_src: yes
loop: "{{ docker_compose_deploy }}"
when: docker_compose_deploy is defined and item.sync | default(false)
- name: Copy docker-compose.yml files to their service directories
ansible.builtin.copy:
src: "{{ docker_repos_path }}/{{ item.name }}/{{ item.path | default('docker-compose.yml') }}"
dest: "{{ docker_compose_root }}/{{ item.name }}/docker-compose.yml"
remote_src: yes
loop: "{{ docker_compose_deploy }}"
when: docker_compose_deploy is defined
when: docker_compose_deploy is defined and not item.sync | default(false)
- name: Set environment variables for docker-compose projects
ansible.builtin.template: