Loops in Ansible Playbook
---
- name : Install the required packages, set the Selinux to permissive , disable the swap etc
hosts: all
become : True
tasks :
- name: Ensure SELinux is set to permissive mode in the configuration file
lineinfile:
path: /etc/selinux/config
regexp: '^SELINUX='
line: SELINUX=permissive
- name: Put SELinux in permissive mode.
ansible.posix.selinux:
policy: targeted
state: permissive
- name: Configure required modules
shell : modprobe overlay ; modprobe br_netfilterReference
Last updated