Can someone please post a example on how to use a predefined Ansible module, in example git
module in a Custom Module?
I was trying to convert the below tasks into a single Custom Module
- name: Clone repo on Remote Hosts
git:
repo: "{{ git_repo_src }}"
dest: "{{ git_repo_dest }}"
- name: Fetch template from single Remote Host
run_once: true
fetch:
src: "{{ template_path }}/{{ template_file }}"
dest: "/tmp/{{ templalte_file }}"
flat: yes
fail_on_missing: yes
- name: Template Remote Hosts
template:
src: "/tmp/{{ template_file }}"
dest: "{{ templated_file_dest }}"
owner: "{{ templated_file_owner }}"
group: "{{ templated_file_group }}"
mode: "{{ templated_file_mode }}"