From a7e0adfb15e27c0ff24f458aa3c94a7dbe1a1f5a Mon Sep 17 00:00:00 2001 From: Erin Sims Date: Tue, 13 Sep 2022 17:29:33 -0400 Subject: [PATCH] working on changes, and debugging --- playbooks/create_droplet.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/playbooks/create_droplet.yml b/playbooks/create_droplet.yml index e8ff910..e671ffa 100644 --- a/playbooks/create_droplet.yml +++ b/playbooks/create_droplet.yml @@ -42,6 +42,40 @@ - 'mpdb' register: created_droplets_backend loop: "{{ range(1,count| int + 1) }}" + + +- name: Create a Firewall named mpd-firewall + digital_ocean_firewall: + name: mpd-firewall + state: present + inbound_rules: + - protocol: "tcp" + ports: "22" + sources: + addresses: ["0.0.0.0/0", "::/0"] + - protocol: "tcp" + ports: "6600-6605" + sources: + addresses: ["0.0.0.0/0", "::/0"] + - protocol: "tcp" + ports: "6700-6705" + sources: + tags: ["ansible"] + addresses: ["0.0.0.0/0", "::/0"] + outbound_rules: + - protocol: "tcp" + ports: "1-65535" + destinations: + addresses: ["0.0.0.0/0", "::/0"] + - protocol: "udp" + ports: "1-65535" + destinations: + addresses: ["0.0.0.0/0", "::/0"] + - protocol: "icmp" + ports: "1-65535" + destinations: + addresses: ["0.0.0.0/0", "::/0"] + tags: ["mpdf", "mpdb"] - name: mpdb ansible.builtin.import_playbook: mpdb.yaml - name: mpdf