I am attempting to copy a file from the local ansible server to the managed
hosts (oracle linux).
I would like to push the file out to the different managed hosts because if
I call back to the Ansible server from the hosts them I have to login,
provide password etc.
Pushing from the ansible host is easier because the ssl keys have been
copied to all the hosts and therefore is passwordless.
I haven't found another way to do it other than using shell or command,
copy seems to be for transfering files within the client file system
I also looked at delegate_to: but there really wasn't enough documentation
for me to figure out how to make that work.
This is what I have so far but it's reaching back to the ansible server for
the file which requires a login.
Any help would be appreciated.
Dave
---
- hosts: 'ud-mgmt-srv'
become: true
get_info: false
tasks:
- name: Check httpdate rpm
stat: path=/tmp/htpdate-1.1.0-1.el7.rf.x86_64.rpm
register: st
- name: Copy httpdate rpm
command: scp 10.236.1.57:/tmp/htpdate-1.1.0-1.el7.rf.x86_64.rpm /tmp/.
when: not st.stat.exists
- name: Install htpdate
yum:
name: /tmp/htpdate-1.1.0-1.el7.rf.x86_64.rpm
state: present
--
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/33c3f1e2-6642-4a84-887b-7e27dc5a8a7b%40googlegroups.com.