Commit fa0c1ed1 authored by Pietsch, Martin's avatar Pietsch, Martin

redesign role

parent 533e7c1e
---
- name: copy lighttpd configuration
template:
src: "{{ system_config_directory }}/lighttpd/lighttpd.conf"
dest: "{{ lighttpd_configfile }}"
owner: root
group: wheel
mode: 0644
- name: start lighttpd
service:
name: "{{ _service }}"
state: started
loop: "{{ package_services[os.distribution | lower()] }}"
loop_control:
loop_var: _service
register: _lighttpd_started
- name: reload lighttpd
service:
name: "{{ _service }}"
state: started
loop: "{{ package_services[os.distribution | lower()] }}"
loop_control:
loop_var: _service
when: _lighttpd_started.changed == False
......@@ -4,26 +4,11 @@
import_role:
name: package
- name: copy lighttpd configuration
template:
src: lighttpd.conf.j2
dest: "{{ lighttpd_configfile }}"
owner: root
group: wheel
mode: 0644
- name: create lighttpd data directory
file:
path: "{{ lighttpd_datadirectory }}"
state: directory
mode: 0755
- name: start lighttpd
service:
name: "{{ _service }}"
state: started
loop: "{{ package_services[os.distribution | lower()] }}"
loop_control:
loop_var: _service
- include_tasks: configure
---
lighttpd_datadirectory: "/var/www"
lighttpd_configfile: "/usr/local/etc/lighttpd/lighttpd.conf"
lighttpd_configfile: "lighttpd.conf.j2"
package_packages: {
"freebsd": ["lighttpd"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment