Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
Fix #9 and some other fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
analytically committed Mar 4, 2014
1 parent 0b9b9ae commit 685a973
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 53 deletions.
6 changes: 3 additions & 3 deletions roles/cdh_hadoop_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# file: roles/cdh_hadoop_config/tasks/main.yml

- name: copy /etc/hadoop/conf.empty to /etc/hadoop/conf.{{ site_name|lower }}
shell: creates=/etc/hadoop/conf.{{ site_name|lower }} cp -R -p /etc/hadoop/conf.empty /etc/hadoop/conf.{{ site_name|lower }}
command: creates=/etc/hadoop/conf.{{ site_name|lower }} cp -R -p /etc/hadoop/conf.empty /etc/hadoop/conf.{{ site_name|lower }}
tags:
- hadoop
- configuration
Expand Down Expand Up @@ -31,9 +31,9 @@
- configuration

- name: run 'update-alternatives' to install hadoop configuration
shell: update-alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.{{ site_name|lower }} 50
command: update-alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.{{ site_name|lower }} 50
tags: hadoop

- name: run 'update-alternatives' to set hadoop configuration
shell: update-alternatives --set hadoop-conf /etc/hadoop/conf.{{ site_name|lower }}
command: update-alternatives --set hadoop-conf /etc/hadoop/conf.{{ site_name|lower }}
tags: hadoop
6 changes: 3 additions & 3 deletions roles/cdh_hbase_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# file: roles/cdh_hbase_config/tasks/main.yml

- name: copy /etc/hbase/conf.empty to /etc/hbase/conf.{{ site_name|lower }}
shell: creates=/etc/hbase/conf.{{ site_name|lower }} cp -R -p /etc/hbase/conf.dist /etc/hbase/conf.{{ site_name|lower }}
command: creates=/etc/hbase/conf.{{ site_name|lower }} cp -R -p /etc/hbase/conf.dist /etc/hbase/conf.{{ site_name|lower }}
tags: hbase

- name: configure HBase in /etc/hbase/conf.{{ site_name|lower }}
Expand All @@ -19,9 +19,9 @@
- configuration

- name: run 'update-alternatives' to install HBase configuration
shell: update-alternatives --install /etc/hbase/conf hbase-conf /etc/hbase/conf.{{ site_name|lower }} 50
command: update-alternatives --install /etc/hbase/conf hbase-conf /etc/hbase/conf.{{ site_name|lower }} 50
tags: hbase

- name: run 'update-alternatives' to set HBase configuration
shell: update-alternatives --set hbase-conf /etc/hbase/conf.{{ site_name|lower }}
command: update-alternatives --set hbase-conf /etc/hbase/conf.{{ site_name|lower }}
tags: hbase
10 changes: 5 additions & 5 deletions roles/cdh_hive_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# file: roles/cdh_hive_config/tasks/main.yml

- name: copy /etc/hive/conf.empty to /etc/hive/conf.{{ site_name|lower }}
shell: creates=/etc/hive/conf.{{ site_name|lower }} cp -R -p /etc/hive/conf.dist /etc/hive/conf.{{ site_name|lower }}
command: creates=/etc/hive/conf.{{ site_name|lower }} cp -R -p /etc/hive/conf.dist /etc/hive/conf.{{ site_name|lower }}
tags: hive

- name: configure hive in /etc/hive/conf.{{ site_name|lower }}
Expand All @@ -16,20 +16,20 @@
- configuration

- name: run 'update-alternatives' to install hive configuration
shell: update-alternatives --install /etc/hive/conf hive-conf /etc/hive/conf.{{ site_name|lower }} 50
command: update-alternatives --install /etc/hive/conf hive-conf /etc/hive/conf.{{ site_name|lower }} 50
tags: hive

- name: run 'update-alternatives' to set hive configuration
shell: update-alternatives --set hive-conf /etc/hive/conf.{{ site_name|lower }}
command: update-alternatives --set hive-conf /etc/hive/conf.{{ site_name|lower }}
tags: hive

- name: soft link postgresql-jdbc4.jar
shell: creates=/usr/lib/hive/lib/postgresql-jdbc4.jar ln -s /usr/share/java/postgresql-jdbc4.jar /usr/lib/hive/lib/postgresql-jdbc4.jar
command: creates=/usr/lib/hive/lib/postgresql-jdbc4.jar ln -s /usr/share/java/postgresql-jdbc4.jar /usr/lib/hive/lib/postgresql-jdbc4.jar
when: hive_metastore == "postgresql"
tags: hive

- name: symbolically link libmysql-java.jar
shell: creates=/usr/lib/hive/lib/libmysql-java.jar
command: creates=/usr/lib/hive/lib/libmysql-java.jar
ln -s /usr/share/java/mysql-connector-java.jar /usr/lib/hive/lib/libmysql-java.jar
when: hive_metastore == "mysql"
tags: hive
8 changes: 4 additions & 4 deletions roles/cdh_zookeeper_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
tags: zookeeper

- name: copy /etc/zookeeper/conf.dist to /etc/zookeeper/conf.{{ site_name|lower }}
shell: creates=/etc/zookeeper/conf.{{ site_name|lower }} cp -R -p /etc/zookeeper/conf.dist /etc/zookeeper/conf.{{ site_name|lower }}
command: creates=/etc/zookeeper/conf.{{ site_name|lower }} cp -R -p /etc/zookeeper/conf.dist /etc/zookeeper/conf.{{ site_name|lower }}
tags: zookeeper

- name: run 'update-alternatives' to install ZooKeeper configuration
shell: update-alternatives --install /etc/zookeeper/conf zookeeper-conf /etc/zookeeper/conf.{{ site_name|lower }} 50
command: update-alternatives --install /etc/zookeeper/conf zookeeper-conf /etc/zookeeper/conf.{{ site_name|lower }} 50
tags: zookeeper

- name: run 'update-alternatives' to set ZooKeeper configuration
shell: update-alternatives --set zookeeper-conf /etc/zookeeper/conf.{{ site_name|lower }}
command: update-alternatives --set zookeeper-conf /etc/zookeeper/conf.{{ site_name|lower }}
tags: zookeeper

- name: create /var/lib/zookeeper directory
Expand All @@ -31,5 +31,5 @@
tags: zookeeper

- name: initialize ZooKeeper
shell: creates=/var/lib/zookeeper/myid service zookeeper-server init --myid={{ zookeeper_id }}
command: creates=/var/lib/zookeeper/myid service zookeeper-server init --myid={{ zookeeper_id }}
tags: zookeeper
2 changes: 1 addition & 1 deletion roles/elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
tags: elasticsearch

- name: install Elasticsearch marvel plugin
shell: creates=/usr/share/elasticsearch/plugins/marvel chdir=/usr/share/elasticsearch/bin ./plugin -install elasticsearch/marvel/latest
command: creates=/usr/share/elasticsearch/plugins/marvel chdir=/usr/share/elasticsearch/bin ./plugin -install elasticsearch/marvel/latest
tags: elasticsearch
6 changes: 3 additions & 3 deletions roles/ganglia_web/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
tags: ganglia

- name: make sure ganglia-web makefile has the correct path
shell: creates=/var/lib/ganglia-web/dwoo chdir=/var/www/ganglia sed -i "s=/var/www/html/ganglia=/var/www/ganglia=" Makefile
command: creates=/var/lib/ganglia-web/dwoo chdir=/var/www/ganglia sed -i "s=/var/www/html/ganglia=/var/www/ganglia=" Makefile
tags: ganglia

- name: make sure ganglia-web makefile has the correct user
shell: creates=/var/lib/ganglia-web/dwoo chdir=/var/www/ganglia sed -i "s/APACHE_USER = apache/APACHE_USER = www-data/" Makefile
command: creates=/var/lib/ganglia-web/dwoo chdir=/var/www/ganglia sed -i "s/APACHE_USER = apache/APACHE_USER = www-data/" Makefile
tags: ganglia

- name: make install ganglia-web
shell: creates=/var/lib/ganglia-web/dwoo chdir=/var/www/ganglia make install
command: creates=/var/lib/ganglia-web/dwoo chdir=/var/www/ganglia make install
notify:
- restart apache2
tags: ganglia
40 changes: 20 additions & 20 deletions roles/mysql_server/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
---
# file: roles/mysql_server/tasks/main.yml

- name: predefine mysql root passwd
- name: predefine MySQL root passwd
shell: executable=/bin/bash debconf-set-selections <<< "mysql-server-5.5 mysql-server/root_password password hive_{{ site_name }}"

- name: predefine mysql root passwd confirm
- name: predefine MySQL root passwd confirm
shell: executable=/bin/bash debconf-set-selections <<< "mysql-server-5.5 mysql-server/root_password_again password hive_{{ site_name }}"

- name: install MySQL and related-package via apt
- name: install MySQL via apt
apt: name={{ item }}
update_cache=yes
with_items:
- mysql-server-5.5
- libmysql-java
- python-mysqldb
tags:
- mysql

- name: service mysql restart
service: name=mysql state=restarted

- name: create mysql db 'metastore'
mysql_db: name=metastore
state=present
login_user=root
login_password=hive_{{ site_name }}
- name: create MySQL db 'metastore'
mysql_db: name=metastore state=present
login_user=root login_password=hive_{{ site_name }}
tags:
- mysql
- hive

- name: init metastore schema
shell: mysql -uroot -phive_{{ site_name }} metastore < /usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-0.10.0.mysql.sql
tags:
- mysql
- hive

- name: add mysql user 'hiveuser'
mysql_user: name=hiveuser
host=localhost
password=hive_{{ site_name }}
priv=metastore.*:ALL
state=present
login_user=root
login_password=hive_{{ site_name }}
- name: add MySQL user 'hiveuser'
mysql_user: name=hiveuser host=localhost password=hive_{{ site_name }} priv=metastore.*:ALL state=present
login_user=root login_password=hive_{{ site_name }}
tags:
- mysql
- hive
2 changes: 1 addition & 1 deletion roles/oracle_jdk/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- java

- name: download floatingdecimal-0.1.jar to /usr/lib/jvm (fixes monitor contention when parsing doubles due to a static synchronized method)
shell: creates=/usr/lib/jvm/floatingdecimal-0.1.jar chdir=/usr/lib/jvm curl -O http://repo1.maven.org/maven2/io/airlift/floatingdecimal/0.1/floatingdecimal-0.1.jar
command: creates=/usr/lib/jvm/floatingdecimal-0.1.jar chdir=/usr/lib/jvm curl -O http://repo1.maven.org/maven2/io/airlift/floatingdecimal/0.1/floatingdecimal-0.1.jar

- name: set fact jdk_installed
set_fact: jdk_installed=true
2 changes: 1 addition & 1 deletion roles/postfix_mandrill/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
tags: postfix

- name: run postmap to configure postfix lookup tables
shell: postmap /etc/postfix/sasl_passwd
command: postmap /etc/postfix/sasl_passwd
tags: postfix

- name: install Mandrill (Thawte Premium Server) SSL certificates
Expand Down
6 changes: 3 additions & 3 deletions roles/postgresql_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
- postgres
- hive

- name: add postgresql user 'hiveuser'
- name: add PostgreSQL user 'hiveuser'
sudo: true
sudo_user: postgres
postgresql_user: db=metastore name=hiveuser password=hive_{{ site_name }} priv=CONNECT
Expand All @@ -40,15 +40,15 @@
- name: init metastore schema
sudo: true
sudo_user: postgres
shell: psql --dbname=metastore --file=/usr/lib/hive/scripts/metastore/upgrade/postgres/hive-schema-0.10.0.postgres.sql
command: psql --dbname=metastore --file=/usr/lib/hive/scripts/metastore/upgrade/postgres/hive-schema-0.10.0.postgres.sql
tags:
- postgres
- hive

- name: grant hiveuser
sudo: true
sudo_user: postgres
shell: psql --dbname=metastore --command="GRANT ALL ON ALL TABLES IN SCHEMA public TO hiveuser;"
command: psql --dbname=metastore --command="GRANT ALL ON ALL TABLES IN SCHEMA public TO hiveuser;"
tags:
- postgres
- hive
2 changes: 1 addition & 1 deletion roles/rsyslog_fluentd/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
service: name=rsyslog state=restarted

- name: log installation message
shell: logger -t ansible "Configured rsyslog integration with Fluentd on {{ ansible_fqdn }}"
command: logger -t ansible "Configured rsyslog integration with Fluentd on {{ ansible_fqdn }}"
6 changes: 3 additions & 3 deletions roles/smokeping/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
- restart smokeping

- name: link to smokeping config in /etc/apache2/conf-available
shell: creates=/etc/apache2/conf-available/smokeping.conf chdir=/etc/apache2/conf-available ln -s ../../smokeping/apache2.conf smokeping.conf
command: creates=/etc/apache2/conf-available/smokeping.conf chdir=/etc/apache2/conf-available ln -s ../../smokeping/apache2.conf smokeping.conf
when: ansible_distribution_version not in ["12.04", "12.10", "13.04"]
tags: smokeping

- name: enable the smokeping apache2 configuration
shell: a2enconf smokeping
command: a2enconf smokeping
when: ansible_distribution_version not in ["12.04", "12.10", "13.04"]
tags: smokeping

- name: enable the cgid apache2 module
shell: a2enmod cgid
command: a2enmod cgid
tags: smokeping
notify:
- reload apache config
4 changes: 2 additions & 2 deletions roles/td_agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
ignore_errors: yes

- name: install the fluent Elasticsearch plugin
shell: creates=/usr/lib/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluent-plugin-elasticsearch-0.2.0/Gemfile /usr/lib/fluent/ruby/bin/fluent-gem install fluent-plugin-elasticsearch
command: creates=/usr/lib/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluent-plugin-elasticsearch-0.2.0/Gemfile /usr/lib/fluent/ruby/bin/fluent-gem install fluent-plugin-elasticsearch
tags: tdagent

- name: install the fluent tail-multiline plugin
shell: creates=/usr/lib/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluent-plugin-tail-multiline-0.1.5/Gemfile /usr/lib/fluent/ruby/bin/fluent-gem install fluent-plugin-tail-multiline
command: creates=/usr/lib/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluent-plugin-tail-multiline-0.1.5/Gemfile /usr/lib/fluent/ruby/bin/fluent-gem install fluent-plugin-tail-multiline
tags: tdagent

- name: configure td-agent in /etc/td-agent/td-agent.conf
Expand Down
6 changes: 3 additions & 3 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
- hadoop
- hbase
- name: format the namenode - WILL NOT FORMAT IF /data/dfs/nn/current/VERSION EXISTS TO AVOID DATA LOSS
shell: creates=/data/dfs/nn/current/VERSION hdfs namenode -format -force
command: creates=/data/dfs/nn/current/VERSION hdfs namenode -format -force
tags:
- hadoop
- hbase
Expand Down Expand Up @@ -235,8 +235,8 @@
user: ansibler
sudo: true
roles:
- { role: postgresql_server, when metastore == "postgresql" }
- { role: mysql_server, when metastore == "mysql" }
- { role: postgresql_server, when hive_metastore == "postgresql" }
- { role: mysql_server, when hive_metastore == "mysql" }
- cdh_hive_config

- hosts: hive_metastore
Expand Down

0 comments on commit 685a973

Please sign in to comment.