July 2017
Intermediate to advanced
266 pages
6h 36m
English
Ansible's file module provides integration between Ansible playbooks and the filesystem itself. This enables us to perform directory operations and basic file operations via an Ansible playbook task. In addition to basic create, remove, update, and delete (CRUD) operations, we can also set permissions, change owners, set group owners, operate on recursive folder trees, and more.
Let's take a look at some examples of basic file and directory management operations using the file module:
# Create a directory using an Ansible Task- name: Creates a directory file: path=/opt/helloWorld state=directory# Create a directory using an Ansible Task,# which is owned by the baseballplayersgroup- name: Creates a ...Read now
Unlock full access