Re: [Puppet Users] Multiple resource bodies?

2016-05-30 Thread dkoleary
Hey;

Thank you all for the information.  That was definitely the issue.  I'm not 
overly worried about '/' so I just took it out - primarily had it in there 
for completeness.  In nigh on 30 years of admin, I think I've had someone 
change the ownership of root maybe twice.  Those other directories - that 
tends to happen more often.  

Any rate, thanks again.  I appreciate it.

Doug O'Leary

-- 
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/9ef583ff-cf25-4032-94d2-4fe42c479188%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Multiple resource bodies?

2016-05-30 Thread Henrik Lindberg

On 30/05/16 19:45, Rob Nelson wrote:

I would be willing to bet '/' is somewhat special and may be the
problem. I've never actually tried to manage the root of the FS directly
and I think the need to may indicate some more significant issues than
puppet should be handling.



Yes, known problem.
See https://tickets.puppetlabs.com/browse/PUP-1796


You could also look at pl_training/dirtree, which lets you manage a
single directory and it will create intermediate directories as needed
with the same owner/group/mode.



That may work around the problem in PUP-1796.

- henrik


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/b6013b60-a3b6-c46b-58b3-384a0c194532%40puppet.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Multiple resource bodies?

2016-05-30 Thread Rob Nelson
I would be willing to bet '/' is somewhat special and may be the problem.
I've never actually tried to manage the root of the FS directly and I think
the need to may indicate some more significant issues than puppet should be
handling.

You could also look at pl_training/dirtree, which lets you manage a single
directory and it will create intermediate directories as needed with the
same owner/group/mode.

On Monday, May 30, 2016, Arpin Dominique (Nter) <
dominique.ar...@casino.qc.ca> wrote:

> Hi,
>
>
>
> Maybe you can regroup each item with the same configuration, like this:
>
>
>
> $file_system_list = [‘/’,’/home’,’/opt’]
>
>
>
> $file_system_list.each | String $file_system| {
>
>   file {“$file_system”:
>
> ensure => ‘directory’,
>
> owner => ‘root’,
>
> group => ‘root’
>
>   }
>
> }
>
>
>
>
>
>
>
> *Dominique Arpin*
>
> Tél. Interne: 140-4156
>
> Tél. 514 285.2929 Poste: 140-4156
>
>
> *De :* puppet-users@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','puppet-users@googlegroups.com');> [mailto:
> puppet-users@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','puppet-users@googlegroups.com');>] *De la
> part de* dkoleary
> *Envoyé :* 30 mai, 2016 13:09
> *À :* Puppet Users
> *Objet :* [Puppet Users] Multiple resource bodies?
>
>
>
> Hey;
>
>
>
> According to the puppet language resource guide at
> https://docs.puppet.com/puppet/latest/reference/lang_resources_advanced.html
> :
>
> If a resource expression includes more than one resource body, the
> expression will declare multiple resources of that resource type. (A
> resource body is a title and a set of attributes; each body must be
> separated from the next one with a semicolon.)
>
> With that, can someone take a peek and tell me what I'm messing up with
> this manifest?
>
>
>
> file {
>   default:
> ensure   => 'directory',
> owner=> 'root',
> group=> 'root',
>   ;
>
>
>   '/': mode  => '0755' ;
>   '/home': mode  => '0755' ;
>   '/opt' : mode  => '0755' ;
>   '/usr' : mode  => '0755' ;
>   '/var' : mode  => '0755' ;
>   '/tmp' : mode  => '1777' ;
>   '/var/tmp' : mode  => '1777' ;
>
>
>   '/etc/passwd':
> ensure   => 'file',
> mode => '0644',
>   ;
>   '/etc/group':
> ensure   => 'file',
> mode => '0644',
>   ;
>
>
>   '/etc/shadow':
> ensure   => 'file',
> mode => '',
>   ;
>
>
>   '/etc/rc.d/init.d':
> mode => '0755',
> recurse  => true,
>   ;
> }
>
>
>
>
>
> I'm not seeing the error; but, when I try to apply it, I get:
>
> $ sudo puppet apply ./file.pp
>
> Notice: Compiled catalog for node1.olearycomputers.com in environment
> production in 0.04 seconds
>
> Error: Parameter path failed on File[/]: File paths must be fully
> qualified, not '' at
> /ignite/dkoleary/mpi_git/puppet/modules/mpicommon/manifests/file.pp:1
>
>
>
> Any pointers, greatly appreciated.
>
>
>
> Doug O'Leary
>
>
>
> --
> 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
> <javascript:_e(%7B%7D,'cvml','puppet-users%2bunsubscr...@googlegroups.com');>
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/f284439e-d1d8-49f0-a77e-d0c07ce61239%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/f284439e-d1d8-49f0-a77e-d0c07ce61239%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> Mise en garde concernant la confidentialité : Le présent message,
> comprenant tout fichier qui y est joint, est envoyé à l'intention exclusive
> de son destinataire; il est de nature confidentielle et peut constituer une
> information protégée par le secret professionnel. Si vous n'êtes pas le
> destinataire, nous vous avisons que toute impression, copie, distribution
> ou autre utilisation de ce message est strictement interdite. Si vous avez
> reçu ce courriel par erreur, veuillez en aviser immédiatement l'expéditeur
> par retour de courriel et supprimer le courriel. Merci!
>
> Confidentiality Warning: This message, including any attachment, is sent
> only for the use of the intended recipient; it is confidential and may
> constitute privileged information. If you are not the intended recipient,
> you are hereby notified t

Re: [Puppet Users] Multiple resource bodies?

2016-05-30 Thread Henrik Lindberg

On 30/05/16 19:09, dkoleary wrote:

Hey;

According to the puppet language resource guide
at https://docs.puppet.com/puppet/latest/reference/lang_resources_advanced.html:

If a resource expression includes more than one resource body, the
expression will declare multiple resources of that resource type. (A
resource body is a title and a set of attributes; each body must be
separated from the next one with a semicolon.)

With that, can someone take a peek and tell me what I'm messing up with
this manifest?

|
file {
  default:
ensure  =>'directory',
owner=>'root',
group   =>'root',
  ;


  '/'   :mode  =>'0755';
  '/home'   :mode  =>'0755';
  '/opt':mode  =>'0755';
  '/usr':mode  =>'0755';
  '/var':mode  =>'0755';
  '/tmp':mode  =>'1777';
  '/var/tmp':mode  =>'1777';


  '/etc/passwd':
ensure  =>'file',
mode =>'0644',
  ;
  '/etc/group':
ensure  =>'file',
mode =>'0644',
  ;


  '/etc/shadow':
ensure  =>'file',
mode =>'',
  ;


  '/etc/rc.d/init.d':
mode =>'0755',
recurse  =>true,
  ;
}
|


I'm not seeing the error; but, when I try to apply it, I get:

$ sudo puppet apply ./file.pp
Notice: Compiled catalog for node1.olearycomputers.com in environment
production in 0.04 seconds
Error: Parameter path failed on File[/]: File paths must be fully
qualified, not '' at
/ignite/dkoleary/mpi_git/puppet/modules/mpicommon/manifests/file.pp:1

Any pointers, greatly appreciated.



From what I can tell by reading through that, your manifest looks ok in 
terms of multiple bodies and use of defaults.


The problem is known. See https://tickets.puppetlabs.com/browse/PUP-1796
which has a work around using '/.' (which may or may not work according 
to the comments on that ticket).


- henrik


Doug O'Leary

--
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/f284439e-d1d8-49f0-a77e-d0c07ce61239%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.





--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/e8fe22be-eaf7-39e1-ef5c-4cdd5848ec94%40puppet.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Multiple resource bodies?

2016-05-30 Thread dkoleary
Hey;

Thanks for the response.  I'm trying to work my way into iteration a bit 
slower than my fourth manifest :)  If all else fails, I'm pretty sure I can 
set up separate file resource declarations; but, this multiple resource 
bodies, in this case, seems like this is cleaner.

Thanks

Doug O'Leary

-- 
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/ef2dfc24-053b-4e73-aa76-eb857b8db0fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [Puppet Users] Multiple resource bodies?

2016-05-30 Thread Arpin Dominique (Nter)
Hi,

Maybe you can regroup each item with the same configuration, like this:

$file_system_list = [‘/’,’/home’,’/opt’]

$file_system_list.each | String $file_system| {
  file {“$file_system”:
ensure => ‘directory’,
owner => ‘root’,
group => ‘root’
  }
}



Dominique Arpin
Tél. Interne: 140-4156
Tél. 514 285.2929 Poste: 140-4156


De : puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] De la 
part de dkoleary
Envoyé : 30 mai, 2016 13:09
À : Puppet Users
Objet : [Puppet Users] Multiple resource bodies?

Hey;

According to the puppet language resource guide at 
https://docs.puppet.com/puppet/latest/reference/lang_resources_advanced.html:

If a resource expression includes more than one resource body, the expression 
will declare multiple resources of that resource type. (A resource body is a 
title and a set of attributes; each body must be separated from the next one 
with a semicolon.)
With that, can someone take a peek and tell me what I'm messing up with this 
manifest?

file {
  default:
ensure   => 'directory',
owner=> 'root',
group=> 'root',
  ;


  '/': mode  => '0755' ;
  '/home': mode  => '0755' ;
  '/opt' : mode  => '0755' ;
  '/usr' : mode  => '0755' ;
  '/var' : mode  => '0755' ;
  '/tmp' : mode  => '1777' ;
  '/var/tmp' : mode  => '1777' ;


  '/etc/passwd':
ensure   => 'file',
mode => '0644',
  ;
  '/etc/group':
ensure   => 'file',
mode => '0644',
  ;


  '/etc/shadow':
ensure   => 'file',
mode => '',
  ;


  '/etc/rc.d/init.d':
mode => '0755',
recurse  => true,
  ;
}


I'm not seeing the error; but, when I try to apply it, I get:
$ sudo puppet apply ./file.pp
Notice: Compiled catalog for node1.olearycomputers.com in environment 
production in 0.04 seconds
Error: Parameter path failed on File[/]: File paths must be fully qualified, 
not '' at /ignite/dkoleary/mpi_git/puppet/modules/mpicommon/manifests/file.pp:1

Any pointers, greatly appreciated.

Doug O'Leary

--
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<mailto:puppet-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f284439e-d1d8-49f0-a77e-d0c07ce61239%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/f284439e-d1d8-49f0-a77e-d0c07ce61239%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.

Mise en garde concernant la confidentialité : Le présent message, comprenant 
tout fichier qui y est joint, est envoyé à l'intention exclusive de son 
destinataire; il est de nature confidentielle et peut constituer une 
information protégée par le secret professionnel. Si vous n'êtes pas le 
destinataire, nous vous avisons que toute impression, copie, distribution ou 
autre utilisation de ce message est strictement interdite. Si vous avez reçu ce 
courriel par erreur, veuillez en aviser immédiatement l'expéditeur par retour 
de courriel et supprimer le courriel. Merci!

Confidentiality Warning: This message, including any attachment, is sent only 
for the use of the intended recipient; it is confidential and may constitute 
privileged information. If you are not the intended recipient, you are hereby 
notified that any printing, copying, distribution or other use of this message 
is strictly prohibited. If you have received this email in error, please notify 
the sender immediately by return email, and delete it. Thank you!

-- 
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/C2F62CDF5915D0458F0528664315BAE760A2217E%40MTL1EXC01.scqmtl.loto-quebec.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Multiple resource bodies?

2016-05-30 Thread dkoleary
Hey;

According to the puppet language resource guide 
at https://docs.puppet.com/puppet/latest/reference/lang_resources_advanced.html:

If a resource expression includes more than one resource body, the 
expression will declare multiple resources of that resource type. (A 
resource body is a title and a set of attributes; each body must be 
separated from the next one with a semicolon.)

With that, can someone take a peek and tell me what I'm messing up with 
this manifest?

file {
  default:
ensure   => 'directory',
owner=> 'root',
group=> 'root',
  ;


  '/': mode  => '0755' ;
  '/home': mode  => '0755' ;
  '/opt' : mode  => '0755' ;
  '/usr' : mode  => '0755' ;
  '/var' : mode  => '0755' ;
  '/tmp' : mode  => '1777' ;
  '/var/tmp' : mode  => '1777' ;


  '/etc/passwd':
ensure   => 'file',
mode => '0644',
  ;
  '/etc/group':
ensure   => 'file',
mode => '0644',
  ;


  '/etc/shadow':
ensure   => 'file',
mode => '',
  ;


  '/etc/rc.d/init.d':
mode => '0755',
recurse  => true,
  ;
}


I'm not seeing the error; but, when I try to apply it, I get:

$ sudo puppet apply ./file.pp
Notice: Compiled catalog for node1.olearycomputers.com in environment 
production in 0.04 seconds
Error: Parameter path failed on File[/]: File paths must be fully 
qualified, not '' at 
/ignite/dkoleary/mpi_git/puppet/modules/mpicommon/manifests/file.pp:1

Any pointers, greatly appreciated.

Doug O'Leary

-- 
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/f284439e-d1d8-49f0-a77e-d0c07ce61239%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.