https://github.com/editd/ansible-supervisor_task
A role for creating supervisor tasks.
https://github.com/editd/ansible-supervisor_task
Last synced: about 1 year ago
JSON representation
A role for creating supervisor tasks.
- Host: GitHub
- URL: https://github.com/editd/ansible-supervisor_task
- Owner: EDITD
- License: mit
- Created: 2014-02-26T13:44:28.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T20:03:24.000Z (over 6 years ago)
- Last Synced: 2025-05-07T10:44:26.786Z (over 1 year ago)
- Size: 26.4 KB
- Stars: 8
- Watchers: 18
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-supervisor_task
A role for creating supervisor tasks.
## Actions
- Ensures that supervisor is installed (using `apt`)
- Creates a task in the supervisor conf directory.
## Usage:
```
roles:
- role: EDITD.supervisor_task
name: webserver
command: python -m SimpleHTTPServer
directory: /opt/web
user: ubuntu
stopsignal: HUP
```
### Restarting tasks:
By default, the role will restart the task on each run, which you could skip like so:
```
roles:
- role: EDITD.supervisor_task
name: webserver
command: python -m SimpleHTTPServer
directory: /opt/web
user: ubuntu
restart_task: no
```
Or if you want to restart a uwsgi process gracefully you could do something like this:
```
roles:
- role: EDITD.supervisor_task
name: webserver
command: uwsgi --ini /path/to/you/conf
user: ubuntu
restart_task: no
restart_signal: HUP
restart_pidfile: /path/to/pid/file/defined/in/conf
```
### Removing a task
To ensure that a task is not present, you can use `state: absent`
```
roles:
- role: EDITD.supervisor_task
name: webserver
state: absent
```
## License
MIT