fixes
This commit is contained in:
parent
e3aaa24f32
commit
30f7325323
15
README.md
15
README.md
|
@ -20,6 +20,9 @@ Role Variables
|
|||
- `im_db_password`: database password (optional)
|
||||
- `im_db_host`: database server, defaults to 'localhost'
|
||||
- `im_db_port`: database port, defaults to 5432
|
||||
- `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
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
@ -35,8 +38,20 @@ Example Playbook
|
|||
- ansible-role-im
|
||||
vars:
|
||||
- im_domain: "im.caret.be"
|
||||
- im_http_listen: "{{inventory_hostname}}"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: "Install im pantry app"
|
||||
hosts: im
|
||||
roles:
|
||||
- ansible-role-im
|
||||
vars:
|
||||
- im_domain: "im.caret.be"
|
||||
- im_http_listen: "192.168.1.112"
|
||||
```
|
||||
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
|
|
@ -20,17 +20,19 @@
|
|||
- name: 'download latest im stable'
|
||||
get_url:
|
||||
url: https://gitea.caret.be/jens/im/archive/main.tar.gz
|
||||
dest: /tmp/im-latest.tar.gz
|
||||
owner: root
|
||||
group: root
|
||||
dest: "{{im_home}}/im-latest.tar.gz"
|
||||
owner: im
|
||||
group: im
|
||||
mode: '0400'
|
||||
force: true
|
||||
|
||||
- name: 'unarchive latest im stable'
|
||||
unarchive:
|
||||
src: /tmp/im-latest.tar.gz
|
||||
dest: /home/im/
|
||||
notify: "restart im"
|
||||
remote_src: "{{im_home}}/im-latest.tar.gz"
|
||||
dest: "{{ im_home }}"
|
||||
owner: im
|
||||
group: im
|
||||
notify: "Restart im"
|
||||
|
||||
- name: "Setup systemd service"
|
||||
template:
|
||||
|
|
|
@ -3,8 +3,8 @@ Description=im pantry inventory management server trought gunicorn
|
|||
After=network.target
|
||||
|
||||
[Service]
|
||||
User={{ gitea_user }}
|
||||
WorkingDirectory={{ gitea_home }}
|
||||
User={{ im_user }}
|
||||
WorkingDirectory={{ im_home }}
|
||||
ExecStart=/usr/local/bin/gunicorn --workers {{im_workers}} --bind {{ im_http_listen }}:{{ im_http_port }} im.wsgi:application
|
||||
Restart=on-failure
|
||||
|
||||
|
|
|
@ -8,5 +8,6 @@ im_db_user: 'im'
|
|||
im_user: 'im'
|
||||
im_db_server: 'localhost'
|
||||
im_db_port: '5432'
|
||||
|
||||
|
||||
im_workers: 4
|
||||
im_http_listen: 'localhost'
|
||||
im_http_port: 80
|
||||
|
|
Loading…
Reference in New Issue