Comments (9)
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.
@tux-o-matic ansible-core
2.14 is not supported and no longer receives bug fixes. Please test against one of the supported versions of ansible-core
, preferably the most recent one, to see whether the bug has been fixed.
from ansible.
Problem is still present in newer Ansible.
ansible [core 2.17.0]
config file = None
configured module search path = ['/Users/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/xxx/Library/Python/3.11/lib/python/site-packages/ansible
ansible collection location = /Users/xxx/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/xxx/Library/Python/3.11/bin/ansible
python version = 3.11.9 (main, Apr 4 2024, 13:30:03) [Clang 15.0.0 (clang-1500.3.9.4)] (/Users/xxx/macports/bin/python3.11)
jinja version = 3.1.2
libyaml = True
from ansible.
The generator issue is not the same as the service itself, the service is running and enabled, the generator error seems to be an aside. As such the module is reporting correctly about the service itself, since the generator failure does not seem to affect it directly, i believe the status shown is correct. The action is scoped towards managing the services themselves, not generators, not timers, nor anything else.
I'm not against adding this information as a warning, which seems to be what systemd is doing. But, I don't know if the way we interface with systemd even produces this output.
from ansible.
If I list the enabled services in systemd, the services created via generators and “enabled” in Ansible do not show up. So Ansible says one thing but the target host gives no proof that the service is enabled.
The RHEL documentation for Podman and systemd mentions that the generated unit file needs to be copied to /etc/systemd/system in order to enable the service.
from ansible.
generators are not services, they are helpers, mostly there to get the prerequisites for services, like mounting drives.
from ansible.
@bcoca, the issue isn't so much about generators but about Ansible not reporting an error and giving an incorrect feedback about the state of a systemd service. Yes in the case the systemd unit file was produced by a generator but if systemctl
says something, Ansible should say the same thing.
from ansible.
So, our is-enabled
check takes generated
and transient
as 'valid enabled state', this will result in an 'OK' as there is no need to change to enable such service. The module never gets to the point of trying to enable a generated service, this seems correct behavior.
valid_enabled_states = [
"enabled",
"enabled-runtime",
"linked",
"linked-runtime",
"masked",
"masked-runtime",
"static",
"indirect",
"disabled",
"generated",
"transient"]
from ansible.
It seems somebody also asked to have that aspect clarified on systemd.
Having for example:
[Install]
WantedBy=multi-user.target default.target
Will lead generator to create a symlink in /run/systemd/generator/default.target.wants/
.
But that is not reflected in generated
and generated
doesn't guarantee that a link workaround was implemented.
from ansible.
Related Issues (20)
- 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
- 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
- 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
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.