Replies: 1 comment 2 replies
-
Can't reproduce using ~$ ansible-lint --version
ansible-lint 24.2.1 using ansible-core:2.16.5 ansible-compat:4.1.11 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.8
~$ cat test.yml
---
- name: Testing
hosts: localhost
any_errors_fatal: true
gather_facts: false
tasks:
- name: Set multiuser
ansible.builtin.command:
cmd: systemctl set-default graphical.target
register: set_default
changed_when: set_default.rc == 0
~$ ansible-lint test.yml
Passed: 0 failure(s), 0 warning(s) on 1 files. Last profile that met the validation criteria was 'production'. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Three years ago this pull request was merged: #1544. It was supposed to allow the use of
'systemctl': ['set-default', 'show-environment']
, etc. since the systemd module does not have that functionality. However, when I run ansible-lint against my playbook it's still flagging that with the message: command-instead-of-module: systemctl used in place of systemd module. Has that change been removed and the functionality added to the systemd module? What is the recommended way to determine the default runlevel and to set it to the desired, e.g.systemctl set-default multi-user
?Beta Was this translation helpful? Give feedback.
All reactions