Sha256: 5205689c4ba27c74e59c9d06ed01d8961d27db722e7cd501ba9ac5553b08bdbb

Contents?: true

Size: 1.06 KB

Versions: 20

Compression:

Stored size: 1.06 KB

Contents

---
- name: Ensure iptables is present.
  package: name=iptables state=present

- name: Flush iptables the first time playbook runs.
  command: >
    iptables -F
    creates=/etc/firewall.bash

- name: Copy firewall script into place.
  template:
    src: firewall.bash.j2
    dest: /etc/firewall.bash
    owner: root
    group: root
    mode: 0744
  notify: restart firewall

- name: Copy firewall init script into place.
  template:
    src: firewall.init.j2
    dest: /etc/init.d/firewall
    owner: root
    group: root
    mode: 0755
  when: "ansible_service_mgr != 'systemd'"

- name: Copy firewall systemd unit file into place (for systemd systems).
  template:
    src: firewall.unit.j2
    dest: /etc/systemd/system/firewall.service
    owner: root
    group: root
    mode: 0644
  when: "ansible_service_mgr == 'systemd'"

- name: Configure the firewall service.
  service:
    name: firewall
    state: "{{ firewall_state }}"
    enabled: "{{ firewall_enabled_at_boot }}"

- import_tasks: disable-other-firewalls.yml
  when: firewall_disable_firewalld or firewall_disable_ufw

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
cloud-mu-3.5.1 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.5.0 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.4.0 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.3.2 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.3.1 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.3.0 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.2.0 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.1.6 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.1.5 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.1.4 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.1.3 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.1.2 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.1.2beta2 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.1.1 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.1.0 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.0.2 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.0.1 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.0.0 ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-3.0.0beta ansible/roles/geerlingguy.firewall/tasks/main.yml
cloud-mu-2.1.0beta ansible/roles/geerlingguy.firewall/tasks/main.yml