mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
let the enduser name the service
This commit is contained in:
parent
f783caf5dd
commit
8936d019d1
1 changed files with 3 additions and 7 deletions
|
@ -73,18 +73,14 @@
|
||||||
- uwsgi_params
|
- uwsgi_params
|
||||||
- win-utf
|
- win-utf
|
||||||
|
|
||||||
- name: Alter systemd_unit_name to be iiab-nginx.service from nginx.service
|
|
||||||
set_fact:
|
|
||||||
systemd_unit_name: iiab-nginx
|
|
||||||
|
|
||||||
- name: Grab stock unit file
|
- name: Grab stock unit file
|
||||||
copy:
|
copy:
|
||||||
force: yes
|
force: yes
|
||||||
src: /lib/systemd/system/nginx.service
|
src: /lib/systemd/system/nginx.service
|
||||||
dest: /etc/systemd/system/"{{ systemd_unit_name }}".service
|
dest: /etc/systemd/system/{{ systemd_unit_name }}.service
|
||||||
|
|
||||||
- name: shove {{ nginx_dir }}/nginx.conf into unit file
|
- name: shove {{ nginx_dir }}/nginx.conf into unit file
|
||||||
command: sed -i 's|/usr/sbin/nginx|/usr/sbin/nginx -c {{ nginx_dir }}/nginx.conf|' /etc/systemd/system/iiab-nginx.service
|
command: sed -i 's|/usr/sbin/nginx|/usr/sbin/nginx -c {{ nginx_dir }}/nginx.conf|' /etc/systemd/system/{{ systemd_unit_name }}.service
|
||||||
# lineinfile:
|
# lineinfile:
|
||||||
# path: /etc/systemd/system/nginx.service
|
# path: /etc/systemd/system/nginx.service
|
||||||
# state: present
|
# state: present
|
||||||
|
@ -96,7 +92,7 @@
|
||||||
# - { regexp: '^ExecReload=/usr/sbin/nginx', line: 'ExecReload=/usr/sbin/nginx -c {{ nginx_dir }}/nginx.conf' }
|
# - { regexp: '^ExecReload=/usr/sbin/nginx', line: 'ExecReload=/usr/sbin/nginx -c {{ nginx_dir }}/nginx.conf' }
|
||||||
|
|
||||||
# end block
|
# end block
|
||||||
when: nginx_port|int != 80 or nginx_dir != "/etc/nginx"
|
when: systemd_unit_name != "nginx" or nginx_dir != "/etc/nginx"
|
||||||
|
|
||||||
- name: 'Install 3 (of 5) files from template: /etc/nginx/server.conf, /etc/nginx/nginx.conf, /etc/nginx/mime.types'
|
- name: 'Install 3 (of 5) files from template: /etc/nginx/server.conf, /etc/nginx/nginx.conf, /etc/nginx/mime.types'
|
||||||
template:
|
template:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue