ittechlab
asked on
Ansible - firwalld task
ansible error
[root@ansible ansible]# vim site.yml
---
- hosts: web03.cioft.com
roles:
- apache
tasks:
- name: Allow HTTPD traffic
firewalld:
service: https
permanent: yes
state: enabled
#tasks:
# - name: Allow httpd traffic
#command: firewall-cmd --zone=dmz --permanent --add-service=http --add-service=https
[root@ansible ansible]# vim site.yml
---
- hosts: web03.cioft.com
roles:
- apache
tasks:
- name: Allow HTTPD traffic
firewalld:
service: https
permanent: yes
state: enabled
#tasks:
# - name: Allow httpd traffic
#command: firewall-cmd --zone=dmz --permanent --add-service=http --add-service=https
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Tip: Always execute commands first manually to determine they produce your desired results first.
Also more detail is required about your runtime environment.
For example, are you running a guest/host container/VM system or bare metal machine.
Tip: Where firewalls are in play, always turn off your firewall completely as your first step + verify your packet flow works as expected.
If not, then no firewall modifications will make any difference + you can end up working many hours with no progress.