Re: [Puppet Users] puppet cert clean cleaning over and over

2018-05-16 Thread John Warburton
These are held in the CA inventory .../puppet/ssl/ca/inventory.txt

See
https://ask.puppet.com/question/25818/how-to-manage-size-of-inventorytxt/
for a discussion about cleaning it up, but essentially - delete your test
host entries here

John

On 23 April 2018 at 00:32, Marc Haber  wrote:

> Hi,
>
> I do have a certain host that I use for testing. It thus gets deleted
> and re-created (in Foreman) over and over again. Eventually, rebuilding
> the host times out at the puppet cert clean state.
>
> Foreman issues "puppet cert clean FQDN". When I invoke that from the
> command line, I get "Notice: Revoked certificate" for a number of
> serials, filling screens:
>
> Notice: Revoked certificate with serial 4898
> Notice: Revoked certificate with serial 4903
> Notice: Revoked certificate with serial 4904
> Notice: Revoked certificate with serial 4945
> Notice: Revoked certificate with serial 4946
> Notice: Revoked certificate with serial 5149
>
> When the foreman cert clean has eventually finished, the foreman-proxy
> has timed out in the mean time, and the build fails. Repeating the
> puppet cert clean results in the same serials being revoked again and
> again.
>
> Is there a method to clean up the puppet CA so that puppet cert clean
> doesn't try revoking certificates that do no longer exist at all?
>
> There is no file matching the FQDN in /var/lib/puppet/ssl at all.
>
> Greetings
> Marc
>
> --
> 
> -
> Marc Haber | "I don't trust Computers. They | Mailadresse im Header
> Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
> Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421
>
> --
> 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/20180422143251.i5t7v77ed3el5p7e%40torres.zugschlus.de.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
John Warburton
Ph: 0417 299 600
Email: jwarbur...@gmail.com

-- 
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/CAAJLFxVctYSeKEz9whgUERnQBw7WqZ%3DxBoCuMA9vM2jkuiooog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How to create a signal file when the file changes

2018-05-16 Thread 程伟
Hi,everyone! 
I want to create a signal file when some particular file changes. I find a 
syntax called *notify* in puppet docs could realize my need. So I tried 
like this:

file {'target_file':
ensure => 'present',
source => 'puppet:///files/target_file',
path => '/opt/target_file',
notify => File['signal_file'],
}

file {'signal_file':
ensure => 'present',
path => '/opt/signal/signal_file',
subscribe => File['target_file'],
}

However, I tried it many times, and found that even if target_file has 
existed and not changed, signal_file still created. It's not my purpose. 
Can anyone tell me if I miss something? 

-- 
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/33da8d5d-68dc-4daf-a48f-25f5334d0865%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: python Script with answer file not working

2018-05-16 Thread Red Cricket
Notice what your error message is ...  /opt/seafile/test/seafile-serv
er-6.2.5/setup-seafile-mysql.py: Permission denied
make sure that  /opt/seafile/test/seafile-server-6.2.5/setup-seafile-mysql.py
is executable

On Wed, May 16, 2018 at 7:50 PM, 程伟  wrote:

>
>
> 在 2018年5月16日星期三 UTC+8下午8:31:53,Jochen Haeberle写道:
>>
>> Hi,
>>
>> I am trying to install seafile with Puppet. Puppet 5.5.1 on Debian 9.
>>
>> seafile is installed with an interactive shellscript calling a python
>> script. I prepared an answer file, which is interactively working fine, up
>> until where the db password is asked for. The input there is handled
>> differently, not echoed back to the prompt and the execution changes to
>> interactively for the input.
>>
>> The code part getting the user input looks like the following:
>>
>> # prompt for user input
>> if password:
>> answer = getpass.getpass(desc).strip()
>> else:
>> answer = raw_input(desc).strip()
>>
>> Is there a way to get this to work in Puppet? I tried with the following
>> exec:
>>
>> exec { 'run seafile installer w answers file':
>> command   => 
>> "/opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py 
>> /opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt",
>> creates   => "/opt/seafile/${instanz}/seafile-server-latest",
>> require   => Archive[$seafile_archive],
>> provider  => shell,
>>   }
>>
>> but I get:
>>
>> Notice: 
>> /Stage[main]/Role::Share_server/Archive[seafile-server_6.2.5_x86-64.tar.gz]/ensure:
>> download archive from puppet:///modules/profile/seaf
>> ile/seafile-server_6.2.5_x86-64.tar.gz to 
>> /opt/seafile/installed/seafile-server_6.2.5_x86-64.tar.gz
>> and extracted in /opt/seafile/test with cleanup
>> Notice: /Stage[main]/Role::Share_server/File[/opt/seafile/test/seafi
>> le-server-6.2.5/test-answers.txt]/ensure: defined content as
>> '{md5}25f64045b6676488e407c84c6a18eb20'
>> Notice: /Stage[main]/Role::Share_server/Exec[run seafile installer w
>> answers file]/returns: /bin/sh: 1: /opt/seafile/test/seafile-serv
>> er-6.2.5/setup-seafile-mysql.py: Permission denied
>>
>> Can it be done?
>>
>> Thanks in advance
>>
>> Jochen
>>
>
> I think it is a problem about command in exec resource. Why not try  "
> /opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py
> /opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt" in
> your shell? Or try "*python* 
> /opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py
> /opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt"? When
> you make it works in shell, then try it in puppet.
>
> --
> 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/92b21e37-9ecc-49dd-8d61-4f522278d54e%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAHu%2B3OxWr3b5aeWeB6%2BNYShwtc3j_L5XNOGSyivi9CQsO48pMA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: python Script with answer file not working

2018-05-16 Thread 程伟


在 2018年5月16日星期三 UTC+8下午8:31:53,Jochen Haeberle写道:
>
> Hi,
>
> I am trying to install seafile with Puppet. Puppet 5.5.1 on Debian 9.
>
> seafile is installed with an interactive shellscript calling a python 
> script. I prepared an answer file, which is interactively working fine, up 
> until where the db password is asked for. The input there is handled 
> differently, not echoed back to the prompt and the execution changes to 
> interactively for the input.
>
> The code part getting the user input looks like the following:
>
> # prompt for user input
> if password:
> answer = getpass.getpass(desc).strip()
> else:
> answer = raw_input(desc).strip()
>
> Is there a way to get this to work in Puppet? I tried with the following 
> exec:
>
> exec { 'run seafile installer w answers file':
> command   => 
> "/opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py 
> /opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt",
> creates   => "/opt/seafile/${instanz}/seafile-server-latest",
> require   => Archive[$seafile_archive],
> provider  => shell,
>   }
>
> but I get:
>
> Notice: 
> /Stage[main]/Role::Share_server/Archive[seafile-server_6.2.5_x86-64.tar.gz]/ensure:
>  
> download archive from 
> puppet:///modules/profile/seafile/seafile-server_6.2.5_x86-64.tar.gz to 
> /opt/seafile/installed/seafile-server_6.2.5_x86-64.tar.gz and extracted in 
> /opt/seafile/test with cleanup
> Notice: 
> /Stage[main]/Role::Share_server/File[/opt/seafile/test/seafile-server-6.2.5/test-answers.txt]/ensure:
>  
> defined content as '{md5}25f64045b6676488e407c84c6a18eb20'
> Notice: /Stage[main]/Role::Share_server/Exec[run seafile installer w 
> answers file]/returns: /bin/sh: 1: 
> /opt/seafile/test/seafile-server-6.2.5/setup-seafile-mysql.py: Permission 
> denied
>
> Can it be done?
>
> Thanks in advance
>
> Jochen
>

I think it is a problem about command in exec resource. Why not try  "
/opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py 
/opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt" in your 
shell? Or try "*python* 
/opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py 
/opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt"? When 
you make it works in shell, then try it in puppet. 

-- 
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/92b21e37-9ecc-49dd-8d61-4f522278d54e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to organizing puppet code on the master

2018-05-16 Thread Andrew Grimberg
I know some folks think this is heresy, but I personally dislike
defining each node in the default manifest.

I think it's better to drive as much data as possible from hiera as
possible, as such I do it more like this. I define a node definition
that does a hiera lookup to determine what role to apply and drive it
from there.

My current Puppet 5 implementation of this setup can be see here (yes,
this is my live configuration, yes I'm aware that seems horrible running
the whole thing out there like this :D )

Main puppet: https://github.com/tykeal/puppetserver-v5-main

Hiera: https://github.com/tykeal/puppetserver-v5-hiera (uses
hiera-eyaml-gpg for secrets management)

All profiles: https://github.com/tykeal/puppetserver-v5-mod-profile

All roles: https://github.com/tykeal/puppetserver-v5-mod-role

Mind you, I'm working on re-implementing a green field puppet 5 setup.
I've got a working puppet 4 one. All the same repos, just drop the -v5-
from the name.

Check the main repo Puppetfile for all forge / custom modules in play.

-Andy-

On 05/16/2018 02:51 AM, Arnau wrote:
> Hi,
> 
> my opinion: create modules for everything, even if it's a single file
> copy. But create something that you can expand in the future.
> 
> It's quite easy to create a puppet module
> (http://fullstack-puppet-docs.readthedocs.io/en/latest/puppet_modules.html)
> so it will take you 5 minutes to write your own module(s).
> 
> No matter how you start, working with modules is something that you'll
> thank in the future when you decide to add more stuff (code/hosts) to
> your puppet installation..
> 
> Then, create a manifest.pp and configure your nodes like:
> 
> node 'abc' {
> }
> 
> node 'xyz' {
> }
> 
> HTH,
> Arnau
> 
> 2018-05-15 23:00 GMT+02:00 jeffster  >:
> 
> Good day all,
> 
> Newbie looking for some insight on how to organize manifests on
> puppet master. Simple setup with only a couple of machines to
> manage. One of my main sticking point is that according to the
> literature I've seen, they all seem to agree upon the fact that code
> must be organized using modules. My question is--If my setup is so
> simple, can I do without them? All I have are a few manifest files
> and templates.
> 
> Secondly, should I go with the modules approach and divide my code
> in said modules, what happens when a portion of puppet code doesn't
> really fit logically into any of them? Would the code be kept at the
> site.pp level instead?
> 
> Thank you
> 
> jeff
> 
> -- 
> 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/bb6a05e9-fe38-4bdf-9a77-702cc8227824%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout
> .
> 
> 
> -- 
> 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/CAM69jx93Qgt4OShRycGzjibCv%2Bb%3DiNer3GAXrBhT5hWWb3vTyQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
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/3bf47011-3aea-f7b3-a8a9-ff9a404e2f8e%40bardicgrove.org.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: augeas, ntp.conf and iburst

2018-05-16 Thread David Lutterkort


On Tuesday, May 15, 2018 at 2:17:58 PM UTC-7, badmeischter wrote:
>
> This is an old thread, however I was desperate to find an answer for the 
> same question and would like to share what I found out
>
> Am Donnerstag, 13. März 2014 11:04:36 UTC+1 schrieb zerozer...@gmail.com:
>>
>> On Wednesday, March 12, 2014 3:35:09 PM UTC+1, kbrede wrote:
>>  
>>
>>> How do I append "iburst" at the end of "time.example.com?"
>>>
>>
>> AFAICT in augtool this works:
>>
>>   set /files/etc/ntp.conf/server[1] "time.example.com iburst"
>>
>
> NOPE, this  will not work. Assuming you are in the augtool shell:
>
> augtool> match /files/etc/ntp.conf/server
> /files/etc/ntp.conf/server[1] = 3.ch.pool.ntp.org
> /files/etc/ntp.conf/server[2] = 0.ch.pool.ntp.org
> /files/etc/ntp.conf/server[3] = 2.ch.pool.ntp.org
> /files/etc/ntp.conf/server[4] = 1.ch.pool.ntp.org
> augtool> match /files/etc/ntp.conf/*[iburst]
> /files/etc/ntp.conf/server[1] = 3.ch.pool.ntp.org
> /files/etc/ntp.conf/server[2] = 0.ch.pool.ntp.org
> /files/etc/ntp.conf/server[3] = 2.ch.pool.ntp.org
> augtool> set /files/etc/ntp.conf/server[4]/iburst
> augtool> match /files/etc/ntp.conf/*[iburst]
> /files/etc/ntp.conf/server[1] = 3.ch.pool.ntp.org
> /files/etc/ntp.conf/server[2] = 0.ch.pool.ntp.org
> /files/etc/ntp.conf/server[3] = 2.ch.pool.ntp.org
> /files/etc/ntp.conf/server[4] = 1.ch.pool.ntp.org
>

The missing ingredient is that you need to create an `iburst` node 
underneath your new server; in augtool something like

ins server before server[1]
set server[1] time.example.com
touch server[1]/iburst
save

The 'touch' will create a node with no content/value, which is exactly what 
the Ntp lens expects to output 'iburst' after the server name. I highly 
recommend dumping the whole tree structure in cases like this with 
something like 'print /files/etc/ntp.conf' in augtool (or using the brand 
new 'augmatch' command line tool, e.g. 'augmatch -a /etc/ntp.conf' ;)

David

-- 
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/1734d9fa-f13b-4eab-a6f9-52cb4984cf6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: How to organizing puppet code on the master

2018-05-16 Thread jeffster
John, Arnau -- 

hank you for your responses. I feel more confident about how to approach 
organizing my code and how modules are used.

cheers!

JF

-- 
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/db1355cf-3981-4151-a196-7f83ff0744ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: How to organizing puppet code on the master

2018-05-16 Thread jcbollinger


On Tuesday, May 15, 2018 at 4:17:58 PM UTC-5, jeffster wrote:
>
> Good day all,
>
> Newbie looking for some insight on how to organize manifests on puppet 
> master. Simple setup with only a couple of machines to manage. One of my 
> main sticking point is that according to the literature I've seen, they all 
> seem to agree upon the fact that code must be organized using modules. My 
> question is--If my setup is so simple, can I do without them? All I have 
> are a few manifest files and templates.
>
 

It is *possible* to build a functional manifest set that does not use 
modules, but it is a poor idea.  Most sites have at least one (local) 
module for configuration details specific to that site, however, and it may 
be that putting your few manifests and templates all into one such module 
will be sufficient for you, at least to start.

 

> Secondly, should I go with the modules approach and divide my code in said 
> modules, what happens when a portion of puppet code doesn't really fit 
> logically into any of them? Would the code be kept at the site.pp level 
> instead?
>


All classes should belong to modules, but you may use a local site module 
such as I already described as a catch-all for miscellany. Precious little 
is appropriately placed at top scope in the site manifest.  Node blocks, if 
you use them, are by far the most prominent among those.  With very few 
(situational) exceptions, all other manifest code should go into classes or 
node blocks.  The decision is not about logical fit, but rather about the 
semantics of top-scope code vs. more narrowly scoped code.

Note, too, that there is nothing inherently wrong with very small modules, 
if that seems to be a reasonable alternative for some of your code.


John

-- 
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/9af7c3bc-7692-42bd-920c-3f54abff553e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] work on config that does not exist on first run

2018-05-16 Thread Jochen Haeberle
Hi again,

as outlined in my last post, I am trying to setup seafile using Puppet 5.5.1 on 
Debian 9.

I am struggling with a script based installation. As a work around, I tried to 
separate the steps. I want to prepare an answer file for the setup script, run 
that and adjust the config on the second puppet run.

I am having two problems:

When the script is run, there exists a symlink in the filesystem. Following a 
recipt from not so long ago, I want to use this:

exec {"check_installed":
  command => '/bin/true',
  onlyif => "/usr/bin/test -e /opt/seafile/${instanz}/seafile-server-latest",
}

1) I want to move the data folder created by the installer to a networked 
folder and create a symlink afterwards. The exec moving the folder is waiting 
for the existence of the folder, but the file resource doing the link is always 
executing. It seems like Puppet behaviour changed massively from version 3 I 
cannot find a working solution for this except writing a fact, which seems not 
manageable, as a fact may not be parameterized.
Is there a way to control execution of a file resource?

This runs all the time:
file { "/opt/seafile/${instanz}/seafile-data":
  ensure  => 'link',
  target  => "/mnt/seafile/${instanz}/seafile-data",
  require => Exec['check_installed'],
}

after that, the seafile installer will not run through, as the data-folder is 
already there.

2) I need to change the ini-based config crated during the setup. Problem is 
similar, whatever I do, this always runs and gives me an error:
ini_setting { "URL ${instanz}":
  ensure  => present,
  path=> "/opt/seafile/${instanz}/conf/ccnet.conf",
  section => 'General',
  setting => 'SERVICE_URL',
  value   => "https://${url};,
  require => Exec['check_installed'],
}
This is not that problematic, it gives an error, but puppet continues on. But I 
guess, I could run 1) as exec to solve it, but not 2)

Thanks for any advice, regards

Jochen

-- 
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/F8DB3F41-CC88-48D3-BC55-A1A047CCAEE8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] python Script with answer file not working

2018-05-16 Thread Jochen Haeberle
Hi,

I am trying to install seafile with Puppet. Puppet 5.5.1 on Debian 9.

seafile is installed with an interactive shellscript calling a python script. I 
prepared an answer file, which is interactively working fine, up until where 
the db password is asked for. The input there is handled differently, not 
echoed back to the prompt and the execution changes to interactively for the 
input.

The code part getting the user input looks like the following:

# prompt for user input
if password:
answer = getpass.getpass(desc).strip()
else:
answer = raw_input(desc).strip()

Is there a way to get this to work in Puppet? I tried with the following exec:

exec { 'run seafile installer w answers file':
command   => 
"/opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py 
/opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt",
creates   => "/opt/seafile/${instanz}/seafile-server-latest",
require   => Archive[$seafile_archive],
provider  => shell,
  }
but I get:

Notice: 
/Stage[main]/Role::Share_server/Archive[seafile-server_6.2.5_x86-64.tar.gz]/ensure:
 download archive from 
puppet:///modules/profile/seafile/seafile-server_6.2.5_x86-64.tar.gz 
 to 
/opt/seafile/installed/seafile-server_6.2.5_x86-64.tar.gz and extracted in 
/opt/seafile/test with cleanup
Notice: 
/Stage[main]/Role::Share_server/File[/opt/seafile/test/seafile-server-6.2.5/test-answers.txt]/ensure:
 defined content as '{md5}25f64045b6676488e407c84c6a18eb20'
Notice: /Stage[main]/Role::Share_server/Exec[run seafile installer w answers 
file]/returns: /bin/sh: 1: 
/opt/seafile/test/seafile-server-6.2.5/setup-seafile-mysql.py: Permission denied

Can it be done?

Thanks in advance

Jochen

-- 
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/460B6AC6-31F5-49E2-BA5D-F06F34DD112F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to organizing puppet code on the master

2018-05-16 Thread Arnau
Hi,

my opinion: create modules for everything, even if it's a single file copy.
But create something that you can expand in the future.

It's quite easy to create a puppet module (
http://fullstack-puppet-docs.readthedocs.io/en/latest/puppet_modules.html)
so it will take you 5 minutes to write your own module(s).

No matter how you start, working with modules is something that you'll
thank in the future when you decide to add more stuff (code/hosts) to your
puppet installation..

Then, create a manifest.pp and configure your nodes like:

node 'abc' {
}

node 'xyz' {
}

HTH,
Arnau

2018-05-15 23:00 GMT+02:00 jeffster :

> Good day all,
>
> Newbie looking for some insight on how to organize manifests on puppet
> master. Simple setup with only a couple of machines to manage. One of my
> main sticking point is that according to the literature I've seen, they all
> seem to agree upon the fact that code must be organized using modules. My
> question is--If my setup is so simple, can I do without them? All I have
> are a few manifest files and templates.
>
> Secondly, should I go with the modules approach and divide my code in said
> modules, what happens when a portion of puppet code doesn't really fit
> logically into any of them? Would the code be kept at the site.pp level
> instead?
>
> Thank you
>
> jeff
>
> --
> 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/bb6a05e9-fe38-4bdf-9a77-702cc8227824%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAM69jx93Qgt4OShRycGzjibCv%2Bb%3DiNer3GAXrBhT5hWWb3vTyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] converting Hiera v3 to v5 - :merge_behavior: deeper option?

2018-05-16 Thread du

Thanks all for your responses 

On a closer inspection, it turns out that deep merger indeed works out of 
the box on v5 without any additional tweaks. (@Henrik - your regex 
suggestion also works and I can no longer see errors)

We are not looking to stick with v3 forever, just wanted to minimise the 
number of changes as we make a big leap from puppet 3 to puppet 4

-- 
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/efde2c1b-303e-4f55-a0e9-5ecc9176e590%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.