How to enable multiple services at once with firewalld module? I'm using this code which enables one service (https) after running ansible-playbook.It work just fine. However, I can't figure out how to enable multiple services in this code instead of just one (https).
- name: firewalld configuration
firewalld:
zone: public
service: https
permanent: yes
state: enabled
notify: reload firewalld
I tried the same method (see below) that is used for installing multiple packages but with no luck. It answers with errors (see below)
- name: firewalld configuration
firewalld:
zone: public
service:
name:
- https
- http
permanent: yes
state: enabled
notify: reload firewalld
Error:
fatal: [192.168.0.101]: FAILED! => {"changed": false, "msg": "ERROR: Exception caught: org.fedoraproject.FirewallD1.Exception: INVALID_SERVICE: '{'name': ['https', 'http']}' not among existing services Permanent operation, Services are defined by port/tcp relationship and named as they are in /etc/services (on most systems)"}