Hello,

I'm working through implementing the following scenario:

- A central software repo host stores various software packages

- Use Ansible to install the latest version of a particular package on 
various target hosts by downloading the latest package version from
the repo host to the target hosts and installing it.


In order to do this the playbook needs to do the following:

1) Get the latest package name/version from the software repo host
using a command like:

find . -name "{{ pkgname }}-[0-9]*" -print | sort | tail -1 | sed 
's,^[^/]*/,,'

2) Using the results of the above command (for ex. 
apache-2.4.1-x86_64-1.txz),
do a wget on the target hosts and then install this package.

I have not been able to figure out how to get this result data from another 
host to
use in the playbooks being applied to the target hosts. I looked at the 
"delegate_to"
option - if that is indeed the correct approach, I was not able to get it 
to work due
to an error I'm getting when using "delegate_to: myhost:portnum" (note - 
portnum for
the delegate host is different from the portnum for the current target 
host).

fatal: [myhost] => SSH Error: data could not be sent to the remote host. 
Make sure this host can be reached over ssh  FATAL: all hosts have already 
failed -- aborting

Thanks,
--Ed

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/16a321a8-2984-4a75-8429-118e4232292a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to