Bootstrap FreeKB - Ansible - Set SELinux boolean using the seboolean module
Ansible - Set SELinux boolean using the seboolean module

Updated:   |  Ansible articles

If you are not familiar with modules, check out Ansible - Getting Started with Modules.

By default, SELinux is configured with certain booleans turned on and others turned off. For example, the getsebool command can be used to see that the httpd_can_network_connect_db is turned off.

~]# getsebool httpd_can_network_connect_db
httpd_can_network_connect_db --> off

 

The seboolan module can be used to turn a booleans on or off.

---
- hosts: web
  remote_user: root
  tasks:
  - name: turn the SELinux httpd_can_network_connnect_db boolean on
    seboolean:
      name: httpd_can_network_connect_db
      state: on
      persistent: yes
...

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 10f47c in the box below so that we can be sure you are a human.