How to Use Ansible Register Module - Linux Hint
linuxhint.com › ansible_register_moduleThe second task creates a new directory /tmp/ansible using the Ansible file module. This is the directory where the backup will be stored. This is the directory where the backup will be stored. The third task loops through the dir_contents.stdout_lines array and uses the Ansible copy module to copy each directory to the /tmp/ansible/ directory.