salt.states.ini_manage

Manage ini files

maintainer:<akilesh1597@gmail.com>
maturity:new
depends:re
platform:all

use section as DEFAULT_IMPLICIT if your ini file does not have any section for example /etc/sysctl.conf

salt.states.ini_manage.options_absent(name, sections=None)
/home/saltminion/api-paste.ini:
  ini.options_present:
    - 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)
/home/saltminion/api-paste.ini:
  ini.options_present:
    - sections:
        test:
          testkey: 'testval'
          secondoption: 'secondvalue'
        test1:
          testkey1: 'testval121'

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.sections_absent(name, sections=None)
/home/saltminion/api-paste.ini:
  ini.sections_absent:
    - 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)
/home/saltminion/api-paste.ini:
  ini.sections_present:
    - sections:
        test:
          testkey: testval
          secondoption: secondvalue
        test1:
          testkey1: 'testval121'

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: 2015.8.1

Table Of Contents

Previous topic

salt.states.influxdb_user

Next topic

salt.states.ipmi