SL/ansible/roles/swag/tasks/main.yml
2022-06-13 22:09:07 +02:00

34 lines
928 B
YAML

- name: Create SWAG appdata directory
ansible.builtin.file:
path: "/opt/{{ item.name }}"
state: directory
owner: "{{ users.0.username }}"
group: "{{ users.0.groupname }}"
mode: "{{ item.mode | default('0755')}}"
loop:
- name: appdata
- name: appdata/swag
- name: appdata/swag/config
- name: appdata/swag/config/dns-conf
- name: Create proxynet
community.docker.docker_network:
name: proxynet
- name: Seed compose
ansible.builtin.template:
src: "docker-compose.yml"
dest: "/opt/appdata/swag/docker-compose.yml"
owner: "{{ users.0.username }}"
group: "{{ users.0.groupname }}"
mode: 0644
- name: Install swag dns file
template:
src: "cloudflare.ini"
dest: "/opt/appdata/swag/config/dns-conf/cloudflare.ini"
mode: "600" # To prevent unnessecary nag in logs
owner: "{{ users.0.username }}"
group: "{{ users.0.groupname }}"
become: true