mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
73 lines
No EOL
2.1 KiB
JSON
73 lines
No EOL
2.1 KiB
JSON
{
|
|
"description": [
|
|
"Controls services on remote hosts."
|
|
],
|
|
"module": "service",
|
|
"examples": [
|
|
{
|
|
"code": "service name=httpd state=started",
|
|
"description": "Example action from Ansible Playbooks"
|
|
},
|
|
{
|
|
"code": "service name=httpd state=stopped",
|
|
"description": "Example action from Ansible Playbooks"
|
|
},
|
|
{
|
|
"code": "service name=httpd state=restarted",
|
|
"description": "Example action from Ansible Playbooks"
|
|
},
|
|
{
|
|
"code": "service name=httpd state=reloaded",
|
|
"description": "Example action from Ansible Playbooks"
|
|
},
|
|
{
|
|
"code": "service name=foo pattern=/usr/bin/foo state=started",
|
|
"description": "Example action from Ansible Playbooks"
|
|
}
|
|
],
|
|
"docuri": "service",
|
|
"author": "Michael DeHaan",
|
|
"filename": "library/service",
|
|
"version_added": 0.1,
|
|
"short_description": "Manage services.",
|
|
"now_date": "2012-10-09",
|
|
"options": {
|
|
"pattern": {
|
|
"required": false,
|
|
"description": [
|
|
"If the service does not respond to the status command, name a substring to look for as would be found in the output of the I(ps) command as a stand-in for a status result. If the string is found, the service will be assumed to be running."
|
|
],
|
|
"version_added": "0.7"
|
|
},
|
|
"state": {
|
|
"required": false,
|
|
"description": [
|
|
"I(started), I(stopped), I(reloaded), I(restarted). I(Started)/I(stopped) are idempotent actions that will not run commands unless necessary. I(restarted) will always bounce the service. I(reloaded) will always reload."
|
|
],
|
|
"choices": [
|
|
"running",
|
|
"started",
|
|
"stopped",
|
|
"restarted",
|
|
"reloaded"
|
|
]
|
|
},
|
|
"enabled": {
|
|
"required": false,
|
|
"description": [
|
|
"Whether the service should start on boot."
|
|
],
|
|
"choices": [
|
|
"yes",
|
|
"no"
|
|
]
|
|
},
|
|
"name": {
|
|
"required": true,
|
|
"description": [
|
|
"Name of the service."
|
|
]
|
|
}
|
|
},
|
|
"ansible_version": "0.8"
|
|
} |