Skip to content

Instantly share code, notes, and snippets.

@justlooks
Last active December 24, 2015 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justlooks/6724543 to your computer and use it in GitHub Desktop.
Save justlooks/6724543 to your computer and use it in GitHub Desktop.
{% for i in pillar['info'][grains['nodename']]['components'] %}
{{i}}:
service:
- running
{% if i == 'hadoop-hdfs-namenode' %}
- require:
cmd: sudo -u hdfs hadoop namenode –format
sudo -u hdfs hadoop namenode –format:
cmd.run
{% endif %}
{% endfor %}
error output:
CM1:
Data failed to compile:
----------
The require or watch statement in state "hadoop-hdfs-namenode" in sls "hadoop.service" needs to be formed as a list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment