community / community.general / 8.5.0 / module / simpleinit_msb Manage services on Source Mage GNU/Linux | "added in version" 7.5.0 of community.general" Authors: Vlad Glagolev (@vaygr)community.general.simpleinit_msb (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
Controls services on remote hosts using C(simpleinit-msb).
- 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
name: aliases: - service description: - Name of the service. required: true type: str state: choices: - running - started - stopped - restarted - reloaded description: - V(started)/V(stopped) are idempotent actions that will not run commands unless necessary. V(restarted) will always bounce the service. V(reloaded) will always reload. - At least one of O(state) and O(enabled) are required. - Note that V(reloaded) will start the service if it is not already started, even if your chosen init system would not normally. required: false type: str enabled: description: - Whether the service should start on boot. - At least one of O(state) and O(enabled) are required. required: false type: bool