For example lets attempt to let Puppet install the opengeo-suite.
To do something like
wget -qO- http://apt.opengeo.org/gpg.key | apt-key add -
echo "deb http://apt.opengeo.org/suite/v3/ubuntu lucid main" >> /etc/apt/sources.list
we can use
exec {'getKey':
command => "wget -qO- http://apt.opengeo.org/gpg.key | apt-key add -",
}
exec {'addRepo':
command => "echo "deb http://apt.opengeo.org/suite/v3/ubuntu lucid main" >> /etc/apt/sources.list",
}
Question #1: If we run the puppet script again, won't the wget and echo be run twice? We will end up with duplicate repo in /etc/apt/sources.d
. Running package { "opengeo-suite": }
twice doesn't attempt to install the package twice, it simply ensures that its installed.
Question #2: Doing apt-get install opengeo-suite
there are several promopts for user input. Will Puppet somehow know the default input to use, or will it crash?