I am new to ansible and trying to write a basic playbook for mongodb backup with simplest method. here is what i am trying to do:
---
- hosts: mongo
tasks:
- name: Mongo Dump
command: mongodump --out mdb_backup/mongodb_backup/
- name: MongoDb Backup
command: "{{item}} chdir=~/mdb_backup/mongodb_backup/"
with_items:
- pwd
- git add
- git commit -m "Updates"
- git push origin master
And my error is:
"warnings": ["Consider using git module rather than running git"]} [WARNING]: Consider using git module rather than running git
I have idea about ansible git module but I don't know how to use it in my scenario. IS there anyone can help?