![Firewalld 모듈을 사용하여 여러 서비스를 동시에 활성화하는 방법 - Ansible](https://linux55.com/image/165905/Firewalld%20%EB%AA%A8%EB%93%88%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20%EC%97%AC%EB%9F%AC%20%EC%84%9C%EB%B9%84%EC%8A%A4%EB%A5%BC%20%EB%8F%99%EC%8B%9C%EC%97%90%20%ED%99%9C%EC%84%B1%ED%99%94%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%20-%20Ansible.png)
방화벽 모듈을 사용하여 동시에 여러 서비스를 활성화하는 방법은 무엇입니까? ansible-playbook을 실행한 후 서비스(https)를 활성화하는 이 코드를 사용하고 있습니다. 그것은 아주 잘 작동합니다. 그러나 이 코드에서 하나의 서비스(https) 대신 여러 서비스를 활성화하는 방법을 모르겠습니다.
- name: firewalld configuration
firewalld:
zone: public
service: https
permanent: yes
state: enabled
notify: reload firewalld
여러 패키지(아래 참조)를 설치하는 데 사용한 것과 동일한 방법을 시도했지만 성공하지 못했습니다. 답변이 잘못되었습니다(아래 참조).
- name: firewalld configuration
firewalld:
zone: public
service:
name:
- https
- http
permanent: yes
state: enabled
notify: reload firewalld
실수:
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)"}