ymc-geko / ansible-cdh-cluster

install Cloudera's distribution of Hadoop including Cloudera Manager and Cloudera Search (Beta)
31 stars 11 forks source link

Possible playbook cleanup tips #1

Open mpdehaan opened 11 years ago

mpdehaan commented 11 years ago

A few things I just found that I thought I would pass along!

These two tasks needs to be broken out:

 - name: set CM master to $desired_state
   action: service name=cloudera-scm-server state=$desired_state
   action: service name=cloudera-scm-server-db state=$desired_state
   when_string: $ansible_hostname == $clouderamanager

(only one action keyword per task)

when_string in 1.2.X and later can be simplified down to:

   when: ansible_hostname == clouderamanager

would probably put whitespace between tasks

Also suggest converting to roles and best practice structure :)

ymc-geko commented 11 years ago

Hi Michael,

thanks alot for your hints. I'll keep that in mind for my next update.

br....: Gerd :....

2013/8/14 Michael DeHaan notifications@github.com

A few things I just found that I thought I would pass along!

These two tasks needs to be broken out:

  • name: set CM master to $desired_state action: service name=cloudera-scm-server state=$desired_state action: service name=cloudera-scm-server-db state=$desired_state when_string: $ansible_hostname == $clouderamanager

(only one action keyword per task)

when_string in 1.2.X and later can be simplified down to:

when: ansible_hostname == clouderamanager

would probably put whitespace between tasks

Also suggest converting to roles and best practice structure :)

— Reply to this email directly or view it on GitHubhttps://github.com/ymc-geko/ansible-cdh-cluster/issues/1 .

Gerd Koenig Data Engineer / Big Data Analytics


YMC AG Sonnenstr. 4 CH-8280 Kreuzlingen Switzerland

Tel +41 (0)71 / 508 24 74 Fax +41 (0)71 / 560 53 89

http://twitter.com/gerd_koenig www.ymc.ch http://www.ymc.ch