1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

add service pattern= parameter

This commit is contained in:
Michael DeHaan 2012-08-17 20:35:43 -04:00
parent f81f541354
commit 3b562aa367

View file

@ -14,12 +14,19 @@ Controls services on remote machines.
| | | | idempotent actions that will not run commands unless neccessary. | | | | | idempotent actions that will not run commands unless neccessary. |
| | | | 'restarted' will always bounce the service, 'reloaded' will always reload. | | | | | 'restarted' will always bounce the service, 'reloaded' will always reload. |
+--------------------+----------+---------+----------------------------------------------------------------------------+ +--------------------+----------+---------+----------------------------------------------------------------------------+
| pattern | no | | (new in 0.7) 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 'ps' |
| | | | command as a stand-in for a status result. If the string is found, the |
| | | | service will be assumed to be running. |
+--------------------+----------+---------+----------------------------------------------------------------------------+
| enabled | no | | Whether the service should start on boot. Either 'yes' or 'no'. | | enabled | no | | Whether the service should start on boot. Either 'yes' or 'no'. |
+--------------------+----------+---------+----------------------------------------------------------------------------+ +--------------------+----------+---------+----------------------------------------------------------------------------+
Example action from Ansible :doc:`playbooks`:: Example actions from Ansible :doc:`playbooks`::
service name=httpd state=started service name=httpd state=started
service name=httpd state=stopped service name=httpd state=stopped
service name=httpd state=restarted service name=httpd state=restarted
service name=httpd state=reloaded service name=httpd state=reloaded
service name=foo pattern=/usr/bin/foo state=started