44 Views

27th August 2021

briansong.211@gmail.com

Hello All,

I am a newbie when it comes to Ansible, and thank you in advance for all your help!!

I am using Ansible to set up firewalld services, and I am having problem with adding source IPs. I am sandboxing with 2 VMs, and both are running on Oracle Linux 8. When I first ran the playboo, it added the source IP, but for the 2nd time, it removed the source IPs. Then the third time it adds back in.
So I guess it is acting like a toggle switch everytime I run the playbook. The snip from the YML file is below for your reference. I would appreciate if someone could point out what I have missed. Thanks.

- name: adding source IP

  firewalld:

    source: 192.168.1.115

    state: enabled

    immediate: yes

    permanent: true

Answers
Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos