Skip to content

Commit

Permalink
Add molecule setup for firewalld role that uses base config
Browse files Browse the repository at this point in the history
  • Loading branch information
p-j-smith committed Jan 5, 2024
1 parent cea56e8 commit f5d1c57
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
27 changes: 27 additions & 0 deletions roles/firewalld/molecule/centos7/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# test this scenario from the roles/provision directory with the command
# molecule --base-config ../../tests/centos7_base_config.yml test -s centos7
platforms:
- name: instance_one
hostname: molecule.instance.local
image: ${MOLECULE_DOCKER_IMAGE:-geerlingguy/docker-centos7-ansible:latest}
required: true
command: ""
cgroupns_mode: host
privileged: true
pre_build_image: ${MOLECULE_PRE_BUILD_IMAGE:-true}
volumes:
- ./molecule-data:/storage/molecule
keep_volumes: false
groups:
- all
- molecule
- centos7
docker_networks:
- name: molecule
ipam_config:
- subnet: 192.168.56.0/24
gateway: 192.168.56.1
networks:
- name: molecule
ipv4_address: 192.168.56.2
8 changes: 8 additions & 0 deletions roles/firewalld/molecule/resources/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- name: Provision infrastructure
hosts: all
become: true
gather_facts: true
roles:
- role: mirsg.infrastructure.provision
tags: provision
17 changes: 17 additions & 0 deletions roles/firewalld/molecule/resources/inventory/group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# mirsg.infrastructure.firewalld
firewalld_allow_public_access: true
firewalld_internal_zone_open_services:
- http
- https
- ssh
firewalld_public_zone_open_services:
- http
- https
firewalld_work_zone_open_services:
- http
- https
firewalld_public_zone_ports:
- "8080"
firewalld_internal_zone_ports:
- "5432"
3 changes: 3 additions & 0 deletions roles/firewalld/molecule/rocky9/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# test this scenario from the roles/provision directory with the command
# molecule --base-config ../../tests/rocky9_base_config.yml test -s rocky9

0 comments on commit f5d1c57

Please sign in to comment.