Bas van der Vlies wrote: > Steve Wray wrote: > >> Russell Adams wrote: >> >>> Here's how I configure APT to allow automated installation. >> >> >> [snip] >> >> interesting stuff, but what I do is maintain a selections list (output >> of dpkg --get-selections) on the cfengine server and manually change >> this file to install, deinstall or purge packages. >> [snip] > > It sounds simple ;-) I am interested in the setup, can i get the > configuration setup?
Sure, it looks something like this, but the debconf config and ldap is a
seperate thing, this is just the package management side of things:
control:
PackagesUpdate::
# Set up variables to describe package infrastructure:
# variables containing paths to various utilities
# variables containing commandline arguments
# etc
master_states = ( "$(client_master_config)/selection.states" )
local_states = ( "$(local_config)/selection.states" )
set_selections = ( "/usr/bin/dpkg --set-selections" )
apt_get = ( "/usr/bin/apt-get" )
apt_update_args = ( "--quiet" )
apt_update = ( "$(apt_get) $(apt_update_args) update" )
apt_upgrade_args = ( "--assume-yes --fix-broken --quiet" )
dselect_upgrade = ( "$(apt_get) $(apt_upgrade_args)
dselect-upgrade" )
AddInstallable = ( SelectionsUpdated SelectionsSet
SelectionsNotSet DselectUpgraded DselectNotUpgraded )
actionsequence = ( copy shellcommands )
copy:
PackagesUpdate::
# Bring in selections lists
$(master_states)
dest=$(local_states)
owner=root
group=root
mode=644
type=checksum
server=$(policyhost)
encrypt=true
define=SelectionsUpdated
shellcommands:
# If the selections list has changed, update selections
PackagesUpdate.SelectionsUpdated::
"$(set_selections) < $(local_states) > /dev/null 2>&1"
define=SelectionsSet
elsedefine=SelectionsNotSet
# actually run commands to update packages
PackagesUpdate.SelectionsSet::
"$(dselect_upgrade) > /dev/null 2>&1"
define=DselectUpgraded
elsedefine=DselectNotUpgraded
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Help-cfengine mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-cfengine
