Initial commit
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
commit
793ee4598c
9 changed files with 297 additions and 0 deletions
40
tasks/main.yml
Normal file
40
tasks/main.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
- name: install dependencies
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- python3-docker
|
||||
- python3-compose
|
||||
|
||||
- name: create directories
|
||||
ansible.builtin.file:
|
||||
path: /etc/firefly
|
||||
state: directory
|
||||
|
||||
- name: create configuration files
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}.j2"
|
||||
dest: "/etc/firefly/{{ item }}"
|
||||
mode: "0600"
|
||||
loop:
|
||||
- docker-compose.yml
|
||||
- db.env
|
||||
- app.env
|
||||
|
||||
- name: start service
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: /etc/firefly
|
||||
files:
|
||||
- docker-compose.yml
|
||||
|
||||
- name: allow with iptables
|
||||
ansible.builtin.iptables:
|
||||
chain: INPUT
|
||||
protocol: tcp
|
||||
source: "{{ item }}"
|
||||
destination_ports:
|
||||
- "{{ firefly_port }}"
|
||||
jump: ACCEPT
|
||||
comment: firefly
|
||||
loop: "{{ firefly_allowed_sources }}"
|
||||
notify: save iptables
|
||||
when: firefly_manage_iptables
|
Loading…
Add table
Add a link
Reference in a new issue