diff --git a/tasks/configure-Solaris.yml b/tasks/configure-Solaris.yml new file mode 100644 index 0000000..695a9cf --- /dev/null +++ b/tasks/configure-Solaris.yml @@ -0,0 +1,19 @@ +--- +- name: Configure Apache. + lineinfile: + dest: "{{ apache_server_root }}/conf/{{ apache_daemon }}.conf" + regexp: "{{ item.regexp }}" + line: "{{ item.line }}" + state: present + with_items: apache_ports_configuration_items + notify: restart apache + +- name: Add apache vhosts configuration. + template: + src: "vhosts-{{ apache_vhosts_version }}.conf.j2" + dest: "{{ apache_conf_path }}/{{ apache_vhosts_filename }}" + owner: root + group: root + mode: 0644 + notify: restart apache + when: apache_create_vhosts diff --git a/tasks/main.yml b/tasks/main.yml index 8fb7caa..1b712c0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -15,6 +15,9 @@ - include: setup-Debian.yml when: ansible_os_family == 'Debian' +- include: setup-Solaris.yml + when: ansible_os_family == 'Solaris' + # Figure out what version of Apache is installed. - name: Get installed version of Apache. shell: "{{ apache_daemon_path }}{{ apache_daemon }} -v" diff --git a/tasks/setup-Solaris.yml b/tasks/setup-Solaris.yml new file mode 100644 index 0000000..185470a --- /dev/null +++ b/tasks/setup-Solaris.yml @@ -0,0 +1,6 @@ +--- +- name: Ensure Apache is installed. + pkg5: + name: "{{ item }}" + state: installed + with_items: apache_packages