Hi All,
I have a scenario where I need to execute ansible script which will run the templates on remote server. I have list of remote servers which when given to delegate_to is not working and fileglob is not copying the files to /tmp/copy rather folder creating a copy file.
Please help
-
hosts: 127.0.0.1
connection: local
tasks: -
name: Install dependencies
yum: name={{ item }} state=present
with_items: -
htop
-
git.x86_64
-
python-devel
-
name: Clone ansible repo on remote server
git: repo=ssh://git@*****************************.git
dest=/tmp
version=feature/
accept_hostkey=yes
delegate_to: host1 -
name: Install config
template:
src: “{{ item }}”
dest: “/tmp/copy”
with_fileglob: “*”
delegate_to: host1