Hi All,

I am running a playbook that connects to* remote host A*, and would like to 
know if it is possible to run a *delegate_to:* command on the *remote host* *A. 
*The use case is that I have two different types of environments, one that 
relies on /etc/hosts to resolve the domain, and another type of environment 
that uses DNS to resolve the domain. So if I run delegate_to: 
"my.host.com", it will either resolve to 127.0.0.1 in the case of a single 
instance, or it will resolve the public IP address in the case for a remote 
machine. 

- name: start all three mongodb services
  delegate_to: "{{ item.host }}"
  shell: creates=/var/lock/subsys/mongod-{{ item.name }} 
/etc/init.d/mongod-{{ item.name }} start
  with_flattened:
    - replication_servers

Any help would be appreciated

-- 
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/c196e116-ce13-4ca6-b169-f01fac80ff3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to