added && instead of ;

pull/63/head
bennojoy 11 years ago
parent bc3e192ffe
commit 296ec11f54
  1. 5
      hadoop/roles/common/tasks/common.yml
  2. 2
      hadoop/roles/hadoop_primary/tasks/hadoop_master.yml
  3. 4
      hadoop/roles/hadoop_primary/tasks/hadoop_master_no_ha.yml
  4. 8
      hadoop/roles/hadoop_secondary/tasks/main.yml

@ -17,10 +17,7 @@
template: src=etc/hosts.j2 dest=/etc/hosts
- name: Disable SELinux in conf file
lineinfile: dest=/etc/sysconfig/selinux regexp='^SELINUX=' line='SELINUX=disabled' state=present
- name: Disable SELinux dynamically
shell: creates=/etc/sysconfig/selinux.disabled setenforce 0 ; touch /etc/sysconfig/selinux.disabled
selinux: state=disabled
- name: Create the iptables file for all machines
template: src=iptables.j2 dest=/etc/sysconfig/iptables

@ -32,7 +32,7 @@
with_items: hadoop.mapred_job_tracker_persist_jobstatus_dir
- name: Format the namenode
shell: creates=/usr/lib/hadoop/namenode.formatted su - hdfs -c "hadoop namenode -format"; touch /usr/lib/hadoop/namenode.formatted
shell: creates=/usr/lib/hadoop/namenode.formatted su - hdfs -c "hadoop namenode -format" && touch /usr/lib/hadoop/namenode.formatted
- name: start hadoop namenode services
service: name=hadoop-hdfs-namenode state=started

@ -26,13 +26,13 @@
with_items: hadoop.dfs_namenode_name_dir
- name: Format the namenode
shell: creates=/usr/lib/hadoop/namenode.formatted su - hdfs -c "hadoop namenode -format"; touch /usr/lib/hadoop/namenode.formatted
shell: creates=/usr/lib/hadoop/namenode.formatted su - hdfs -c "hadoop namenode -format" && touch /usr/lib/hadoop/namenode.formatted
- name: start hadoop namenode services
service: name=hadoop-hdfs-namenode state=started
- name: Give permissions for mapred users
shell: creates=/usr/lib/hadoop/namenode.initialized su - hdfs -c "hadoop fs -chown hdfs:hadoop /"; su - hdfs -c "hadoop fs -chmod 0775 /"; touch /usr/lib/hadoop/namenode.initialized
shell: creates=/usr/lib/hadoop/namenode.initialized su - hdfs -c "hadoop fs -chown hdfs:hadoop /"; su - hdfs -c "hadoop fs -chmod 0775 /" && touch /usr/lib/hadoop/namenode.initialized
- name: start hadoop jobtracker services
service: name=hadoop-0.20-mapreduce-jobtracker state=started

@ -34,13 +34,13 @@
- name: Initialize the secodary namenode
shell: creates=/usr/lib/hadoop/namenode.formatted su - hdfs -c "hadoop namenode -bootstrapStandby"; touch /usr/lib/hadoop/namenode.formatted
shell: creates=/usr/lib/hadoop/namenode.formatted su - hdfs -c "hadoop namenode -bootstrapStandby" && touch /usr/lib/hadoop/namenode.formatted
- name: start hadoop namenode services
service: name=hadoop-hdfs-namenode state=started
- name: Initialize the zkfc for namenode
shell: creates=/usr/lib/hadoop/zkfc.formatted su - hdfs -c "hdfs zkfc -formatZK"; touch /usr/lib/hadoop/zkfc.formatted
shell: creates=/usr/lib/hadoop/zkfc.formatted su - hdfs -c "hdfs zkfc -formatZK" && touch /usr/lib/hadoop/zkfc.formatted
- name: start zkfc for namenodes
service: name=hadoop-hdfs-zkfc state=started
@ -48,10 +48,10 @@
with_items: groups.hadoop_masters
- name: Give permissions for mapred users
shell: creates=/usr/lib/hadoop/fs.initialized su - hdfs -c "hadoop fs -chown hdfs:hadoop /"; su - hdfs -c "hadoop fs -chmod 0774 /"; touch /usr/lib/hadoop/namenode.initialized
shell: creates=/usr/lib/hadoop/fs.initialized su - hdfs -c "hadoop fs -chown hdfs:hadoop /"; su - hdfs -c "hadoop fs -chmod 0774 /" && touch /usr/lib/hadoop/namenode.initialized
- name: Initialize the zkfc for jobtracker
shell: creates=/usr/lib/hadoop/zkfcjob.formatted su - mapred -c "hadoop mrzkfc -formatZK"; touch /usr/lib/hadoop/zkfcjob.formatted
shell: creates=/usr/lib/hadoop/zkfcjob.formatted su - mapred -c "hadoop mrzkfc -formatZK" && touch /usr/lib/hadoop/zkfcjob.formatted
- name: start zkfc for jobtracker
service: name=hadoop-0.20-mapreduce-zkfc state=started