--------------------------------------------
On Wed, 12/28/16, armstrongjerry893 via Puppet Users 
<puppet-users@googlegroups.com> wrote:

 Subject: Re: [Puppet Users] Re: Puppet3 | hiera | role -> Problem 
role/mysql.yaml not used -> example from rnelson0.com with mysql
 To: puppet-users@googlegroups.com
 Date: Wednesday, December 28, 2016, 5:03 AM
 
 
 --------------------------------------------
 On Tue, 12/27/16, Rob Nelson <rnels...@gmail.com>
 wrote:
 
  Subject: Re: [Puppet Users] Re: Puppet3 | hiera | role
 -> Problem role/mysql.yaml not used -> example from
 rnelson0.com with mysql
  To: puppet-users@googlegroups.com
  Date: Tuesday, December 27, 2016, 7:55 PM
  
  Adding the fact to a
  module is a recommended method, which is what you are
 doing.
  That file will get synced to a client first, then facts
 are
  collected, then the catalog is generated using those
 facts,
  so this ensures the correct order of
  operations.
  The only
  thing you may want to tweak is what module the fact is in.
 I
  put most of mine in my profile module since that's part
  of my controlrepo, but you could make a personal_facts
  module if you wanted to consolidate multiple custom facts
 in
  one place. I wouldn't prematurely optimize this,
  it's easy to change later.
  On Tue, Dec 27, 2016
  at 10:34 AM Denny Fuchs <denny.schi...@gmail.com>
  wrote:
  hi,
  
  thanks for the reply :-) 
  
  I added a custom fact via
  modules/role/lib/facter/role.rb
  
  Facter.add(:role) do
     setcode do
       host = Facter.value(:fqdn)
       declared_role
  = Facter.value(host)
     
   declared_role.nil? ? 'base' :
  declared_role
     end
  end
  I copied that piece of code
  and it works, if I change "base" to
  "mysql_server". In the end, I can execute on the
  mon.example.com
  "facter -p role" and I get
  "mysql_server" back. So far so good. I saw many
  examples how to set the fact, but mostly I dislike them
  (e.g. create file /etc/system_role ... hardcoded in the
  Facter.add .... ). What I miss: how can I set the fact
 (role
  in my case) via hiera, or via node manifest ?
  
  
  cu denny
  
  
  
  
  
  
  
  
  -- 
  
  
  You received this message
  because you are subscribed to the Google Groups "Puppet
  Users" group.
  
  
  To unsubscribe from this group and stop
  receiving emails from it, send an email to 
puppet-users+unsubscr...@googlegroups.com.
  
  
  To view this discussion on the
  web visit
 
https://groups.google.com/d/msgid/puppet-users/2840db66-1c91-43c9-8e96-47f52b38f7e6%40googlegroups.com.
  
  
  For more options, visit
 https://groups.google.com/d/optout.
  
  
  -- 
  Rob Nelson 
  
  
  
  -- 
  
  You received this message because you are subscribed to
 the
  Google Groups "Puppet Users" group.
  
  To unsubscribe from this group and stop receiving emails
  from it, send an email to puppet-users+unsubscr...@googlegroups.com.
  
  To view this discussion on the web visit
 
https://groups.google.com/d/msgid/puppet-users/CAC76iT_XWnDqK4Hzx-F49tcjYMpjvcfGRwo%2BVKhsLM3f1xiF7w%40mail.gmail.com.
  
  For more options, visit
 https://groups.google.com/d/optout.
  n a doua jumatate a anului 1838  Alexandru Ghica a
 plecat din tara  tentia declarata de a-si ingriji
 sanatatea in strainatate. in absenta sa  din se
 anunta  la 20 ianuarie 1839  ca o parte dintre
 boieri sunt hotarati sa-l ja domn pe Ion Campineanu 
 candidatura insa repede abandonata in lipsa imitatii.
 
 -- 
 You received this message because you are subscribed to the
 Google Groups "Puppet Users" group.
 To unsubscribe from this group and stop receiving emails
 from it, send an email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 
https://groups.google.com/d/msgid/puppet-users/287363314.1790332.1482894190612%40mail.yahoo.com.
 For more options, visit
 https://groups.google.com/d/optout.bia dupa 1867 hcrurile s-au schimbat 
radical  ambele categorii de >prietan - satenii  pe de o parte  proprietarii de 
mosii  pe de alta -  acum aptati noii situatii  au valorificat mai bine 
pamantul. Din sporul de productie -e a determinat si importante cresteri ale 
exportului s-au putut face acumulari  nnificative - p=irte intrebuintate' 
pentru achizitia de masini agricole  parte ntru cresterea investitiilor 
interne. Drumul spre societatea moderna  deschis :a la inceputul secolului  a 
fost astfel mult inlesnit.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1481898396.2057462.1482931787915%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to