forked from openstack/ansible-role-systemd_service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Id0de75860060474ce470bcf17b4204fa0604c29d
- Loading branch information
Dmitriy Rabotyagov
committed
Dec 6, 2021
1 parent
9d14e19
commit 74a2cdd
Showing
2 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,27 @@ | ||
.. code-block:: yaml | ||
--- | ||
|
||
- name: Create a systemd unit file for ServiceX | ||
hosts: localhost | ||
become: true | ||
roles: | ||
- role: "systemd_service" | ||
systemd_services: | ||
- service_name: ServiceX | ||
config_overrides: {} | ||
- name: Create a systemd unit file for ServiceX | ||
hosts: localhost | ||
become: true | ||
roles: | ||
- role: "systemd_service" | ||
systemd_services: | ||
- service_name: "test oneshot service1" | ||
config_overrides: | ||
Unit: | ||
Description: Test oneshot service | ||
After: network-online.target | ||
Wants: network-online.target | ||
Service: | ||
RemainAfterExit: yes | ||
service_type: oneshot | ||
execstarts: | ||
- "/bin/bash -c 'echo start1'" | ||
- "/bin/bash -c 'echo start2'" | ||
execstops: | ||
- "/bin/bash -c 'echo stop1'" | ||
- "/bin/bash -c 'echo stop2'" | ||
enabled: yes | ||
state: started | ||
systemd_tempd_prefix: openstack | ||
systemd_lock_path: /var/lock/networking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters