You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Dear Team,
i am trying to use archive on test vm which i created at my end but its getting me into error which i am clueless now, Can someone help on the same. Below are the details.
Thanks upfront.
$ /usr/bin/ansible --version
ansible 2.4.1.0
config file = /mnt/disk1/sandeep/admin/ansiblerd/069-module-archive/ansible.cfg
configured module search path = [u'/home/panchas3/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.6.9 (unknown, Sep 1 2016, 23:34:36) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
$ rpm -qa |grep ansible
ansible-2.4.1.0-2.el6.noarch
$ cat playbook-gz-version01.yml
---
- name: Playbook to archive files in required format
hosts: all
become: false
gather_facts: false
tasks:
- name: put files on remote server
copy:
src: "{{ item }}"
dest: /tmp
mode: 0775
with_items:
- testfile1
- testfile2
- testfile3
- testfile4
- testfile5
- name: Archiving files to required format
archive:
path:
- testfile1
- testfile2
- testfile3
- testfile4
- testfile5
dest: /tmp/testarchive.gz
format: gz
- name: remove files from remote server
file:
name: "/tmp/{{ item }}"
state: absent
with_items:
- testfile1
- testfile2
- testfile3
- testfile4
- testfile5
- testarchive.gz
...
$ ansible-playbook playbook-gz-version01.yml
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in '/mnt/disk1/sandeep/admin/ansiblerd/069-module-archive/playbook-gz-version01.yml': line 18, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- testfile5
- name: Archiving files to required format
^ here
The error appears to have been in '/mnt/disk1/sandeep/admin/ansiblerd/069-module-archive/playbook-gz-version01.yml': line 18, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- testfile5
- name: Archiving files to required format
^ here