ansible-role-djangoapp/README.md

67 lines
1.9 KiB
Markdown
Raw Normal View History

2020-09-10 22:31:09 +00:00
Role Name
=========
2020-09-10 23:08:02 +00:00
This role installs IM: https://gitea.caret.be/jens/im
2020-09-10 22:31:09 +00:00
Requirements
------------
2020-09-10 23:08:02 +00:00
This role requires a database server to to be present where im can connect to
2020-09-10 22:31:09 +00:00
Role Variables
--------------
2020-09-12 00:15:11 +00:00
- `im_admin_password`: required, password for 'admin' user for im
2020-09-10 23:08:02 +00:00
- `im_secret_key`: optional Secret Key for Django app, defaults to random 56char string recreated on every run (This will invalidated current open sessions)
2020-09-10 23:16:22 +00:00
- `im_user`: user running the app, defaults to 'im' (this user will be created)
- `im_home`: path to install the im app in, defaults to /home/im (this path will be created)
2020-09-10 23:08:02 +00:00
- `im_domain`: the domain this app will run on (Needed for django's ALLOWED_HOSTS), default localhost
- `im_db_name`: database name, defaults to 'im'
- `im_db_user`: database user, defaults to 'im'
- `im_db_password`: database password, defaults to '', (ignored for unix socket connection)
- `im_db_host`: database server, defaults to '/run/postgresql/' for local unix socket connection
- `im_db_port`: database port, defaults to 5432 (ignored for unix socket connection)
2020-09-10 23:38:28 +00:00
- `im_workers`: the number of gunicorn http worker threads (defaults to 4)
- `im_http_listen`: the ip address to bind to, change this to ip address of the host if you use a reverse proxy on a different host, defaults to localhost
- `im_http_port`: the http port to bind to, defaults to 80
2020-09-10 22:31:09 +00:00
Dependencies
------------
2020-09-10 23:08:02 +00:00
None
2020-09-10 22:31:09 +00:00
Example Playbook
----------------
2020-09-10 23:08:02 +00:00
```yaml
- name: "Install im pantry app"
hosts: im
roles:
- ansible-role-im
vars:
2020-09-12 00:15:11 +00:00
- im_domain: "im.example.com"
2020-09-10 23:38:28 +00:00
- im_http_listen: "{{inventory_hostname}}"
2020-09-12 00:15:11 +00:00
- im_admin_password: "test"
2020-09-10 23:08:02 +00:00
```
2020-09-10 22:31:09 +00:00
2020-09-10 23:38:28 +00:00
```yaml
- name: "Install im pantry app"
hosts: im
roles:
- ansible-role-im
vars:
2020-09-12 00:15:11 +00:00
- im_domain: "im.example.com"
2020-09-10 23:38:28 +00:00
- im_http_listen: "192.168.1.112"
```
2020-09-10 22:31:09 +00:00
License
-------
2020-09-10 23:08:02 +00:00
GPL-v3
2020-09-10 22:31:09 +00:00
Author Information
------------------
2020-09-10 23:08:02 +00:00
Jens (gitea.caret.be)