2012-10-10 16:19:12 +00:00
|
|
|
# setup openshift broker on el6
|
|
|
|
---
|
|
|
|
- name: set the hostname to openshift-
|
|
|
|
action: command hostname openshift-${dist_tag}
|
|
|
|
tags:
|
|
|
|
- config
|
|
|
|
|
|
|
|
- name: setup openshift and jenkins repos
|
|
|
|
action: copy src=$files/openshift/$item dest=/etc/yum.repos.d/$item
|
|
|
|
with_items:
|
|
|
|
- openshift-el6.repo
|
|
|
|
- jenkins.repo
|
|
|
|
|
|
|
|
- name: install openshift pkg core
|
|
|
|
action: yum state=installed name=$item
|
|
|
|
with_items:
|
|
|
|
- mcollective
|
|
|
|
- mcollective-qpid-plugin
|
|
|
|
- mongodb
|
|
|
|
- qpid-cpp-server
|
|
|
|
- rubygem-gearchanger-mcollective-plugin
|
|
|
|
- rubygem-swingshift-mongo-plugin
|
|
|
|
- rubygem-uplift-bind-plugin
|
|
|
|
- rhc
|
|
|
|
- stickshift-broker
|
|
|
|
|
|
|
|
- name: set selinux bools appropriately
|
|
|
|
action: seboolean state=true persistent=yes name=$item
|
|
|
|
with_items:
|
|
|
|
- httpd_unified
|
|
|
|
- httpd_can_network_connect
|
|
|
|
- httpd_can_network_relay
|
|
|
|
- named_write_master_zones
|
|
|
|
- allow_ypbind
|
|
|
|
|
2012-10-10 16:25:41 +00:00
|
|
|
- name: selinux module install - stickshift
|
2012-10-10 16:19:12 +00:00
|
|
|
action: command semodule -i /usr/share/selinux/packages/rubygem-stickshift-common/stickshift.pp
|
|
|
|
|
2012-10-10 16:25:41 +00:00
|
|
|
- name: selinux module disable - passenger
|
2012-10-10 16:32:23 +00:00
|
|
|
action: command semodule -d passenger
|
2012-10-10 16:37:47 +00:00
|
|
|
ignore_errors: True
|
2012-10-10 16:19:12 +00:00
|
|
|
|
2012-10-10 16:25:41 +00:00
|
|
|
- name: selinux module install - other passenger
|
2012-10-10 16:19:12 +00:00
|
|
|
action: command semodule -i /usr/share/selinux/packages/rubygem-passenger/rubygem-passenger.pp
|
|
|
|
|
|
|
|
- name: fix up files for selinux
|
2012-10-10 16:34:57 +00:00
|
|
|
action: command $item
|
2012-10-10 16:19:12 +00:00
|
|
|
with_items:
|
|
|
|
- "fixfiles -R rubygem-passenger restore"
|
|
|
|
- "fixfiles -R mod_passenger restore"
|
|
|
|
- "restorecon -rv /var/run"
|
|
|
|
- "restorecon -rv /usr/lib/ruby/gems/1.8/gems/passenger-*"
|
|
|
|
- "restorecon -rv /usr/sbin/mcollectived /var/log/mcollective.log /run/mcollective.pid"
|
|
|
|
|
2012-10-10 19:35:11 +00:00
|
|
|
- name: mongodb.conf
|
|
|
|
action: copy src=$files/openshift/mongodb.conf dest=/etc/mongodb.conf backup=true
|
2012-10-10 19:39:22 +00:00
|
|
|
tags:
|
|
|
|
- mongo
|
2012-10-10 20:01:39 +00:00
|
|
|
|
2012-10-10 19:35:11 +00:00
|
|
|
- name: mongod service start
|
|
|
|
action: service name=mongod state=running enabled=yes
|
2012-10-10 19:39:22 +00:00
|
|
|
tags:
|
|
|
|
- mongo
|
2012-10-10 20:01:39 +00:00
|
|
|
|
|
|
|
- name: mongo/openshift account setup script
|
|
|
|
action: template src=$files/openshift/mongo-acct.sh dest=/root/mongo-acct.sh mode=0700
|
|
|
|
tags:
|
|
|
|
- mongo
|
|
|
|
|
|
|
|
- name: mongo/openshift account setup
|
2012-10-10 20:03:42 +00:00
|
|
|
action: command creates=/etc/mongo-acct-setup /root/mongo-acct.sh
|
2012-10-10 19:35:11 +00:00
|
|
|
tags:
|
2012-10-10 19:39:22 +00:00
|
|
|
- mongo
|
|
|
|
|
2012-10-10 20:01:39 +00:00
|
|
|
- name: clear file mongo acct file
|
2012-10-10 20:04:33 +00:00
|
|
|
action: file state=absent path=/root/mongo-acct.sh
|
2012-10-10 20:01:39 +00:00
|
|
|
tags:
|
|
|
|
- mongo
|
|
|
|
|
2012-10-10 20:42:19 +00:00
|
|
|
- name: poke holes in the firewall
|
|
|
|
action: command lokkit $item
|
|
|
|
with_items:
|
|
|
|
- --service=ssh
|
|
|
|
- --service=https
|
|
|
|
- --service=http
|
|
|
|
- --service=dns
|
|
|
|
- --port=5672:tcp
|
|
|
|
|
2012-10-10 21:17:35 +00:00
|
|
|
- name: put our external ip into /etc/hosts as 'openshift-el6'
|
|
|
|
action: lineinfile dest=/etc/hosts state=present line='${inventory_hostname} openshift-el6' regexp='${inventory_hostname}.*'
|
|
|
|
|
2012-10-10 20:42:19 +00:00
|
|
|
- name: enable services until I turn peach
|
2012-10-10 20:53:26 +00:00
|
|
|
action: service state=restarted enabled=yes name=$item
|
2012-10-10 20:42:19 +00:00
|
|
|
with_items:
|
|
|
|
- httpd
|
|
|
|
- named
|
|
|
|
- qpidd
|
|
|
|
- stickshift-broker
|
|
|
|
|
|
|
|
- name: disable mcollective
|
|
|
|
action: service state=stopped enabled=no name=mcollective
|
|
|
|
|
|
|
|
- name: mcollective client setup
|
|
|
|
action: template src=$files/openshift/mcollective-client.cfg dest=/etc/mcollective/client.cfg
|
|
|
|
|
|
|
|
- name: qpidd.conf
|
|
|
|
action: copy src=$files/openshift/qpidd.conf dest=/etc/qpidd.conf
|
|
|
|
|
|
|
|
- name: stickshift broker gemfile
|
|
|
|
action: copy src=$files/openshift/Gemfile dest=/var/www/stickshift/broker/Gemfile owner=apache group=apache mode=0640
|
|
|
|
|
|
|
|
|