root@73f7186c66f8:/# tp install postgresql
Info: Loading facts
Warning: /etc/puppetlabs/code/modules/tp/hiera.yaml: Use of 'hiera.yaml' version 4 is deprecated. It should be converted to version 5
(in /etc/puppetlabs/code/modules/tp/hiera.yaml)
Warning: Defining "data_provider": "hiera" in metadata.json is deprecated
(in /etc/puppetlabs/code/modules/tp/metadata.json)
Warning: The function 'hiera_hash' is deprecated in favor of using 'lookup'. See https://docs.puppet.com/puppet/4.10/reference/deprecated_language.html
(file & line not available)
Notice: Compiled catalog for 73f7186c66f8 in environment production in 0.19 seconds
Info: Applying configuration version '1491606762'
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package postgresql
Error: /Stage[main]/Main/Tp::Install[postgresql]/Package[postgresql]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package postgresql
Notice: /Stage[main]/Main/Tp::Install[postgresql]/Service[postgresql]: Dependency Package[postgresql] has failures: true
Warning: /Stage[main]/Main/Tp::Install[postgresql]/Service[postgresql]: Skipping because of failed dependencies
Notice: /Stage[main]/Main/Tp::Install[postgresql]/File[/etc/tp/app/postgresql]/ensure: defined content as '{md5}cd3e071cd84b74f77937d611fa77b5c3'
Info: Tp::Install[postgresql]: Unscheduling all events on Tp::Install[postgresql]
Notice: Applied catalog in 1.67 seconds
Expected Behavior
package would install without error
Actual Behavior
Steps to Reproduce the Problem
Reason this happened
Container comes without the apt cache so we need to run
apt-get update
first in order for puppet to find the postgres package