123 lines
2.7 KiB
YAML
123 lines
2.7 KiB
YAML
---
|
|
# Configuration for the Fedora Notifications webapp
|
|
|
|
- name: install needed packages
|
|
dnf: pkg={{ item }} state=present
|
|
with_items:
|
|
- autocloud-common
|
|
- autocloud-backend
|
|
- tunir
|
|
- fedfind
|
|
- python-sqlalchemy
|
|
- python-sqlalchemy-utils
|
|
- libsemanage-python
|
|
- libselinux-python
|
|
notify:
|
|
- restart fedmsg-hub
|
|
- restart autocloud
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|
|
|
|
- name: Check for the existance of a 'tunirports' redis entry
|
|
command: redis-cli --scan --pattern tunirports
|
|
changed_when: False
|
|
register: tunirports
|
|
always_run: true
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|
|
|
|
|
|
- name: copy autocloud backend configuration
|
|
template: >
|
|
src={{ item }} dest=/etc/autocloud/{{ item }}
|
|
owner=root group=fedmsg mode=0640
|
|
with_items:
|
|
- autocloud.cfg
|
|
notify:
|
|
- restart fedmsg-hub
|
|
- restart autocloud
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|
|
|
|
- name: copy autocloud fedmsg configuration
|
|
template: >
|
|
src={{ item }} dest=/etc/fedmsg.d/{{ item }}
|
|
owner=root group=fedmsg mode=0640
|
|
with_items:
|
|
- autocloud.py
|
|
notify:
|
|
- restart fedmsg-hub
|
|
- restart autocloud
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|
|
|
|
- name: install libvirt and vagrant-libvirt for the libvirt host
|
|
dnf: pkg={{ item }} state=present
|
|
with_items:
|
|
- libvirt
|
|
- vagrant-libvirt
|
|
when: autocloud_specialization == 'libvirt'
|
|
notify:
|
|
- restart fedmsg-hub
|
|
- restart autocloud
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|
|
|
|
- name: Setup virtualbox requirements where needed
|
|
copy: src=virtualbox.repo dest=/etc/yum.repos.d/virtualbox.repo
|
|
when: autocloud_specialization == 'virtualbox'
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|
|
|
|
- name: install virtualbox basics where needed
|
|
dnf: pkg={{ item }} state=present
|
|
with_items:
|
|
- VirtualBox-4.3
|
|
- kernel-devel
|
|
- gcc
|
|
- vagrant
|
|
register: virtualbox_installed
|
|
always_run: true
|
|
when: autocloud_specialization == 'virtualbox'
|
|
notify:
|
|
- restart fedmsg-hub
|
|
- restart autocloud
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|
|
|
|
- name: setup vbox if it was just installed.
|
|
command: /etc/init.d/vboxdrv setup
|
|
when: virtualbox_installed|changed
|
|
notify:
|
|
- restart fedmsg-hub
|
|
- restart autocloud
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|
|
|
|
- name: Copy the correct tunir job details
|
|
copy: src=fedora.txt dest=/etc/autocloud/fedora.txt
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|
|
- autocloud/backend/tests
|
|
|
|
- name: Set up a cronjob to run kill_vagrant every so often..
|
|
copy: src=kill_vagrant.cron dest=/etc/cron.d/kill_vagrant.cron
|
|
tags:
|
|
- cron
|
|
- autocloud
|
|
- autocloud/backend
|
|
|
|
- name: start autocloud
|
|
service: name=autocloud enabled=yes state=started
|
|
tags:
|
|
- autocloud
|
|
- autocloud/backend
|