- name: Create symlink elgg.conf from sites-enabled to sites-available (debuntu, not nec for redhat) file: src: /etc/apache2/sites-available/elgg.conf path: /etc/apache2/sites-enabled/elgg.conf state: link when: elgg_enabled and is_debuntu - name: Remove symlink /etc/apache2/sites-enabled/elgg.conf (debuntu) file: path: /etc/apache2/sites-enabled/elgg.conf state: absent when: not elgg_enabled and is_debuntu - name: Remove Apache's elgg.conf (redhat) file: dest: "/etc/{{ apache_config_dir }}/elgg.conf" state: absent when: not elgg_enabled and is_redhat - name: Restart Apache ({{ apache_service }}) to enable/disable http://box/elgg service: name: "{{ apache_service }}" state: restarted - name: Add 'elgg' variable values to {{ iiab_ini_file }} ini_file: path: "{{ iiab_ini_file }}" section: elgg option: "{{ item.option }}" value: "{{ item.value | string }}" with_items: - option: name value: Elgg - option: description value: '"Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications."' - option: path value: /opt/elgg - option: elgg_enabled value: "{{ elgg_enabled }}"