Hi,
we are working on some playbooks that will deploy Maven artifacts (*.tar,
*.zip) to our target environments.
Due to the fact the target environment cannot directly access the Nexus
Server (artifact repository) we need first to download them onto the
control-machine
- and copy/ synchronize from there to the target servers.
When we implement the "download from Nexus" as just a simple task (inside a
role) - it would be executed for each host when the playbook is run.
for( host : hosts )
{
task: download
task: copy to host
task: install to host
}
Is there any way to execute "run only once" tasks, before looping over all
hosts is executed ?
pre-task: download
for( host : hosts )
{
task: copy to host
task: install to host
}
Some kind of "hook" where we can put preparation tasks ?
Thanx for any hints,
Torsten
--
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/1c8a50dc-1d2d-4533-903a-54570a935014%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.