1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00
iiab/roles/1-prep/tasks/prep.yml
georgejhunt f319afa432 Test (#20)
* 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
2017-06-09 16:25:56 -07:00

78 lines
2.2 KiB
YAML

- name: Since f22, dnf has replaced yum, but ansible works with yum
command: dnf install -y yum
when: ansible_distribution == "Fedora" and ansible_distribution_version|int >= 22
- name: Install iiab-extra repos
template: backup=yes
dest=/etc/yum.repos.d/iiab-extra.repo
src=iiab-extra.repo
owner=root
mode=0666
when: is_redhat
- name: Install iiab-testing repos
template: backup=yes
dest=/etc/yum.repos.d/iiab-testing.repo
src=iiab-testing.repo
owner=root
mode=0666
when: is_redhat
- name: Install rpmfusion-free-updates repo -- for exfat
template: dest=/etc/yum.repos.d/rpmfusion-free-updates.repo
src=rpmfusion-free-updates.repo
owner=root
mode=0666
when: ansible_distribution == "Fedora"
- name: Create /etc/iiab
file: path=/etc/iiab
owner=root
group=root
mode=0755
state=directory
# this script can be sourced to get iiab location
- name: Create iiab.env file
template: src=iiab.env.j2
dest=/etc/iiab/iiab.env
owner=root
group=root
mode=0644
- name: put a python interface to iiab.env
template: src=iiab_env.py.j2
dest=/etc/iiab/iiab_env.py
- name: create ansible.d facts directory
file: path=/etc/ansible/facts.d
owner=root
group=root
mode=0750
state=directory
- name: local facts script
template: src=local_facts.fact.j2
dest=/etc/ansible/facts.d/local_facts.fact
owner=root
group=root
mode=0700
- name: re-read facts
setup: filter=ansible_local
- name: Set XO model and preload
set_fact:
phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}'
xo_model: '{{ ansible_local["local_facts"]["xo_model"] }}'
iiab_preload: '{{ ansible_local["local_facts"]["iiab_preload"] }}'
- name: Install script to fully initialize network config, and/or collect data
# calling xs-network-reset w/ snapshot name, stores info, but aborts reset
# intended as a convenience function for us
template: src=xs-network-reset
dest=/usr/bin
owner=root
group=root
mode=0755