Hello,
I have question about nodes management in Foreman.
Is it possible to apply new nodes configuration and create new nodes files
to Foreman from external sources (without using the web interface)?
I want to use Git for track changes in nodes configuration and
apply their to Foreman.
I know about /var/lib/puppet/yaml/foreman/*.yaml files and when I tried to
change their, but Foreman didn't apply the new configuration of nodes
(maybe I'm doing something wrong?).
Also, I heard about the using Hiera for store nodes configuration, but I
did not find a good manual about settings for Foreman and Hiera (Is it even
possible?)
The main idea use Foreman for showing puppet reports and use external
sources for nodes (which are tracked through Git).
> Hello,
> I have question about nodes management in Foreman.
>
> Is it possible to apply new nodes configuration and create new nodes
> files to Foreman from external sources (without using the web interface)?
> I want to use Git for track changes in nodes configuration and
> apply their to Foreman.
>
> I know about /var/lib/puppet/yaml/foreman/*.yaml files and when I tried
> to change their, but Foreman didn't apply the new configuration of nodes
> (maybe I'm doing something wrong?).
This is a cache only, changing them won't do anything. You're best just
not using Foreman's ENC I think if this is what you want to do.
> Also, I heard about the using Hiera for store nodes configuration, but I
> did not find a good manual about settings for Foreman and Hiera (Is it
> even possible?)
Foreman has no effect on Hiera, so any regular Hiera configuration will
work fine. The only time they're likely to conflict is if you're using
both to manage the same class parameters or node definitions.
> The main idea use Foreman for showing puppet reports and use external
> sources for nodes (which are tracked through Git).
I'd change Puppet's config then not to call Foreman's ENC
(/etc/puppet/node.rb) and either use your own or Hiera. This is the
external_nodes and node_terminus setting in /etc/puppet/puppet.conf,
comment them out
(Foreman :: Manual).
This will also stop facts being uploaded to Foreman, but you can run
node.rb on a cronjob - see the "Pushing facts to Foreman when not using
the ENC functionality" section in the docs URL above for the command(s).