Compare commits
1 Commits
7c2def16a5
...
c46c763c1f
Author | SHA1 | Date | |
---|---|---|---|
c46c763c1f |
8
dev/docker.yml
Normal file
8
dev/docker.yml
Normal 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
13
dev/host_vars/docker.yml
Normal 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
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user