Comments (4)
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the component bot command.
from ansible.
so, what you want is to insert an 'intermediate play'?
- hosts: normalplay
...
- hosts: localhost
gather_facts: false
tasks:
- dotheonethingonce:
...
- hosts: normalplay
...
from ansible.
Then I would have to split the role into 3 parts ? a role for the part before the download of the software, the actual download, and then a role for the part after the download. This is not feasible for us as we want to have one single role for each piece of software we want to deploy/configure. Splitting this role up would make it much more (user) error prone since it would be inconsistent to how all our other roles work.
Meanwhile I have found that it is solved by using include_tasks
instead of using import_tasks
for the download part (in the full role the download part was already a separate yaml file imported into main.yaml
using import_tasks
. Changing this to include_tasks
makes the tasks in that file run only on all active, not skipped targets, hence run_once
on the actual download is then executed on the first not skipped target.
But as include_tasks
doesn't support delegation and such, I had to bring that over to all tasks in the separate tasks file,
So I finally managed to work around the issue. But I still think it is undesirable behavior of run_once
to only try to execute the task on the first target in the list and not run at all if that target just so happens to be skipped.
Another thing I would like to see improved, and that would have prevented this problem from happening, is that if in a play a role has conditions, the targets that should skip the role, are removed from the list specifically for that role, so they just skip that role instead of skipping each individual task in the role. That would decrease the amount of logging Ansible generates here daily considerably. Not really a showstopper but that would, in my opinion, be a lot cleaner. (We also had problems with the amount of logging in earlier versions of AWX causing it to lose track of running tasks with too much logging and even tasks suddenly terminating due to it..., but luckily that seems to be solved in more recent versions)
from ansible.
Thank you very much for your interest in Ansible. We have no plans to implement this feature at this time. However we would review a pull request if anyone is interested in implementing the feature.
If you have further questions please stop by IRC or the mailing list:
- IRC: #ansible on irc.libera.chat
- mailing list: https://groups.google.com/forum/#!forum/ansible-project
from ansible.
Related Issues (20)
- Ensure callbacks can properly detect the connection plugin used for a task HOT 1
- rpm_key does not work with ftp:// URLs HOT 2
- no_log does not honor variable interpretation. HOT 13
- ansible-galaxy collection/role install should have a parameter to ignore ssl certs on collections/roles with scm via https but with self-signed certs. HOT 5
- Test failure with cowsay installed/present HOT 3
- [ec2_asg] fail when update tags inside ASG with KeyError; 'LaunchTemplate HOT 3
- (facts) include microarch in system facts HOT 1
- urlencode doesn't encode `/` HOT 2
- The user module does not have an inactive parameter. HOT 8
- Add feature for ansible-pull supports s3 HOT 3
- Using Linux service_facts.py on a Windows VM instead of windows module win_service_info HOT 2
- Connection Plugins With Extra's Not Handling FQCN's HOT 6
- Interpreter discovery broken for rhel 8 based distros on 2.17 HOT 18
- to_yaml / to_nice_yaml is not able to decrypt Vault password HOT 2
- ansible service_facts module returning failed loaded service on ubuntu 20.04 HOT 8
- In examples truthy value should be one of [false, true] HOT 3
- git module can "lose" local commits HOT 3
- Ansible Playbook failing with OSError when using copy module. Throwing error "Could not replace file: [Errno 2] No such file or directory" HOT 2
- import_playbook needs some kind of Host limit or filter HOT 3
- dnf5 wildcard regression HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible.