mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
* change apache_data to apache_user in all * no libapach2 in centos. just php. no php-magick in centos * remove redundant vars entries * do not create apache user * missed one pound sign * soft code all references to apache_user * centos requires older setuptools * revert ansible_lsb.id in xsce.yml * try getting recent pip * move pip download to 2prep so that kalite success is not dependent on iiab coming first * still need to replace setuptools in kalite * add curl -- needed in debian * massivly substitue iiab for xsce, and rename files * completed runansible * centos fixes,install pip * appliance means no iptables rules * change to earlier version of setuptools for centos * delete file duplicate, hopefully unnecessary. generate the offline docs * wiki docs errors * create the admin group -- deleted earlier * use the --yes option with pip uninstall * base of repo moved from schoolserver to iiab, unleashkids.org->iiab.io * network detection broken due to tupo
151 lines
3.5 KiB
YAML
151 lines
3.5 KiB
YAML
- name: Install httpd required packages
|
|
package: name={{ item }}
|
|
state=present
|
|
with_items:
|
|
- apache2
|
|
- php5
|
|
- php5-curl
|
|
- php5-sqlite
|
|
tags:
|
|
- download
|
|
when: is_debian
|
|
|
|
- name: Install httpd required packages
|
|
package: name={{ item }}
|
|
state=present
|
|
with_items:
|
|
- apache2
|
|
- php
|
|
tags:
|
|
- download
|
|
when: is_ubuntu
|
|
|
|
- name: Install httpd required packages
|
|
package: name={{ item }}
|
|
state=present
|
|
with_items:
|
|
- httpd
|
|
- php
|
|
- php-curl
|
|
# - php-sqlite
|
|
tags:
|
|
- download
|
|
when: is_redhat
|
|
|
|
- name: remove the default apache2 config file
|
|
file: path=/etc/apache2/sites-enabled/000-default.conf
|
|
src=/etc/apache2/sites-available/000-default.conf
|
|
state=absent
|
|
when: is_debuntu
|
|
|
|
- name: Create httpd config files
|
|
template: backup=yes
|
|
src={{ item.src }}
|
|
dest={{ item.dest }}
|
|
owner=root
|
|
group=root
|
|
mode={{ item.mode }}
|
|
with_items:
|
|
- { src: '010-iiab.conf.j2' , dest: '/etc/{{ apache_config_dir }}/010-iiab.conf', mode: '0755' }
|
|
- { src: 'proxy_ajp.conf.j2' , dest: '/etc/{{ apache_config_dir }}/proxy_ajp.conf', mode: '0644' }
|
|
- { src: 'php.ini.j2' , dest: '/etc/php.ini' , mode: '0644' }
|
|
|
|
# remove symlinks for mpm-event, replace with mpm-prefork
|
|
- name: Remove mpm event links
|
|
file: path=/etc/apache2/mods-enabled/{{ item }}
|
|
state=absent
|
|
with_items:
|
|
- mpm_event.conf
|
|
- mpm_event.load
|
|
when: is_debuntu
|
|
|
|
- name: create symlinks for mpm-prefork
|
|
file: path=/etc/apache2/mods-enabled/{{ item }}
|
|
src=/etc/apache2/mods-available/{{ item }}
|
|
state=link
|
|
with_items:
|
|
- mpm_prefork.conf
|
|
- mpm_prefork.load
|
|
when: is_debuntu
|
|
|
|
- name: turn on mod_proxy
|
|
command: a2enmod {{ item }}
|
|
with_items:
|
|
- proxy
|
|
- proxy_html
|
|
- headers
|
|
- rewrite
|
|
when: is_debuntu
|
|
|
|
- name: create symlinks for enabling our site
|
|
file: path=/etc/apache2/sites-enabled/{{ item }}
|
|
src=/etc/apache2/sites-available/{{ item }}
|
|
state=link
|
|
with_items:
|
|
- 010-iiab.conf
|
|
when: is_debuntu
|
|
|
|
- name: Remove the default site container
|
|
file: dest=/etc/apache2/000-default.conf
|
|
state=absent
|
|
when: is_debuntu
|
|
|
|
- name: Create http pid dir
|
|
file: path=/var/run/{{ apache_user }}
|
|
mode=0755
|
|
owner=root
|
|
group=root
|
|
state=directory
|
|
|
|
- name: create admin group
|
|
group: name=admin
|
|
state=present
|
|
|
|
- name: Add apache user to admin group
|
|
user: name={{ apache_user }}
|
|
groups=admin
|
|
state=present
|
|
createhome=no
|
|
|
|
- name: Create httpd log dir
|
|
file: path=/var/log/{{ apache_service }}
|
|
mode=0755
|
|
owner={{ apache_user }}
|
|
group={{ apache_user }}
|
|
state=directory
|
|
|
|
- name: Enable httpd
|
|
service: name={{ apache_service }}
|
|
enabled=yes
|
|
|
|
- name: Create iiab-info directory
|
|
file: path={{ doc_root }}/info
|
|
mode=0755
|
|
owner={{ apache_user }}
|
|
group={{ apache_user }}
|
|
state=directory
|
|
|
|
- name: Remove iiab-info.conf
|
|
file: dest=/etc/{{ apache_config_dir }}/iiab-info.conf
|
|
state=absent
|
|
|
|
- name: Remove iiab-info.conf symlink
|
|
file: dest=/etc/apache2/sites-enabled/iiab-info.conf
|
|
state=absent
|
|
when: is_debuntu
|
|
|
|
- include: html.yml
|
|
tags:
|
|
- base
|
|
|
|
- include: home-page.yml
|
|
|
|
- name: place the script to generate home pages
|
|
template: src=refresh-wiki-docs.sh
|
|
dest=/usr/bin/xs-refresh-wiki-docs
|
|
mode=0755
|
|
|
|
- name: generate the offline documents
|
|
command: /usr/bin/xs-refresh-wiki-docs
|
|
|
|
|