blob: 194f19827d9ff5a76cfcd0ded33c5a3a1de7c0f1 (
plain) (
tree)
|
|
---
- name: create static sites directories
ansible.builtin.file:
path: "{{ httpd_pre__sites_dir }}/{{ item.domain }}"
state: directory
owner: "{{ httpd_pre__user }}"
group: "{{ httpd_pre__group }}"
mode: "0755"
loop: "{{ httpd__rules }}"
when: item.extra.type is defined and item.extra.type == "static"
- name: retrieve all configuration files
ansible.builtin.find:
path: "{{ httpd_pre__configuration_dir }}"
patterns: "*.conf"
register: httpd__configuration_files
- name: generate httpd configuration
ansible.builtin.template:
src: httpd.conf.j2
dest: "{{ httpd_pre__configuration_file }}"
owner: 0
group: 0
mode: "0644"
- name: enable and restart httpd
ansible.builtin.service:
name: httpd
state: restarted
enabled: true
|