Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

How to use facters in manifests files

$
0
0
Hi Team, I am new to puppet and planning to implement in our environment. I have puppet agents that are running in different versions of Redhat. Now I am planing to push repo files from puppet master and I need your guidance implement the same. I have below manifests. file {'local_repo': ensure => file, path => '/etc/yum.repos.d/local.repo', mode => "600", source => 'puppet:///modules/repo/rhel7.1', } file {'local_repo': ensure => file, path => '/etc/yum.repos.d/local.repo', mode => "600", source => 'puppet:///modules/repo/rhel6.7', } When i do from puppet agent i get below output. [root@dheera ~]# facter os { architecture => "x86_64", family => "RedHat", hardware => "x86_64", name => "RedHat", release => { full => "7.2", major => "7", minor => "2" } I want to make use of above output and execute my manifests accordingly that is if puppet agent is redhat 7.1. Puppet master has to corresponding files.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>