Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants