Hello Community,
I am trying to preseed the answer to sun-java6-* packages using
debconf.set.
On a machine I already have Java installed and deconf-get-selections
reports the following:
$ debconf-get-selections|grep java
sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true
sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true
sun-java6-jre sun-java6-jre/stopthread boolean true
sun-java6-jre sun-java6-jre/jcepolicy note
sun-java6-bin shared/error-sun-dlj-v1-1 error
sun-java6-jre shared/error-sun-dlj-v1-1 error
sun-java6-bin shared/present-sun-dlj-v1-1 note
sun-java6-jre shared/present-sun-dlj-v1-1 note
The Salt state I have created for this is the following:
include:
- debconf-utils
sun_java6_bin:
pkg.installed:
- name: sun-java6-bin
- require:
- debconf: sun_java6_bin_debconf
sun_java6_bin_debconf:
debconf.set:
- name: sun-java6-bin
- data:
'shared/accepted-sun-dlj-v1-1':
'type': 'boolean'
'value': 'true'
sun_java6_jre_debconf:
debconf.set:
- name: sun-java6-jre
- data:
'shared/accepted-sun-dlj-v1-1':
'type': 'boolean'
'value': 'true'
salt 'java-machine.*' state.highstate reports the following:
java-machine.domain.tld:
----------
State: - debconf
Name: sun-java6-bin
Function: set
Result: False
Comment: An exception occurred in this state: Traceback (most
recent call last):
File "/usr/lib/python2.6/dist-packages/salt/state.py", line 1210, in
call
ret = self.states[cdata['full']](*cdata['args'])
File "/usr/lib/python2.6/dist-packages/salt/states/debconfmod.py",
line 122, in set
for (key, args) in data.iteritems():
AttributeError: 'NoneType' object has no attribute 'iteritems'
Changes:
----------
State: - debconf
Name: sun-java6-jre
Function: set
Result: False
Comment: An exception occurred in this state: Traceback (most
recent call last):
File "/usr/lib/python2.6/dist-packages/salt/state.py", line 1210, in
call
ret = self.states[cdata['full']](*cdata['args'])
File "/usr/lib/python2.6/dist-packages/salt/states/debconfmod.py",
line 122, in set
for (key, args) in data.iteritems():
AttributeError: 'NoneType' object has no attribute 'iteritems'
Changes:
----------
State: - pkg
Name: sun-java6-bin
Function: installed
Result: False
Comment: One or more requisite failed
Changes:
The log on the minion is set to debug and I see the following (relevant)
information in `/var/log/salt/minion`:
2013-05-20 14:22:06,012 [salt.state ][INFO ] Executing state
debconf.set for sun-java6-bin
2013-05-20 14:22:06,012 [salt.loaded.int.module.cmdmod][INFO ]
Executing command 'debconf-get-selections' in directory '/root'
2013-05-20 14:22:06,194 [salt.loaded.int.module.cmdmod][DEBUG ]
stdout: # Time zone:
# Choices: Adelaide, Brisbane, Broken Hill, Canberra, Currie, Darwin,
# Eucla, Hobart, Lindeman, Lord Howe, Melbourne, Perth, Sydney,
# Yancowinna
tzdata tzdata/Zones/Australia select
#
[... a lot of information about debconf ...]
2013-05-20 14:22:06,381 [salt.state ][ERROR ] No changes made
for sun-java6-jre
2013-05-20 14:22:06,382 [salt.state ][INFO ] Executing state
file.managed for /etc/apt/sources.list
Am I using debconf.set correctly? Thank you for your help.
Cheers and Goodwill,
--
Valentin Bud
http://databus.pro/ |
vale...@databus.pro