salt.states.ini_manage

Manage ini files

maintainer

<akilesh1597@gmail.com>

maturity

new

depends

re

platform

all

salt.states.ini_manage.options_absent(name, sections=None, separator='=')
/home/saltminion/api-paste.ini:
  ini.options_absent:
    - separator: '='
    - sections:
        test:
          - testkey
          - secondoption
        test1:
          - testkey1

options present in file and not specified in sections dict will be untouched

changes dict will contain the list of changes made

salt.states.ini_manage.options_present(name, sections=None, separator='=', strict=False)
/home/saltminion/api-paste.ini:
  ini.options_present:
    - separator: '='
    - strict: True
    - sections:
        test:
          testkey: 'testval'
          secondoption: 'secondvalue'
        test1:
          testkey1: 'testval121'

options present in file and not specified in sections dict will be untouched, unless strict: True flag is used

changes dict will contain the list of changes made

salt.states.ini_manage.sections_absent(name, sections=None, separator='=')
/home/saltminion/api-paste.ini:
  ini.sections_absent:
    - separator: '='
    - sections:
        - test
        - test1

options present in file and not specified in sections will be deleted changes dict will contain the sections that changed

salt.states.ini_manage.sections_present(name, sections=None, separator='=')
/home/saltminion/api-paste.ini:
  ini.sections_present:
    - separator: '='
    - sections:
        - section_one
        - section_two

This will only create empty sections. To also create options, use options_present state

options present in file and not specified in sections will be deleted changes dict will contain the sections that changed

Docs for previous releases are available on readthedocs.org.

Latest Salt release: 3004

Table of Contents

Previous topic

salt.states.infoblox_range

Next topic

salt.states.ipmi