aboutsummaryrefslogtreecommitdiffstats
path: root/roles/obsd_httpd/tasks/main.yml
blob: ef0fd410f4bc7a7ed3832a038e3b407a49c402cb (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: Create httpd conf include directory
  ansible.builtin.file:
    path: "{{ obsd_httpd_conf_d }}"
    state: directory
    owner: root
    group: wheel
    mode: "0755"

- name: Deploy httpd.conf
  ansible.builtin.template:
    src: httpd.conf.j2
    dest: /etc/httpd.conf
    owner: root
    group: wheel
    mode: "0600"

- name: Ensure all registered httpd fragment files exist
  ansible.builtin.copy:
    content: ""
    dest: "{{ obsd_httpd_conf_d }}/{{ item }}"
    force: false # If it already exists, don't overwrite it.
    owner: root
    group: wheel
    mode: "0644"
  loop: "{{ obsd_httpd_fragments }}"

- name: Enable httpd
  ansible.builtin.service:
    name: httpd
    enabled: true