backup playbook yml files - only if chaned

9 views
Skip to first unread message

Kiran Kumar

unread,
Jul 29, 2020, 10:07:24 PM7/29/20
to Ansible Project
Hi

I do not want to use GIT for version control , so i am going to backup my playbooks .. only if this is changed copy the yml file with date ... 



I see copy module can do it


- name: Copy a new "ntp.conf file into place, backing up the original if it differs from the copied version
  copy:
    src: /etc/ansible/playbooks/
    dest: /etc/ansible/playbooks/BACKUP/
owner: root group: root mode: '0644' backup: yes


I do not care to copy to remote node as well... 

Does anyone has better way ( module or otherwise  )  to handle this "backup" and hence poor man's version control for playbooks ... 



Thanks 


Kiran Kumar

unread,
Jul 29, 2020, 10:14:53 PM7/29/20
to Ansible Project

I was able to do backup ... any suggestions on below 


TASK [backup playbooks] **********************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "A vault password or secret must be specified to decrypt /etc/ansible/playbooks/windows/local-user-add.yml"}


...


copy seems does not like valuted files ... ? 
Reply all
Reply to author
Forward
0 new messages