Hi, file.pp: сlass keys { file { '/etc/ssh/keys': ensure => directory, } *#I don't understand how to get variable from the operating system?* $kolchanov_id = "id kolchanov" *#If such user available, need copy him public key to the folder. Else, remove an existing public key.* if $kolchanov_id == true { file { '/etc/ssh/keys/kolchanov_keys': mode => '600', owner => 'kolchanov', group => 'users', source => 'puppet:///files/sshkeys/kolchanov_keys', require => file['/etc/ssh/keys'] } } else { exec { "rm -rf /etc/ssh/keys/kolchanov_keys": path => ["/bin", "/usr/bin"], } } } Thanks! -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/34c85016-cd82-45c3-8e7e-8b13f2b175ea%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.