ansible-galaxy role for ara
This commit is contained in:
parent
c569f5a732
commit
cbfac7ecd1
22
README.md
22
README.md
|
@ -1 +1,21 @@
|
||||||
# ansible-role-ara
|
Ansible Role: ara
|
||||||
|
=========
|
||||||
|
Ansible role to install ara on RHEL, Fedora, Centos and Ubuntu.
|
||||||
|
|
||||||
|
Example Playbook
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- hosts: servers
|
||||||
|
roles:
|
||||||
|
- role: chaitanyaenr.ara
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
|
||||||
|
BSD
|
||||||
|
|
||||||
|
Author Information
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Naga Ravi Chaitanya Elluri - nelluri@redhat.com
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
ara_host: localhost
|
||||||
|
ara_port: 9091
|
||||||
|
config_path: ~/ansible.cfg
|
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
# handlers file for ara
|
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
galaxy_info:
|
||||||
|
author: Naga Ravi Chaitanya Elluri
|
||||||
|
description: Installs ara
|
||||||
|
company: redhat
|
||||||
|
license: BSD
|
||||||
|
min_ansible_version: 2.1
|
||||||
|
platforms:
|
||||||
|
- name: EL
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
- name: Fedora
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
galaxy_tags:
|
||||||
|
- installer
|
||||||
|
- application
|
||||||
|
- system
|
||||||
|
dependencies: []
|
|
@ -0,0 +1,56 @@
|
||||||
|
---
|
||||||
|
- name: Install dependencies via dnf
|
||||||
|
dnf: name={{ item }} state=latest
|
||||||
|
with_items:
|
||||||
|
- python-pip
|
||||||
|
- gcc
|
||||||
|
- ansible
|
||||||
|
- python-devel
|
||||||
|
- libffi-devel
|
||||||
|
- openssl-devel
|
||||||
|
- redhat-rpm-config
|
||||||
|
- python-setuptools
|
||||||
|
- tree
|
||||||
|
- libselinux-python
|
||||||
|
when: ansible_pkg_mgr == 'dnf'
|
||||||
|
- name: Install dependencies via yum
|
||||||
|
yum: name={{ item }} state=latest
|
||||||
|
with_items:
|
||||||
|
- gcc
|
||||||
|
- python-devel
|
||||||
|
- libffi-devel
|
||||||
|
- openssl-devel
|
||||||
|
- redhat-rpm-config
|
||||||
|
when: ansible_pkg_mgr == 'yum'
|
||||||
|
- name: Install dependencies via apt
|
||||||
|
apt: name={{ item }} state=latest
|
||||||
|
with_items:
|
||||||
|
- gcc
|
||||||
|
- python-dev
|
||||||
|
- libffi-dev
|
||||||
|
- libssl-dev
|
||||||
|
- python-pip
|
||||||
|
- tree
|
||||||
|
when: ansible_pkg_mgr == 'apt'
|
||||||
|
- name: Install pip
|
||||||
|
easy_install: name=pip state=latest
|
||||||
|
when: ansible_pkg_mgr == 'yum'
|
||||||
|
- name: Install ara
|
||||||
|
pip: name={{ item }}
|
||||||
|
with_items:
|
||||||
|
- ara
|
||||||
|
- tox
|
||||||
|
- name: Enable ara plugin
|
||||||
|
lineinfile: dest={{ config_path }}
|
||||||
|
line={{ item.line }}
|
||||||
|
insertafter={{ item.insertafter }}
|
||||||
|
with_items:
|
||||||
|
- { line: "callback_plugins = /usr/lib/python2.7/site-packages/ara/callback:$VIRTUAL_ENV/lib/python2.7/site-packages/ara/callback:/usr/local/lib/python2.7/dist-packages/ara/callback", insertafter: "^#? some" }
|
||||||
|
- name: copy systemd service template
|
||||||
|
template: src=templates/ara.service.conf.j2 dest=/etc/systemd/system/ara.service owner=root group=root mode=0644
|
||||||
|
- name: daemon reload
|
||||||
|
shell: systemctl daemon-reload
|
||||||
|
- name: Enable service
|
||||||
|
service: name=ara enabled=yes
|
||||||
|
- name: start service
|
||||||
|
service: name=ara state=started
|
|
@ -0,0 +1,14 @@
|
||||||
|
[unit]
|
||||||
|
Description=ara
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
TimeoutStartSec=0
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/ara-manage runserver -h {{ ara_host }} -p {{ ara_port }}
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
# vars file for ara
|
Loading…
Reference in New Issue