Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refresh-mcollective-metadata produces invalid fact file #361

Open
alexjfisher opened this issue Dec 15, 2017 · 2 comments · May be fixed by #394
Open

refresh-mcollective-metadata produces invalid fact file #361

alexjfisher opened this issue Dec 15, 2017 · 2 comments · May be fixed by #394
Labels
bug Something isn't working

Comments

@alexjfisher
Copy link
Member

Following PRs #346 #353 and #358 the refresh-mcollective-metadata cronjob still produces a file that mcollective is not able to correctly parse.

Mcollective assumes all the facts will be top level keys. Instead they are now all nested under values.
See #346 (comment)

A few options I could think of...

  1. Revert the PRs.
  2. Have the cron somehow parse the output of puppet facts to extract the values hash.
  3. Submit a PR to mcollective (patching this)
@khaefeli
Copy link

argh :) and I first thought my mco facter filters are wrong..
I workaround this with an ugly sed:

  1. remove the 3rd line (values:)
  2. remove the two spaces of the yaml at the beginning of every line

|sed '3d' | sed 's/^ //'

@akomakom
Copy link

I just change the command for refresh-mcollective-metadata cron in modules/mcollective/manifests/server/config/factsource/yaml.pp as follows:

  cron { 'refresh-mcollective-metadata':
    command => "facter -p --yaml >${yaml_fact_path_real} 2>&1",
    ....

psychonaut pushed a commit to psychonaut/puppet-mcollective that referenced this issue Jul 2, 2018
Voovode pushed a commit to Voovode/puppet-mcollective that referenced this issue Oct 30, 2019
Voovode pushed a commit to Voovode/puppet-mcollective that referenced this issue Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants