Ask Your Question
0

Facter comparison not working?

asked 2016-11-29 08:15:35 -0600

jrbast gravatar image

I'm trying to setup a link for the su command, but only linux release less than 7, but fails to run

class profile::baseline::sulink { unless $facts['os']['release']['major'] < '7' { file { "/usr/bin/su" : ensure => 'link', target => '/bin/su', }
}
}

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-11-30 06:11:57 -0600

updated 2016-11-30 06:12:18 -0600

HI,

Simple way is:

if $operatingsystemmajrelease < 7  { 
    file { "/usr/bin/su" : ensure => 'link', target => '/bin/su', } 
}

Cheers Stuart

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2016-11-29 08:15:35 -0600

Seen: 13 times

Last updated: Nov 30 '16