diff options
author | Samuli Silvius <s.silvius@partner.samsung.com> | 2019-03-24 13:36:08 +0200 |
---|---|---|
committer | Samuli Silvius <s.silvius@partner.samsung.com> | 2019-04-16 08:27:37 +0300 |
commit | 7cf19b2b37d4e194644936cf5c55910da12f5c59 (patch) | |
tree | 6dfe8e2587cc0fab4a5d5b0c2d063de54d2b5aea /ansible/test/roles | |
parent | 52eb50721e990e277ed8729225faff305dee11da (diff) |
Molecule tests for firewall role
Issue-ID: OOM-1757
Change-Id: I48639bd0fb67383a58f736aa1c12c38e3ddc9ab0
Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'ansible/test/roles')
-rw-r--r-- | ansible/test/roles/prepare-firewall/defaults/main.yml | 5 | ||||
-rw-r--r-- | ansible/test/roles/prepare-firewall/tasks/main.yml | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/ansible/test/roles/prepare-firewall/defaults/main.yml b/ansible/test/roles/prepare-firewall/defaults/main.yml new file mode 100644 index 00000000..b450099a --- /dev/null +++ b/ansible/test/roles/prepare-firewall/defaults/main.yml @@ -0,0 +1,5 @@ +--- +firewall: + package_name: + RedHat: 'firewalld' + Debian: 'ufw' diff --git a/ansible/test/roles/prepare-firewall/tasks/main.yml b/ansible/test/roles/prepare-firewall/tasks/main.yml new file mode 100644 index 00000000..a997d14f --- /dev/null +++ b/ansible/test/roles/prepare-firewall/tasks/main.yml @@ -0,0 +1,11 @@ +--- +- name: Install firewall + package: + name: "{{ firewall.package_name[ansible_facts.os_family] }}" + state: present + +- name: Start and enable firewall + service: + name: "{{ firewall.package_name[ansible_facts.os_family] }}" + state: started + enabled: true |