Я использую сценарий ruby для получения параметров класса, и мой вывод YAML выглядит следующим образом:
classes:
tomcat_install:
tmp_dir: /tmp
tomcat_home: /tmp/tomcat6
puppet.conf
как показано ниже:
[master]
node_terminus = exec
external_nodes = /etc/puppet/readnodedefinitions.rb
Когда я даю тестовую команду от марионеточного агента, журнал выглядит следующим образом:
Notice: Ignoring --listen on onetime run
Info: Retrieving plugin
Info: Caching catalog for puppet-agent
Info: Applying configuration version '1367987990'
Notice: Finished catalog run in 0.06 seconds
Но классы, указанные в скрипте ruby, игнорируются. Есть идеи, почему его игнорируют?
режим отладки дал это
Debug: Finishing transaction 69977541744660
Debug: Loaded state in 0.00 seconds
Debug: node supports formats: b64_zlib_yaml pson raw yaml; using pson
Debug: Using cached certificate for ca
Debug: Using cached certificate for puppet-agent.cs1cloud.internal
Debug: Using cached certificate_revocation_list for ca
Info: Retrieving plugin
Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using pson
Debug: Finishing transaction 69977541525360
Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson
Info: Caching catalog for puppet-agent.cs1cloud.internal
Debug: Creating default schedules
Debug: Loaded state in 0.00 seconds
Info: Applying configuration version '1367987990'
Debug: /Schedule[daily]: Skipping device resources because running on a host
Debug: /Schedule[monthly]: Skipping device resources because running on a host
Debug: /Schedule[hourly]: Skipping device resources because running on a host
Debug: /Schedule[never]: Skipping device resources because running on a host
Debug: /Schedule[weekly]: Skipping device resources because running on a host
Debug: /Schedule[puppet]: Skipping device resources because running on a host
Debug: Finishing transaction 69977541711700
Debug: Storing state
Debug: Stored state in 0.03 seconds
Notice: Finished catalog run in 0.07 seconds
Debug: Value of 'preferred_serialization_format' (pson) is invalid for report, u sing default (b64_zlib_yaml)
Debug: report supports formats: b64_zlib_yaml raw yaml; using b64_zlib_yaml
Кажется, ваш YAML-вывод потерял некоторые -
и Puppet не может распознать его как файл YAML. Может это должно понравиться?
---
classes:
puppet-agent.cs1cloud.internal:
tmp_dir: /tmp
tomcat_home: /tmp/tomcat6