I just want to make a very simple playbook using the archive module:
http://docs.ansible.com/ansible/archive_module.html
I tried many things including:
I just want to make a very simple playbook using the archive module:
http://docs.ansible.com/ansible/archive_module.html
I tried many things including:
I just want to make a very simple playbook using the archive module:
If you look at the top of this site you will see it says
"New in version 2.3.", Ansible 2.3 is not released yet.
I tried many things including:
---
- hosts: all
tasks:
- name: Archive- archive:
path: /path/to/foo
dest: /path/to/foo.tgzCan someone show me how to archive a file in a playbook ?
When posting problems we appreciate the error messages as well, this makes it much easier to help.
I'm guessing you are using Ansible 2.2 that do not include this module.
You YAML syntax is also wrong, in YAML indentation(spaces) is very important and need to be consistent.
Take a look at this page and you will see how playbook is written
https://docs.ansible.com/ansible/playbooks_intro.html
If you have 2.3 the correct playbook should look like this (indentation 2 spaces)