NFS Ansible Automation playbook creation and usage
We are going to delve deeper into the Ansible Automation playbook. We will fully break it down for the NFS exports. We are going to show each step of the playbook and what each item does. By item, we are referring to the variables and commands set within an Ansible playbook:
--- - hosts: exports become: true become_method: sudo
Here, we have the beginning of the playbook. The hosts are the targets of the playbook. These are normally the servers you want to make changes to. These are listed in the inventory file. In this case, we are targeting the exports
group. In this case, become
tells Ansible that you want to elevate the user, and become_method
tells it that you want to use sudo
to elevate the permissions:
tasks: - name: Make sure Directory exists file: path: /share/folder owner...