On 03. mars 2017 17:06, Josh Smift wrote:
We have a playbook that restores some data from a backup to a host, and
afterwards we want to run another playbook that fixes up some things in
the backup, but that other playbook is more general, and does a whole
bunch of tasks, and affects all the hosts of this type. We'd rather only
run the tasks that we know we need to run (which are identified by a tag),
and only run them on the host they need to run on. Something like

- include: hosttype.yml
  limit: "{{ restorehost }}"
  tags: mytags

That actual code doesn't actually work, obviously.

Is there a way to do this within Ansible?

You could do something like this if you are using ssh keys for login.
- command: ansible-playbook hosttype.yml -l {{ restorehost }} -t mytags

--
Kai Stian Olstad

--
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/5c9742fe-7275-57f7-4bc4-a4b8169c91b6%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to