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.


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.


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

2015-08-10 Thread Gregory Orange

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/55C94F97.4020405%40calorieking.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.