Puppet - test if a package already defined?

前端 未结 4 1126
面向向阳花
面向向阳花 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:36

    One cleaner way (among multiple ways) is to create a virtual package resource and then realize it. You can realize the same virtual package multiple times without error.

    @package { 'gnome-session-fallback':
        ensure => installed,
    }
    

    And then where you need it:

    realize( Package[ 'gnome-session-fallback' ] )
    

提交回复
热议问题