From d472d0881d424e0e377e5294d7d8caf0376f5054 Mon Sep 17 00:00:00 2001 From: liquidat Date: Tue, 29 Dec 2015 22:03:26 +0100 Subject: [PATCH] Add Solaris configuration - add Solaris os family to main role definition - add Solaris setup file - add Solaris configuration --- tasks/configure-Solaris.yml | 19 +++++++++++++++++++ tasks/main.yml | 3 +++ tasks/setup-Solaris.yml | 6 ++++++ 3 files changed, 28 insertions(+) create mode 100644 tasks/configure-Solaris.yml create mode 100644 tasks/setup-Solaris.yml 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