Comments (4)
please show the -vvv
output of the error
from ansible.
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.
Also note that this fails the same way with this:
vars:
ansible_user: “{{ item.user }}”
from ansible.
Closing this as it is a duplicate of at least #16776. Sorry to be of any trouble. Thank you for reaching out @bcoca. This is working as designed, and I found a solution to my specific problem to accommodate existing org ansible structure (as in, within a task file called in a one-entry-point playbook:
# assume I have created a list of {user: some_user, host: some_host} dicts
- name: "use inventory to get mirror hosts"
ansible.builtin.add_host:
ansible_ssh_host: "{{ item.host }}"
ansible_ssh_user: "{{ item.user }}"
inventory_hostname: "{{ item.host }}"
groups: "mirror_hosts"
name: "{{ item.host }}"
loop:
"{{ mirror_config }}"
# run_once is called because this is a task in a playbook using N hosts
- name: "do something with group"
ansible.builtin.file:
path: "/home/{{ ansible_ssh_user }}/touchfile.txt"
state: "touch"
mode: "0644"
loop:
"{{ groups['mirror_hosts'] }}"
run_once: true
delegate_to: "{{ item }}"
A colleague also sent this to me this morning: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_delegation.html#templating-in-delegation-context
from ansible.
Related Issues (20)
- 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
- ansible_python_interpreter="/usr/bin/env python3" doesn't work anymore HOT 11
- User module trying to modify permissions in home directory after GID change (even when setting home: false) HOT 4
- Handlers use only last role variable when flushed in multiple role executions. HOT 9
- nmcli "invalid or not allowed setting 'ipv4'" when running the playbook the 2nd time HOT 1
- Applying module defaults groups on an action group containing deprecated modules trigger the deprecation notice of the said module, although it is never actually used HOT 3
- odd ssh error only affecting ansible HOT 2
- Gather more facts from `/etc/os-release` (`IMAGE_VERSION`, `IMAGE_ID`, `VARIANT_ID`, `ID_LIKE`) HOT 5
- [2.17][command] Failure in environment construction due to special characters in variable HOT 1
- When gathering package facts on an Alpine node where the apk cache is not populated, a warning is emitted and the package gathering returns no result HOT 2
- package_facts fails silently when the manager is left to auto HOT 5
- Jinja2 native causing pickling errors HOT 8
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.