![]() ![]() Ansible archive multiples files with loop - multiple single filesĮxample1: Compressing the Directory with TARĪs mentioned above, Ansible creates various types of archives and the most famous and widely used is tar archive.Archive Multiple files from multiple Directories with few exclusions.How to Create a bz2 archive with Ansible archive module.How to Create a zip archive with Ansible archive module.Remove the Source files after adding to the archive and compressed.Compressing the Directory with tar and gz.Can produce gzip, bzip2, lzma and zip compressed files or archives.Requires lzma or backports.lzma if using xz format.Requires tarfile, zipfile, gzip and bzip2 packages on target host.Source files can be deleted after archival by specifying remove=True.It will not copy the source file from the local system to the target before archiving.By default, it assumes the source file you are trying to compress does exist.This command is the opposite of unarchive command of ansible.How to Unarchive the files with Ansible - Additional. ![]() Example 8: Ansible archive multiples files with loop - multiple single files.Example 7: Compressing and Archiving multiple files Ansible archive.Example 6: Create a BZIP archive - File and Directory.Example 5: Create a ZIP file archive - File and Directory.Example 4: Remove the Source files after archiving.Example 3: Compress the file - Default File Compress format.Example 2:Compressing the Directory with tar and gz.Example1: Compressing the Directory with TAR. ![]()
0 Comments
Leave a Reply. |