|
|
@ -62,6 +62,15 @@ options:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- all arguments accepted by the M(file) module also work here
|
|
|
|
- all arguments accepted by the M(file) module also work here
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
- code: ini_file dest=/etc/conf section=drinks option=fav value=lemonade mode=0600 backup=true
|
|
|
|
|
|
|
|
description: Ensure C(fav=lemonade) is in section C([drinks]) in said file
|
|
|
|
|
|
|
|
- code: |
|
|
|
|
|
|
|
|
ini_file dest=/etc/anotherconf
|
|
|
|
|
|
|
|
section=drinks
|
|
|
|
|
|
|
|
option=temperature
|
|
|
|
|
|
|
|
value=cold
|
|
|
|
|
|
|
|
backup=true
|
|
|
|
notes:
|
|
|
|
notes:
|
|
|
|
- While it is possible to add an I(option) without specifying a I(value), this makes
|
|
|
|
- While it is possible to add an I(option) without specifying a I(value), this makes
|
|
|
|
no sense.
|
|
|
|
no sense.
|
|
|
@ -69,18 +78,6 @@ requirements: [ ConfigParser ]
|
|
|
|
author: Jan-Piet Mens
|
|
|
|
author: Jan-Piet Mens
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
EXAMPLES = [
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
- code: ini_file dest=/etc/conf section=drinks option=fav value=lemonade mode=0600 backup=true
|
|
|
|
|
|
|
|
description: Ensure C(fav=lemonade) is in section C([drinks]) in said file
|
|
|
|
|
|
|
|
""",
|
|
|
|
|
|
|
|
""" ini_file dest=/etc/anotherconf
|
|
|
|
|
|
|
|
section=drinks
|
|
|
|
|
|
|
|
option=temperature
|
|
|
|
|
|
|
|
value=cold
|
|
|
|
|
|
|
|
backup=true
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import ConfigParser
|
|
|
|
import ConfigParser
|
|
|
|
|
|
|
|
|
|
|
|