Hello, i new with Ansible, very very very newbie, I am reading a book of
approximately 400 pages, haven’t finished reading yet, but I need to
automate a process as soon as possible, so I request your help.
I’m trying to automate deploys. I have two repositories. First I am cloning
the repository (repo1) to my PC, then pull from my PC to the repo2.
Here my first yaml, this way I am cloning the external repository (repo1)
on my local PC
---
- hosts: localhost
gather_facts: false
tasks:
- name: clone repo test
git:
repo: https://github.com/zpqrtbnk/test-repo.git
dest: /home/emanuel/git-test/
clone: yes
update: yes
Now I must clone the local repository to an external repository (repo2),
must I use the ansible-pull command or the copy module? Is there a way to
generate a rollback in case the task fails?
- hosts: git-server
gather_facts: false
tasks:
- name: pull changes
command: ansible-pull --url -C brunch
Any examples??
Regards,
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b96a123e-7f4b-4659-8944-01d17fe9e5e5n%40googlegroups.com.