Add Solaris configuration

- add Solaris os family to main role definition
- add Solaris setup file
- add Solaris configuration
This commit is contained in:
liquidat 2015-12-29 22:03:26 +01:00
parent 18099303cd
commit d472d0881d
3 changed files with 28 additions and 0 deletions

View file

@ -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

View file

@ -15,6 +15,9 @@
- include: setup-Debian.yml - include: setup-Debian.yml
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
- include: setup-Solaris.yml
when: ansible_os_family == 'Solaris'
# Figure out what version of Apache is installed. # Figure out what version of Apache is installed.
- name: Get installed version of Apache. - name: Get installed version of Apache.
shell: "{{ apache_daemon_path }}{{ apache_daemon }} -v" shell: "{{ apache_daemon_path }}{{ apache_daemon }} -v"

6
tasks/setup-Solaris.yml Normal file
View file

@ -0,0 +1,6 @@
---
- name: Ensure Apache is installed.
pkg5:
name: "{{ item }}"
state: installed
with_items: apache_packages