ansible icon indicating copy to clipboard operation
ansible copied to clipboard

ansible.builtin.systemd_service should be able to link service

Open pglizniewicz opened this issue 1 year ago • 18 comments

Summary

I'm trying to use systemctl link via Ansible, but I don't see a relevant parameter in ansible.builtin.systemd_service. I need link for this case, because it's to "register" a service that can by either run manually or via a timer.

Issue Type

Feature Idea

Component Name

lib/ansible/modules/systemd_service.py

Additional Information

- name: Link my.service
  ansible.builtin.systemd_service:
    name: /usr/local/lib/mystuff/my.service
    linked: true

linked: false should work like enabled: false.

Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

pglizniewicz avatar Dec 03 '24 13:12 pglizniewicz

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.

ansibot avatar Dec 03 '24 13:12 ansibot

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:

  • This module is intended to manage the state of services, not the creation of services.
  • You can use the file module to create the service.

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!

s-hertel avatar Dec 10 '24 15:12 s-hertel