Hello All,

I need to open firewall for http traffic for RHEL 6. This is what I have:

---
- name: open firewall for http traffic
  firewalld:
    service: http
    permanent: true
    immediate: true
    state: enabled
  when:
    (ansible_distribution|lower == "redhat" and 
ansible_distribution_major_version|int == 8) or
    (ansible_distribution|lower == "redhat" and 
ansible_distribution_major_version|int == 6) or
    (ansible_distribution|lower != "sles" and 
ansible_distribution_major_version != "15") or
    (ansible_distribution|lower == "sles" and 
ansible_distribution_major_version == "12") or
    (ansible_distribution|lower == "sles" and 
ansible_distribution_major_version == "11")
...




I get this error:

fatal: [ablrh6ex]: FAILED! => {"changed": false, "msg": "Python Module not 
found: firewalld and its python module are required for this module, 
version 0.2.11 or newer required (0.3.9 or newer for offline operations)"}



I think for RHEL 6 iptables is used, I'm not quite sure. If so, how would I 
add iptables to my task?

Help will be greatly appreciated!

On Tuesday, September 3, 2019 at 1:43:18 PM UTC-5, Keith Mills wrote:
>
> Hello All,
>
> I need to open firewall for http traffic for SLES 15 and I'm running into 
> an error!
>
> Here is what I have:
>
> - name: open firewall for http traffic
>   firewalld:
>     service: http
>     permanent: true
>     immediate: true
>     state: enabled
>   when:
>     (ansible_distribution|lower == "redhat" and 
> ansible_distribution_major_version|int == 8) or
>     (ansible_distribution|lower == "sles" and 
> ansible_distribution_major_version == "15")
>
> Here is the error:
>
> fatal: [abls15ex]: FAILED! => {"changed": false, "msg": "Python Module 
> not found: firewalld and its python module are required for this module,   
>                       version 0.2.11 or newer required (0.3.9 or newer for 
> offline operations)"}
>
> Can anyone help!?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/65b4ae22-a758-47d0-a0ef-9e95556e2d8f%40googlegroups.com.

Reply via email to