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 @@ ...@@ -4,26 +4,11 @@
import_role: import_role:
name: package 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 - name: create lighttpd data directory
file: file:
path: "{{ lighttpd_datadirectory }}" path: "{{ lighttpd_datadirectory }}"
state: directory state: directory
mode: 0755 mode: 0755
- name: start lighttpd - include_tasks: configure
service:
name: "{{ _service }}"
state: started
loop: "{{ package_services[os.distribution | lower()] }}"
loop_control:
loop_var: _service
--- ---
lighttpd_datadirectory: "/var/www" lighttpd_datadirectory: "/var/www"
lighttpd_configfile: "/usr/local/etc/lighttpd/lighttpd.conf" lighttpd_configfile: "lighttpd.conf.j2"
package_packages: { package_packages: {
"freebsd": ["lighttpd"] "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