22.27.44. salt.states.ini_manage

22.27.44.1. 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_manage:
    - options_absent
    - 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_manage:
    - 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_manage:
    - 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_manage:
    - 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 salt.rtfd.org.

Latest Salt release: 2014.7.2

Table Of Contents

Previous topic

22.27.43. salt.states.influxdb_user

Next topic

22.27.45. salt.states.ipset

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.