$ ansible -i hosts \* -m debug -a 'msg="${greeting}"' won't work...

frank.stuppy at erv.de frank.stuppy at erv.de
Fri Jan 29 10:46:46 CET 2016


Checked out reclass from github, installed it and change ../nodes/munich/black.example.org.yml
classes:
  - example.org
  - debian.release.jessie
  - hosted at munich
  - salt.minion
  - webserver
  - mail.satellite
environment: dev
parameters:
  rgb_colour_code: "000000"
  greeting: "Hello World"

run example - Output of the command:

../reclass/examples/ansible> ansible -i hosts \* -m debug -a 'msg="${greeting}"'
blue.example.org | SUCCESS => {
    "msg": "${greeting}"
}
yellow.example.org | SUCCESS => {
    "msg": "${greeting}"
}
black.example.org | SUCCESS => {
    "msg": "${greeting}"
}
white.example.org | SUCCESS => {
    "msg": "${greeting}"
}

So ${greeting} is not substituted

But when command is: ansible -i hosts \* -m debug -a 'msg="{{ greeting }}"'
white.example.org | FAILED! => {
    "failed": true,
    "msg": "ERROR! 'greeting' is undefined"
}
blue.example.org | FAILED! => {
    "failed": true,
    "msg": "ERROR! 'greeting' is undefined"
}
yellow.example.org | FAILED! => {
    "failed": true,
    "msg": "ERROR! 'greeting' is undefined"
}
black.example.org | SUCCESS => {
    "msg": "Hello World"

Thanks for help.

Cheers Franky
_________________________________________________________
Frank Stuppy
ITERGO Informationstechnologie GmbH
ERV Basisinfrastruktur (PEBE M)
Thomas-Dehler-Straße 2
81737 München
Tel.         089/4166-1250
Fax         089/4166-2250
Frank.Stuppy at erv.de<mailto:Frank.Stuppy at erv.de>

Vorsitzender des Aufsichtsrats: Christian Diedrich
Geschäftsführung: Tomasz Smaczny (Vorsitzender),
Lothar Engelke, Joachim Fensch, Bernd Jung, Dr. Michael Regauer.
Sitz: Düsseldorf, Handelsregister: Amtsgericht Düsseldorf, HRB 37996

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pantsfullofunix.net/pipermail/reclass/attachments/20160129/2d7b8379/attachment.html>


More information about the reclass mailing list