Comments (5)
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.
Hi!
Thanks very much for your submission to Ansible. It means a lot to us that you've taken time to contribute.
Unfortunately, we're not sure if we want this feature in the program, and I don't want this to seem confrontational.
Our reasons for this are:
- You could use a variable for hosts. There are various ways it can be set, including through set_fact in a previous play, or using vars on the task that imports the playbook.
- For cases where import_playbook doesn't provide the options needed, you can invoke ansible-playbook as a task instead.
However, we're absolutely always up for discussion.
Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below:
In the future, sometimes starting a discussion on the development list prior to implementing
a feature can make getting things included a little easier, but it's not always necessary.
Thank you once again for this and your interest in Ansible!
from ansible.
I have a playbook for deploying all web servers, but normally I don't want to deploy them all at the same time. That's why I always use a limit with -l such as ansible-playbook webserver.yml -l dev so that only the dev servers are deployed.
@RayJin2000 since you mention using --limit
, setting hosts
to something like "{{ ansible_limit | default(yourdefault) }}"
might be a good option. https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html#term-ansible_limit
from ansible.
@s-hertel you mean i can do this:
- import_playbook: databases.yml
vars:
ansible_limit: prod
from ansible.
no, ansilbe_limit
is not 'settable' , it always reflects the command line
you can have the databases.yml:
- hosts: ' {{ target| default("all") }}'
...
and then
- import_playbook: databases.yml
vars:
target: prod
from ansible.
Related Issues (20)
- rpm_key module does nothing if it finds a partial match of already installed keys HOT 4
- Python 3.7 Support Removed To Early? HOT 6
- Avoid doing ssh connection if _remote_expand_user already failed HOT 2
- ansible.builtin.dnf doesn't install i686 packages HOT 1
- [ansible.builtin.copy] Fails on filesystems which do not support chmod HOT 7
- if ansible.builtin.fileglob plugin is used in ansible.builtin.template, it searches under files/ HOT 1
- Warnings about discovered Python interpreter on any play in version 2.17.0 HOT 3
- Regression with ansible_pkg_mgr discovery on Amazon Linux 2 HOT 9
- `file`: incomplete diff when creating parent directories HOT 1
- `file`: incomplete/misleading/missing diff when recursively setting attributes HOT 1
- systemd module silently fails to enable generated serviced unit HOT 9
- Add ability to break out of loop on a task HOT 2
- This breaks the ability to update RHEL-7 machines HOT 2
- `meta: end_host` returns `rc=2` when run in a rescue block HOT 1
- ansible.builtin.tempfile state:absent error HOT 5
- File descriptor leak in lib/ansible/plugins/connection/ssh.py HOT 3
- ansible.builtin.get_url doesn't support redirects HOT 3
- `unarchive`: Using the `include` option fails with `.tar.xz` archive HOT 3
- service_facts module on OpenBSD does not support '=' within service variables (too many values to unpack (expected 2)) HOT 2
- remote_user used with a loop results in fatal "item is undefined" 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.