Oracle Solaris System Administration (MOSC)

MOSC Banner

puppet; nsswitch.conf; wrong result: "hosts: cluster\ files\ dns"

edited Mar 18, 2020 3:32AM in Oracle Solaris System Administration (MOSC) 32 commentsAnswered

Hi,

Any idea how to manage name-service/switch service using puppet nsswitch module?

As a result there will be backslash in front of space and configuration is broken as result:

Current value:

# svccfg -s name-service/switch listprop config/host

config/host astring     "files dns"

Modify puppet: cluster.pp

...

  nsswitch { "current":

    host     => "cluster files dns",

  }

...

Run puppet (everything seems fine):

# puppet agent --test

...

Debug: Executing: '/usr/sbin/svccfg -s svc:/system/name-service/switch setprop config/host=cluster\ files\ dns'

Notice: /Stage[main]/Main/Node[hostname]/Nsswitch[current]/host: host changed 'files dns' to 'cluster files dns'

Result (double backslash is added

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center