Run `apt-get update` before installing other packages with Puppet

后端 未结 8 1199
青春惊慌失措
青春惊慌失措 2020-12-07 11:21

I\'m trying to create puppet module which automates installation of zend server CE, this is not important here, but steps are as following

  1. update /etc/apt/sour
8条回答
  •  独厮守ぢ
    2020-12-07 11:45

    In Puppet 3 this can be done by realizing virtual resources using resource collectors

    # so you don't have to fully qualify paths to binaries
    Exec { path => ['/usr/bin'] }    
    
    # virtual resource
    @exec { 'sudo apt-get update':
       tag => foo_update
    }
    
    # realize resource. filter by arbitrary "foo_update"
    # tag and relate it to all Package resources
    Exec <| tag == foo_update |> -> Package <| |>
    

提交回复
热议问题