depends: |
|
---|
The debconfmod state module manages the enforcement of debconf selections, this state can set those selections prior to package installation.
The debconfmod state has two functions, the set
and set_file
functions
nullmailer-debconf:
debconf.set:
- name: nullmailer
- data:
'shared/mailname': {'type': 'string', 'value': 'server.domain.tld'}
'nullmailer/relayhost': {'type': 'string', 'value': 'mail.domain.tld'}
ferm-debconf:
debconf.set:
- name: ferm
- data:
'ferm/enable': {'type': 'boolean', 'value': True}
Note
Due to how PyYAML imports nested dicts (see here), the values in the data
dict must be indented four spaces instead of two.
salt.states.debconfmod.
set
(name, data, **kwargs)¶Set debconf selections
<state_id>:
debconf.set:
- name: <name>
- data:
<question>: {'type': <type>, 'value': <value>}
<question>: {'type': <type>, 'value': <value>}
<state_id>:
debconf.set:
- name: <name>
- data:
<question>: {'type': <type>, 'value': <value>}
<question>: {'type': <type>, 'value': <value>}
salt.states.debconfmod.
set_file
(name, source, template=None, context=None, defaults=None, **kwargs)¶Set debconf selections from a file or a template
<state_id>:
debconf.set_file:
- source: salt://pathto/pkg.selections
<state_id>:
debconf.set_file:
- source: salt://pathto/pkg.selections?saltenv=myenvironment
<state_id>:
debconf.set_file:
- source: salt://pathto/pkg.selections.jinja2
- template: jinja
- context:
some_value: "false"