configure.yml 658 Bytes
Newer Older
Pietsch, Martin's avatar
Pietsch, Martin committed
1 2
---

Pietsch, Martin's avatar
Pietsch, Martin committed
3 4
- name: copy lighttpd configuration
  template:
5 6
    src: "{{ lighttpd_configfile }}"
    dest: "{{ system_config_directory }}/lighttpd/lighttpd.conf"
Pietsch, Martin's avatar
Pietsch, Martin committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    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