Commit Graph

14 Commits (3076478892735bd33fd79c14acf3635d004f859f)

Author SHA1 Message Date
David Greaves 3076478892
Extend systemctl is-enabled check to handle "enabled-runtime" too. (#77754)
In general the existence of a runtime-enabled unit should not prevent
a persistent enable being set.

Specifically this handles the case where there is an entry in fstab
for a mount point (which is retained to allow manual mount/umount to
take place) and yet a systemd mount unit needs to be deployed to
handle other unit options. There will be a generator-created unit file
which shows the unit as enabled-runtime and the persistent enable of
the mount unit will fail.

Additionally improve the comments and modify the code to use rsplit()
and the "in" notation since "systemctl is-enabled" is documented to
return specific values in the cases of interest.

---------

Signed-off-by: David Greaves <david@dgreaves.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 months ago
Abhijeet Kasurde bcaae4c435
systemd_service: Update docs regarding required_* (#82917)
* Update the documentation regarding required_one_of and required_by
  in systemd_service

Fixes: #82914

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 months ago
Matt Clay 9f899f9492
Require `from __future__ import annotations` (#81902) 8 months ago
Abhijeet Kasurde 55f27a579e
systemd_service: add a note about module rename (#81803)
* The module systemd is renamed to systemd_service to maintain
  the scope of the module. Mention this in the module description.
* Misc typo fixes.

Fixes: #80917

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
9 months ago
Sverre H. Huseby a2d9c4d62f
docs: Update examples in systemd_service to use the new name (#81518) 10 months ago
pippo571 5dbcf47e02
Add documentation for systemd reload (#81473)
* Add documentation for systemd reload
10 months ago
Felix Fontein 3e3fb26b35
Use semantic markup for modules. (#81190) 11 months ago
Abhijeet Kasurde cf803d6d58
Improved return docs (#81006)
* Improved the return docs for modules `sysvinit`
  and `systemd_service`

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Matt Clay 2cd1744be3
Use ansible.module_utils.common.text.converters (#80704)
Replace use of old `ansible.module_utils._text` and add a unit test to maintain backwards compatibility.
1 year ago
Brian Coca 9ca863501c
note in systemd that systemctl can change behaviour due to diff order… (#80570) 1 year ago
Matt Clay 716631189c
Fix "pointless" strings detected by pylint (#79943)
Convert these strings to comments, since they are not valid docstrings.
1 year ago
Hofer-Julian b756a08d89
Truthy value should be one of false or true (#79730)
Otherwise ansible-lint complains: https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.truthy
1 year ago
Olaf Klischat 32c5793de5
systemd: ignore errors in daemon_reload and daemon_reexec when running in a chroot or with $SYSTEMD_OFFLINE==1 (#79643)
Signed-off-by: Olaf Klischat <olaf.klischat@gmail.com>
1 year ago
Brian Coca 4706091a38
rename systemd module to services only (#77644)
* rename systemd module to services only

 disambiguates what it handles since systemd is now much more
 that a service manager, but the module is specific to services
2 years ago