Puppet - test if a package already defined?

前端 未结 4 1117
面向向阳花
面向向阳花 2021-02-12 15:09

I\'m writing some puppet modules and have a package defined in two modules hence get the following error:

err: Could not retrieve catalog from remote server: Err         


        
4条回答
  •  再見小時候
    2021-02-12 15:30

    You are missing Package[] inside defined(). The correct way to do it:

    if ! defined(Package['gnome-session-fallback']) {
        package { 'gnome-session-fallback':
            ensure => installed,
        }
    }
    

提交回复
热议问题