On 04. mars 2017 04:10, David Brendlinger wrote:
I just want to make a very simple playbook using the archive module:
http://docs.ansible.com/ansible/archive_module.html
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.tgz
Can 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)
---
- hosts: all
tasks:
- name: Archive
archive:
path: /path/to/foo
dest: /path/to/foo.tgz
Is there a better place for newbies to post this level of question?
No, this is the correct place. Welcome to the community.
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ae523aa9-2c0e-7213-0ba9-d5a3bae67a3d%40olstad.com.
For more options, visit https://groups.google.com/d/optout.