Advertisement
PandaAcademy

CICD1 Ansible 2- clone_roles

Apr 6th, 2022 (edited)
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. ---
  2. - name:
  3. hosts: all
  4. become: true
  5. vars:
  6. git_repository: "https://github.com/Panda-Academy-Core-2-0/Ansible_roles.git"
  7. git_branch: "main"
  8. tasks:
  9. - name: Create a directory if it does not exist
  10. file:
  11. path: /etc/ansible/roles
  12. state: directory
  13. mode: '0755'
  14. - name: Git checkout
  15. git:
  16. repo: "{{ git_repository }}"
  17. dest: "/etc/ansible/roles"
  18. version: "{{ git_branch }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement