Re: [Puppet Users] unable to create home directory

2016-04-04 Thread Patrick G.
I don't need to create the user just /home//.ssh because the user 
exist in ldap.
So how do I give access to puppet to create only /home/admin/.ssh



Op vrijdag 1 april 2016 16:32:43 UTC+2 schreef Mike Hendon:
>
>
> On Friday, 1 April 2016 14:34:01 UTC+1, jcbollinger wrote:
>>
>>
>>
>> On Thursday, March 31, 2016 at 9:34:04 AM UTC-5, Warron French wrote:
>>>
>>> Isn't .ssh created after the first time a user attempts an SSH outbound 
>>> connection, not at initial creation of homedirs?
>>>
>>
>> Inasmuch as we seem to be talking about OpenSSH or a work-alike, yes, the 
>> ssh client creates the .ssh/ directory automatically at need.  In no way 
>> does that mean it cannot or should not be created by another mechanism, 
>> however.  The directory needs to exist so that Puppet can manage an 
>> authorized key entry within.  If it does not already exist at the time of 
>> the catalog run, then Puppet needs to create it.  Puppet is trying to do 
>> so, but failing.
>>
>>
>> John
>>
>>
> To create the admin home directory first the ssh key resource should be 
> dependent on an admin user resource. 
>

-- 
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/310a2efd-c008-4052-af72-f5b51f386b57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] unable to create home directory

2016-03-31 Thread Patrick G.
/home does exists but /home/admin doesn’t because it is a new user.

How should I give puppet permission to create this directory?

> On 31 mrt. 2016, at 13:14, Chad Huneycutt <chad.huneyc...@gmail.com> wrote:
> 
> That is actually where it is failing. Does /home and /home/admin exist?  Does 
> puppet have permission to create it?
> 
> 
> On Thursday, March 31, 2016, Patrick G. <pgh2...@gmail.com 
> <mailto:pgh2...@gmail.com>> wrote:
> Nope …
> With new users this should create the directory.
> 
> The debug log shows:
>> Debug: Creating /home/admin/.ssh
> 
> But it doesn’t create it.
> 
> Gr. Patrick.
> 
>> On 29 mrt. 2016, at 17:09, Lowe Schmidt <m...@loweschmidt.se 
>> <javascript:_e(%7B%7D,'cvml','m...@loweschmidt.se');>> wrote:
>> 
>> > Notice: /Stage[main]/Ssh/Ssh_authorized_key[admin]/ensure: created
>> > Debug: Creating /home/admin/.ssh
>> > Error: /Stage[main]/Ssh/Ssh_authorized_key[admin]: Could not evaluate: No 
>> > such file > or directory - /home/admin/.ssh
>> 
>> Well, does the directory /home/admin/.ssh exist? 
>> 
>> 
>> --
>> Lowe Schmidt | +46 723 867 157
>> 
>> On 29 March 2016 at 16:44, Patrick G. <pgh2...@gmail.com 
>> <javascript:_e(%7B%7D,'cvml','pgh2...@gmail.com');>> wrote:
>> Hi,
>> 
>> I am using # puppet-module-ssh
>> 
>> In the yaml file I have:
>> 
>> ssh::keys:
>>   admin:
>> ensure: present
>> user: admin
>> type: dsa
>> key: ...==
>> 
>> But when running puppet agent I get:
>> 
>> Notice: /Stage[main]/Ssh/Ssh_authorized_key[admin]/ensure: created
>> Debug: Creating /home/admin/.ssh
>> Error: /Stage[main]/Ssh/Ssh_authorized_key[admin]: Could not evaluate: No 
>> such file or directory - /home/admin/.ssh
>> 
>> 
>> 
>> 
>> -- 
>> 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/892b9b3a-30b3-47e5-8c0f-1e52a2309179%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/892b9b3a-30b3-47e5-8c0f-1e52a2309179%40googlegroups.com?utm_medium=email_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <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 
>> <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/CAC-wWcRByycxjrkvWMWrOhX7EiVGLxrsQ7z2zx8m8%3DBt7Wc6Mg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/CAC-wWcRByycxjrkvWMWrOhX7EiVGLxrsQ7z2zx8m8%3DBt7Wc6Mg%40mail.gmail.com?utm_medium=email_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <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 
> <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/3BE51F3A-023A-46F8-AF09-881F68CA5E92%40gmail.com
>  
> <https://groups.google.com/d/msgid/puppet-users/3BE51F3A-023A-46F8-AF09-881F68CA5E92%40gmail.com?utm_medium=email_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> Chad M. Huneycutt
> 
> -- 
> 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-us

Re: [Puppet Users] unable to create home directory

2016-03-31 Thread Patrick G.
Nope …
With new users this should create the directory.

The debug log shows:
> Debug: Creating /home/admin/.ssh

But it doesn’t create it.

Gr. Patrick.

> On 29 mrt. 2016, at 17:09, Lowe Schmidt <m...@loweschmidt.se> wrote:
> 
> > Notice: /Stage[main]/Ssh/Ssh_authorized_key[admin]/ensure: created
> > Debug: Creating /home/admin/.ssh
> > Error: /Stage[main]/Ssh/Ssh_authorized_key[admin]: Could not evaluate: No 
> > such file > or directory - /home/admin/.ssh
> 
> Well, does the directory /home/admin/.ssh exist? 
> 
> 
> --
> Lowe Schmidt | +46 723 867 157
> 
> On 29 March 2016 at 16:44, Patrick G. <pgh2...@gmail.com 
> <mailto:pgh2...@gmail.com>> wrote:
> Hi,
> 
> I am using # puppet-module-ssh
> 
> In the yaml file I have:
> 
> ssh::keys:
>   admin:
> ensure: present
> user: admin
> type: dsa
> key: ...==
> 
> But when running puppet agent I get:
> 
> Notice: /Stage[main]/Ssh/Ssh_authorized_key[admin]/ensure: created
> Debug: Creating /home/admin/.ssh
> Error: /Stage[main]/Ssh/Ssh_authorized_key[admin]: Could not evaluate: No 
> such file or directory - /home/admin/.ssh
> 
> 
> 
> 
> -- 
> 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/892b9b3a-30b3-47e5-8c0f-1e52a2309179%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/892b9b3a-30b3-47e5-8c0f-1e52a2309179%40googlegroups.com?utm_medium=email_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <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 
> <mailto:puppet-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAC-wWcRByycxjrkvWMWrOhX7EiVGLxrsQ7z2zx8m8%3DBt7Wc6Mg%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/puppet-users/CAC-wWcRByycxjrkvWMWrOhX7EiVGLxrsQ7z2zx8m8%3DBt7Wc6Mg%40mail.gmail.com?utm_medium=email_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <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/3BE51F3A-023A-46F8-AF09-881F68CA5E92%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] unable to create home directory

2016-03-29 Thread Patrick G.
Hi,

I am using # puppet-module-ssh

In the yaml file I have:

ssh::keys:
  admin:
ensure: present
user: admin
type: dsa
key: ...==

But when running puppet agent I get:

Notice: /Stage[main]/Ssh/Ssh_authorized_key[admin]/ensure: created
Debug: Creating /home/admin/.ssh
Error: /Stage[main]/Ssh/Ssh_authorized_key[admin]: Could not evaluate: No 
such file or directory - /home/admin/.ssh



-- 
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/892b9b3a-30b3-47e5-8c0f-1e52a2309179%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] merge 2 of more files

2015-09-07 Thread Patrick G.
Hi,

In /etc/puppet/hieradata/users/ I have 2 yaml files.
For a node I want to merge these files and on the other node only one file.

In the /etc/puppet/enc/nodes/server1.yaml I have:
---
classes:
  - ssh
parameters:
  usergroups: 
- group1
- group2

And on the other node only -group2.

The problem is that the first node is not merging the 2 files.

What am I doing wrong here?

regards, Patrick.

-- 
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/c06e6d83-fbe1-4f52-9bf2-5615a8fea5b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] keep changing owner

2015-08-24 Thread Patrick G.
Thanks .. that module did changed the ownership of libdir.

Regards, Patrick.


Op maandag 17 augustus 2015 17:55:51 UTC+2 schreef Josh Cooper:

 Hi Patrick,

 On Thu, Aug 13, 2015 at 6:10 AM, Patrick G. pgh...@gmail.com 
 javascript: wrote:

 Hi,

 When running puppet agent -t I get

 Notice: /File[/var/lib/puppet/lib]/owner: owner changed 'puppet' to 'root'
 Notice: /File[/var/lib/puppet/lib]/group: group changed 'puppet' to 'root'

 And then

 Notice: /Stage[main]/My_fw/File[/var/lib/puppet/lib]/owner: owner changed 
 'root' to 'puppet'
 Notice: /Stage[main]/My_fw/File[/var/lib/puppet/lib]/group: group changed 
 'root' to 'puppet'

 For a lot of files.

 Why?


 Puppet will manage file permissions for its internal settings that are 
 file/directories, e.g. Puppet[:libdir] is /var/lib/puppet/lib. It appears 
 you have a module that is trying to manage permissions on that directory as 
 well, and they disagree about what the desired state should be. I would 
 remove the /var/lib/puppet/lib resource from your My_fw module (and any 
 other Puppet settings-related file/directory).
  


 Regards, Patrick.

 -- 
 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...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/1af6a1e5-4125-457c-a0ec-5b0a139042df%40googlegroups.com
  
 https://groups.google.com/d/msgid/puppet-users/1af6a1e5-4125-457c-a0ec-5b0a139042df%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


 Josh

 -- 
 Josh Cooper
 Developer, Puppet Labs


-- 
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/4d71c7b0-bff4-4f53-84bf-87d01ef0ceb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Help with hiera.yaml config

2015-08-13 Thread Patrick G.
I've tried that also but then it's removing both entries.


Op dinsdag 11 augustus 2015 03:28:12 UTC+2 schreef 
gregory...@calorieking.com:

 Hi Patrick, 

 On 10/08/15 17:10, Patrick G. wrote: 
  parameters: 
 sudoroles: 'root_users' 
 sudoroles: 'dba_users' 

 That reads to me like you've overwritten the first sudoroles value with 
 the second entry. If you want both, it would need to be e.g. an array: 

 parameters: 
sudoroles: 
  - 'root_users' 
  - 'dba_users' 

 ... with relevant logic in the module to handle an array. 

 HTH, 
 Greg. 


-- 
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/218057c7-c6fc-438e-9bee-b8931afd8223%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] get data from yaml in subdirs

2015-08-13 Thread Patrick G.
Hi,

Can someone please explain something.

I have a hiera.yaml:
---
:backends:
  - yaml
:yaml:
  :datadir: /etc/puppet/hieradata

:hierarchy:
  - usergroups/%{::usersgroups}
  - global

global.yaml contains:
---
test: Test_output

When I do a:
hiera -c /etc/puppet/hiera.yaml test

I'll get: 
Test_output

but i want this global.yaml in /etc/puppet/hieradata/usergroups

But how do call this information from a subdir?

regards, patrick.




-- 
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/49bc3764-3ec8-4fbf-aea5-ace988a456dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Help with hiera.yaml config

2015-08-13 Thread Patrick G.
What I have is:

---
:backends:
  - yaml
:yaml:
  :datadir: /etc/puppet/hieradata

:hierarchy:
  - nodes/%{::fqdn}
  - usergroups/%{usergroups}


---
classes:
  - colorprompt
  - ntp
  - motd
  - ssh
  - sudodba
  - sudoroot

colorprompt::server_color: 'blue'
parameters:
  usergroups: 
- 'root'
- 'admiam'
- 'oracle'


This works:
hiera -c /etc/puppet/hiera.yaml -d ssh::keys usergroups=oracle


But it won't put al the usergroups on this server.

Op maandag 10 augustus 2015 11:10:44 UTC+2 schreef Patrick G.:

 Hi,

 I have the following config.

 :backends:
   - yaml
 :yaml:
   :datadir: /etc/puppet/hieradata

 :hierarchy:
   - nodes/%{::fqdn}
   - sudoroles/%{::sudoroles}
   - common

 In sudorules I have twho files with root users en dba users.

 On a server I want both root users and dba users and on the other server 
 only the root user.

 In enc/nodes/server1 i have:

 ---
 classes:
   - sudoroles

 parameters:
   sudoroles: 'root_users'
   sudoroles: 'dba_users'

 But only dba_users are created and the root_users removed.

 Can someone please help how to do this?

 Regards, Patrick.


Op dinsdag 11 augustus 2015 03:28:12 UTC+2 schreef 
gregory...@calorieking.com:

 Hi Patrick, 

 On 10/08/15 17:10, Patrick G. wrote: 
  parameters: 
 sudoroles: 'root_users' 
 sudoroles: 'dba_users' 

 That reads to me like you've overwritten the first sudoroles value with 
 the second entry. If you want both, it would need to be e.g. an array: 

 parameters: 
sudoroles: 
  - 'root_users' 
  - 'dba_users' 

 ... with relevant logic in the module to handle an array. 

 HTH, 
 Greg. 


-- 
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/f7f00663-174f-4cb7-86c2-0272b4b6dd61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] keep changing owner

2015-08-13 Thread Patrick G.
Hi,

When running puppet agent -t I get

Notice: /File[/var/lib/puppet/lib]/owner: owner changed 'puppet' to 'root'
Notice: /File[/var/lib/puppet/lib]/group: group changed 'puppet' to 'root'

And then

Notice: /Stage[main]/My_fw/File[/var/lib/puppet/lib]/owner: owner changed 
'root' to 'puppet'
Notice: /Stage[main]/My_fw/File[/var/lib/puppet/lib]/group: group changed 
'root' to 'puppet'

For a lot of files.

Why?

Regards, Patrick.

-- 
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/1af6a1e5-4125-457c-a0ec-5b0a139042df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Help with hiera.yaml config

2015-08-13 Thread Patrick G.
What I have is:

---
:backends:
  - yaml
:yaml:
  :datadir: /etc/puppet/hieradata

:hierarchy:
  - nodes/%{::fqdn}
  - usergroups/%{usergroups}


---
classes:
  - colorprompt
  - ntp
  - motd
  - ssh
  - sudodba
  - sudoroot

colorprompt::server_color: 'blue'
parameters:
  usergroups: 
- 'root'
- 'admiam'
- 'oracle'


This works:
hiera -c /etc/puppet/hiera.yaml -d ssh::keys usergroups=oracle


But it won't put al the usergroups on this server.

Op maandag 10 augustus 2015 11:10:44 UTC+2 schreef Patrick G.:

 Hi,

 I have the following config.

 :backends:
   - yaml
 :yaml:
   :datadir: /etc/puppet/hieradata

 :hierarchy:
   - nodes/%{::fqdn}
   - sudoroles/%{::sudoroles}
   - common

 In sudorules I have twho files with root users en dba users.

 On a server I want both root users and dba users and on the other server 
 only the root user.

 In enc/nodes/server1 i have:

 ---
 classes:
   - sudoroles

 parameters:
   sudoroles: 'root_users'
   sudoroles: 'dba_users'

 But only dba_users are created and the root_users removed.

 Can someone please help how to do this?

 Regards, Patrick.


-- 
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/a0863954-80a0-4292-91f7-a351d427ab87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Help with hiera.yaml config

2015-08-10 Thread Patrick G.
Hi,

I have the following config.

:backends:
  - yaml
  - json
:yaml:
  :datadir: /etc/puppet/hieradata

:hierarchy:
  - nodes/%{::fqdn}
  - sudoroles/%{::sudoroles}
  - common

In sudorules I have twho files with root users en dba users.

On a server I want both root user and dba user and on the other server only 
the root user.

In enc/nodes/server1 i have:

---
classes:
  - sudoroles

parameters:
  sudoroles:
  - root
  - dba

But only root users are created.

Can someone please help how to do this?

Regards, Patrick.




-- 
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/7168837c-be92-4bf9-95b1-3b515caa3b71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Help with hiera.yaml config

2015-08-10 Thread Patrick G.
Hi,

I have the following config.

:backends:
  - yaml
:yaml:
  :datadir: /etc/puppet/hieradata

:hierarchy:
  - nodes/%{::fqdn}
  - sudoroles/%{::sudoroles}
  - common

In sudorules I have twho files with root users en dba users.

On a server I want both root users and dba users and on the other server 
only the root user.

In enc/nodes/server1 i have:

---
classes:
  - sudoroles

parameters:
  sudoroles: 'root_users'
  sudoroles: 'dba_users'

But only dba_users are created and the root_users removed.

Can someone please help how to do this?

Regards, Patrick.

-- 
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/89853145-16a4-4ad7-86b6-893607c64f01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.