https://github.com/moshloop/ansible-systemd-module
https://github.com/moshloop/ansible-systemd-module
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/moshloop/ansible-systemd-module
- Owner: moshloop
- Created: 2018-06-17T16:44:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-29T10:21:26.000Z (almost 8 years ago)
- Last Synced: 2024-12-28T20:26:31.424Z (over 1 year ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Ansible Role for creating systemd services, for managing existing services use the built-in [systemd](https://docs.ansible.com/ansible/latest/modules/systemd_module.html) module.
### Install
```bash
ansible-galaxy ansible-galaxy install moshloop.systemd
```
### Options
```
OPTIONS (= is mandatory):
= ExecStart
= Name
- Description
- InstallArgs
- RestartOn [Default: on-failure]
- RunAs [Default: root]
- ServiceArgs
- UnitArgs
- WantedBy [Default: multi-user.target]
- state (Choices: present, absent)[Default: present]
```
### EXAMPLES:
```yaml
- hosts: all
roles:
- moshloop.systemd
tasks:
- systemd_service:
Name: test
ExecStart: "/usr/bin/nc -l 200"
- systemd_service:
Name: test
ExecStart: "/usr/bin/nc -l 200"
UnitArgs:
After: networking.service
```