Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hiera yaml code not working #29

Open
pananix opened this issue Feb 8, 2018 · 5 comments
Open

hiera yaml code not working #29

pananix opened this issue Feb 8, 2018 · 5 comments

Comments

@pananix
Copy link

pananix commented Feb 8, 2018

The following yaml does not work. Output remains default.

nsswitch::params:
passwd: [ 'compat', 'files', 'nis', 'sss' ]
shadow: [ 'compat', 'files', 'nis', 'sss' ]
group: [ 'compat' ,'files', 'nis', 'sss' ]
hosts: [ 'files', 'dns', 'myhostname' ]
bootparams: [ 'nisplus', '[NOTFOUND=return]', 'files' ]
ethers: [ 'files' ]
netmasks: [ 'files' ]
networks: [ 'files' ]
protocols: [ 'files' ]
rpc: [ 'files' ]
services: [ 'files', 'sss']
netgroup: [ 'files', 'nis', 'sss']
publickey: [ 'nisplus' ]
automount: [ 'files', 'nis', 'sss']
aliases: [ 'files', 'nisplus' ]

@trlinkin
Copy link
Owner

Can you give some more detail? It successfully falls back to module hiera data right? But it doesn't find your specific Hiera data? What version of the module? What version of Puppet? I need some more information to understand what might be going on here.

@trlinkin
Copy link
Owner

trlinkin commented May 7, 2018

Ping...

Any possibility you could provide the information above? If not I'll close this soon.

@JOJ0
Copy link

JOJ0 commented Feb 11, 2019

Hi, I am experiencing the same issue on a puppet 5.3.6 master and Red Hat Enterprise Linux Server release 7.6 agents running agent version 5.5.10
yaml dict looks like this:

nsswitch::params:
    passwd:
        - 'files'
        - 'sss'
        - 'crap'
    shadow:
        - 'files'
        - 'sss'
    group:
        - 'files'
        - 'sss'
    hosts:
        - 'files'
        - 'dns'
        - 'myhostname'
    bootparams:
        - 'nisplus [NOTFOUND=return]'
        - 'files'
    ethers:
        - 'files'
    netmasks:
        - 'files'
    networks:
        - 'files'
    protocols:
        - 'files'
    rpc:
        - 'files'
    services:
        - 'files'
        - 'sss'
    netgroup:
        - 'nisplus'
        - 'sss'
    publickey:
        - 'nisplus'
    automount:
        - 'files'
        - 'nisplus'
        - 'sss'
    aliases:
        - 'files'
        - 'nisplus'
    sudoers:
        - 'files'
        - 'sss'

@JOJ0
Copy link

JOJ0 commented Feb 11, 2019

Hi again,
I am using this, as suggested on puppetforge, as a dependency to ghoneycut/pam module.

As a workaround for now, I tried to declare the nsswitch class and set my desired nsswitch options here:

class profile::base::pam {
    include ::pam

    class { 'nsswitch':
        passwd => ['files', 'sss', 'crap'],
        shadow => ['files', 'sss'],
        group => ['files', 'sss'],
        hosts  => ['files', 'dns', 'myhostname'],
        sudoers => ['files', 'sss'],
    }
}

This doesn't work for this obvious reason:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Nsswitch] is already declared; cannot redeclare (file: /etc/puppetlabs/code/environments/stag/site/profile/manifests/base/pam.pp, line: 4) (file: /etc/puppetlabs/code/environments/stag/site/profile/manifests/base/pam.pp, line: 4, column: 5) on node xxxxxxxxxxxx.xxx.xxxx.xxxxx.xx
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

I think I am giving up for now with the puppetforge "approved" modules ;-) Just kidding and no offence I would love to help to get this fixed but unfortunately I am running out of time in a project.

Hope that helps anyway! :-)

all the best
Jojo

@JOJ0
Copy link

JOJ0 commented Feb 11, 2019

At least I figured one thing out: I forgot to remove the "include ::pam" in my profile, that's the reason for the redeclaration error haha ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants