Module Expr Str ImportFrom alias Import alias identifier Assign NameStore Str FunctionDef arguments args defaults body Expr Str If CompareNotEq SubscriptLoad NameLoad Index Str Str body Return NameLoad If CompareNotIn Str NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Expr Str Assign NameStore Dict Str Str Str Str NameLoad Dict NameLoad Str If CompareIs NameLoad NameLoad body Assign NameStore Dict orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Str Return NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Dict orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Str Return NameLoad If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Str Return NameLoad If NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str Str orelse Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Assign NameStore Dict Str Str Str Str NameLoad Dict NameLoad Str Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareEq SubscriptLoad NameLoad Index Str Str body Assign SubscriptStore NameLoad Index Str IfExp SubscriptLoad NameLoad Index Str Str Str If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIn ListLoad NameLoad SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str NameLoad body If CompareIs SubscriptLoad NameLoad Index Str Str body Assign SubscriptStore NameLoad Index Str Str AugAssignAdd SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad orelse If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str orelse If Call SubscriptLoad NameLoad Index Str NameLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body If CompareEq SubscriptLoad NameLoad Index Str Str body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad Str orelse Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str orelse Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad Str If UnaryOpNot SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Str Return NameLoad decorator_list
N/A N/A 
Management of debconf selections
================================

:depends:   - debconf-utils package

The debconfmod state module manages the enforcement of debconf selections,
this state can set those selections prior to package installation.

Available Functions
-------------------

The debconfmod state has two functions, the ``set`` and ``set_file`` functions

set
    Set debconf selections from the state itself

set_file
    Set debconf selections from a file

.. code-block:: yaml

    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 :doc:`here
    </topics/troubleshooting/yaml_idiosyncrasies>`), the values in the ``data``
    dict must be indented four spaces instead of two.
 __future__ absolute_import N/A salt.ext.six six N/A __virtualname__ debconf __virtual__ N/A N/A N/A N/A N/A 
    Confirm this module is on a Debian based system
     N/A N/A N/A __grains__ N/A os_family Debian N/A N/A False N/A N/A debconf.show __salt__ N/A N/A False N/A __virtualname__ N/A set_file N/A N/A name source template context defaults N/A None None None kwargs N/A N/A 
    Set debconf selections from a file or a template

    .. code-block:: yaml

        <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"

    source:
        The location of the file containing the package selections

    template
        If this setting is applied then the named templating engine will be
        used to render the package selections file, currently jinja, mako, and
        wempy are supported

    context
        Overrides default context variables passed to the template.

    defaults
        Default context passed to the template.
     N/A ret N/A name changes result comment name N/A True N/A N/A context None N/A N/A context N/A N/A N/A N/A N/A isinstance context dict N/A N/A N/A ret N/A result False N/A N/A ret N/A comment Context must be formed as a dict N/A ret N/A N/A defaults None N/A N/A defaults N/A N/A N/A N/A N/A isinstance defaults dict N/A N/A N/A ret N/A result False N/A N/A ret N/A comment Defaults must be formed as a dict N/A ret N/A N/A __opts__ N/A test N/A N/A N/A ret N/A result None N/A N/A ret N/A comment Debconf selections would have been set. N/A ret N/A template N/A N/A result N/A N/A __salt__ N/A debconf.set_template source template context defaults kwargs N/A N/A result N/A N/A __salt__ N/A debconf.set_file source kwargs N/A result N/A N/A N/A ret N/A comment Debconf selections were set. N/A N/A N/A ret N/A result False N/A N/A ret N/A comment Unable to set debconf selections from file. N/A ret N/A set N/A N/A name data N/A kwargs N/A N/A 
    Set debconf selections

    .. code-block:: yaml

        <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>}

    name:
        The package name to set answers for.

    data:
        A set of questions/answers for debconf. Note that everything under
        this must be indented twice.

    question:
        The question the is being pre-answered

    type:
        The type of question that is being asked (string, boolean, select, etc.)

    value:
        The answer to the question
     N/A ret N/A name changes result comment name N/A True N/A current N/A N/A __salt__ N/A debconf.show name N/A N/A key args N/A N/A six iteritems data N/A N/A N/A N/A args N/A type boolean N/A N/A N/A args N/A value N/A N/A args N/A value true false N/A N/A N/A current None N/A N/A key N/A args N/A type N/A str N/A args N/A value current N/A N/A N/A N/A ret N/A comment N/A N/A N/A ret N/A comment Unchanged answers:  N/A N/A ret N/A comment N/A N/A {0}  format key N/A N/A N/A __opts__ N/A test N/A N/A N/A ret N/A result None N/A N/A N/A ret N/A changes N/A key N/A N/A New value: {0} format N/A args N/A value N/A N/A N/A N/A __salt__ N/A debconf.set name key N/A args N/A type N/A args N/A value N/A N/A N/A N/A args N/A type password N/A N/A N/A N/A ret N/A changes N/A key (password hidden) N/A N/A N/A N/A ret N/A changes N/A key N/A N/A {0} format N/A args N/A value N/A N/A N/A ret N/A result False N/A N/A ret N/A comment Some settings failed to be applied. N/A N/A N/A ret N/A changes N/A key Failed to set! N/A N/A N/A ret N/A changes N/A N/A N/A ret N/A comment All specified answers are already set N/A ret N/A