I get the error when i finished the task Ansible Archive Module. Please help me verify what steps missing or fail
yep, already click review, please help
Hi, as my configure file format: tar && force_archive: true. After run playbook, i have log-in to stapp01 to verify file and appear file.tar.gz.
I think this display is correct with requirement
@chauhuuphat, if you just named your file tar.gz that doesn’t mean its a compressed tar archive, you need to make sure you set format: gz
in your playbook as well so that it can create a gzip compressed tar archive.
thanks for your suggest, the task is succeed
email:
now I completed with this yml.
-
name: Archive Playbook demo
hosts: stapp01
become: yes
tasks:- name: Archive the direcotyr in tar.gz format
archive:
path: /usr/src/finance/
dest: /opt/finance/blog.tar.gz
format: gz
force_archive: true
owner: tony
group: tony
- name: Archive the direcotyr in tar.gz format
-
name: Archive Playbook demo
hosts: stapp02
become: yes
tasks:- name: Archive the direcotyr in tar.gz format
archive:
path: /usr/src/finance/
dest: /opt/finance/blog.tar.gz
format: gz
force_archive: true
owner: steve
group: steve
- name: Archive the direcotyr in tar.gz format
-
name: Archive Playbook demo
hosts: stapp03
become: yes
tasks:- name: Archive the direcotyr in tar.gz format
archive:
path: /usr/src/finance/
dest: /opt/finance/blog.tar.gz
format: gz
force_archive: true
owner: banner
group: banner
- name: Archive the direcotyr in tar.gz format