Commit a099a294 authored by Paschalis Korosoglou's avatar Paschalis Korosoglou

first commit

parents
*~
.DS_Store
setup.sh
.*.sw?
#
# config file for ansible
# https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg
#
[defaults]
remote_user = root
hostfile = inventory
\ No newline at end of file
---
epel_release_url: http://ftp.ntua.gr/pub/linux/fedora-epel/6/i386/
epel_release_name: epel-release-6-8.noarch.rpm
arstats_release_url: http://rpm.hellasgrid.gr/mash/centos6-arstats/i386/
arstats_release_name: ar-release-1.0.0-3.25.el6.noarch.rpm
[webapi]
webapi.node
---
- name: Copy host x509 certificate onto host
tags: certificate
copy: src=hostcert.pem
dest={{ cert_path }} backup=yes
owner=root group=root mode=0644
---
- name: restart mongo
service: name=mongod state=restarted
\ No newline at end of file
---
- name: Install mongoDB packages
tags: mongoDB-packages
yum: name={{ item }} state=present
with_items:
- mongodb-org
- mongodb-org-server
- name: Bind mongod processes to any interface
lineinfile: dest=/etc/mongod.conf
regexp="^bind_ip="
insertafter=EOF
line="bind_ip=0.0.0.0"
state=present
backup=yes
notify: restart mongo
- name: Enable and start mongoDB
service: name=mongod enabled=yes state=started
\ No newline at end of file
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
\ No newline at end of file
---
- name: Download epel-release package
tags: epel_repo
get_url: url={{ epel_release_url }}/{{ epel_release_name }} dest=/tmp/{{ epel_release_name }} mode=0644
- name: Install epel-release package
tags: epel_repo
command: yum install -y /tmp/{{ epel_release_name }}
creates=/etc/yum.repos.d/epel.repo
- name: Download arstats package
tags: arstats_prod_repo
get_url: url={{ arstats_release_url }}/{{ arstats_release_name }} dest=/tmp/{{ arstats_release_name }} mode=0644
- name: Install ar-release package
tags: arstats_prod_repo
command: yum install -y /tmp/{{ arstats_release_name }}
creates=/etc/yum.repos.d/arstats.repo
- name: Install mongodb repo
tags: mongodb_repo
copy: src=etc/yum.repos.d/mongodb.repo
dest=/etc/yum.repos.d/mongodb.repo backup=no
owner=root group=root mode=0644
\ No newline at end of file
---
- name: updated ar-web-api package
service: name=ar-web-api state=restarted
\ No newline at end of file
---
- name: Install ar-web-api package
yum: name=ar-web-api state=latest
notify: updated ar-web-api package
tags: api
- name: Start web api service
service: name=ar-web-api state=started
tags: api
---
- hosts: webapi
user: root
roles:
- repos
- has_certificate
- mongodb
- webapi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment