Note
This module is part of the community.general collection (version 10.7.3).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.simpleinit_msb.
New in community.general 7.5.0
simpleinit-msb.Parameter | Comments |
|---|---|
enabled boolean | |
name aliases: service string / required | Name of the service. |
state string |
At least one of Note that Choices:
|
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
Note
- name: Example action to start service httpd, if not running
community.general.simpleinit_msb:
name: httpd
state: started
- name: Example action to stop service httpd, if running
community.general.simpleinit_msb:
name: httpd
state: stopped
- name: Example action to restart service httpd, in all cases
community.general.simpleinit_msb:
name: httpd
state: restarted
- name: Example action to reload service httpd, in all cases
community.general.simpleinit_msb:
name: httpd
state: reloaded
- name: Example action to enable service httpd, and not touch the running state
community.general.simpleinit_msb:
name: httpd
enabled: true
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/simpleinit_msb_module.html