salt: salt-ssh pkg.install debconf= broken (module and state)

This is what I see running smth like https://github.com/rentalita/ubuntu-setup/blob/master/salt/gitolite/init.sls#L4-L7 For the sake of readability - will copy it here as well

gitolite:
  pkg:
    - latest
    - debconf: salt://gitolite/gitolite.answers

Out

...
  pkg_|-gitolite_|-gitolite_|-latest:
        ----------
        __run_num__:
            18
        changes:
            ----------
        comment:
            An exception occurred in this state: Traceback (most recent call last):
              File "/tmp/.salt/salt/state.py", line 1368, in call
                **cdata['kwargs'])
              File "/tmp/.salt/salt/states/pkg.py", line 701, in latest
                **kwargs)
              File "/tmp/.salt/salt/modules/apt.py", line 378, in install
                __salt__['debconf.set_file'](debconf)
            KeyError: 'debconf.set_file'

        name:
            gitolite
        result:
            False
...

Initially I thought this option is not supported, since this option seemed not be state module, but instead salt module (I might misuse terminology, using the terms used in salt documentation pages)

Salt state module has no mention of it, however seems in might be supported (especially if found online examples it’s usage, see above)

Salt apt module however lists debconf as supported option.

Initially I asked questions about this on salt-user iirc channel and got initial response I mix salt states and salt-modules. However since I have both found the online example (presumably working) and failed to run salt-module (see below) as documented - I decided to submit my question in the form of github issue. imo, either documentation or code is broken.


Questions

  • is debconf supported as part of state module option?
  • is debconf supported as part of sast system module? e.g.
salt-ssh '*'  pkg.install gitolite 'debconf=salt://gitolite/gitolite.answers'
minion1:
    Traceback (most recent call last):
      File "/tmp/.salt/salt-call", line 4, in <module>
        salt_call()
      File "/tmp/.salt/salt/scripts.py", line 82, in salt_call
        client.run()
      File "/tmp/.salt/salt/cli/__init__.py", line 313, in run
        caller.run()
      File "/tmp/.salt/salt/cli/caller.py", line 137, in run
        ret = self.call()
      File "/tmp/.salt/salt/cli/caller.py", line 78, in call
        ret['return'] = func(*args, **kwargs)
      File "/tmp/.salt/salt/modules/apt.py", line 378, in install
        __salt__['debconf.set_file'](debconf)
    KeyError: 'debconf.set_file'
  • is debconf just broken with salt-ssh or broken in last/development? Note: The way I’ve installed salt is as documented at saltstack/salt-bootstrap e.g. curl -L http://bootstrap.saltstack.org | sudo sh -s -- git develop

version info

root@salt:/media/sf_provisioning# salt --versions-report
           Salt: 2014.1.0-438-g23eb3a7
         Python: 2.7.3 (default, Sep 26 2013, 20:03:06)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.4.1
         PyYAML: 3.10
          PyZMQ: 13.0.0
            ZMQ: 3.2.2
root@salt:/media/sf_provisioning#

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

I had the same issue because debconf-get-selections wasn’t installed on the minion, which is a bento/ubuntu-16.04 vagrant box.

Added this to the state, which fixed it

debconf-utils:
  pkg.installed