aboutsummaryrefslogtreecommitdiff
path: root/tasks/alpine.yml
blob: 763d74f6f962e88590f6601667ec147a9535b13a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- name: Install Nginx
  apk:
    name: nginx
- name: Install Runit service directory
  file:
    state: directory
    path: /etc/sv/nginx
    mode: '0755'
- name: Install Runit service command
  copy:
    content: |
      #!/bin/sh
      mkdir -p /run/nginx
      exec nginx -g 'daemon off;'
    dest: /etc/sv/nginx/run
    mode: '755'
- name: Install supervise symlink
  file:
    state: link
    force: yes
    src: /run/supervise.nginx
    dest: /etc/sv/nginx/supervise
    follow: false
- name: 'Enable Nginx'
  file:
    src: /etc/sv/nginx
    dest: /var/service/nginx
    owner: root
    group: root
    state: link