diff options
author | Gyorgy Szombathelyi <gyurco@freemail.hu> | 2016-11-11 14:21:41 +0100 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2016-11-14 11:39:55 -0500 |
commit | 7241d0f67ab7e269d123d7281982fc3ff60e1642 (patch) | |
tree | 45fcb10c1050da10157d57b34969fb74540aac0a | |
parent | 8eafb06ce594028bef3f1c043a6beb442b2a2dc0 (diff) | |
download | ansible-modules-core-7241d0f67ab7e269d123d7281982fc3ff60e1642.tar.gz |
Ini_file: fix regression with the create option
The new create option with the default value 'no' changes the
behavior from the previous Ansible releases. Change the default to
'yes' to create missing ini files by default.
Fixes: #5488
(cherry picked from commit 4863335cfac0266dca8e0e92157c57019546fb61)
-rw-r--r-- | files/ini_file.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/files/ini_file.py b/files/ini_file.py index e43d0303..9ca39890 100644 --- a/files/ini_file.py +++ b/files/ini_file.py @@ -80,10 +80,10 @@ options: create: required: false choices: [ "yes", "no" ] - default: "no" + default: "yes" description: - - If specified, the file will be created if it does not already exist. - By default it will fail if the file is missing. + - If set to 'no', the module will fail if the file does not already exist. + By default it will create the file if it is missing. version_added: "2.2" notes: - While it is possible to add an I(option) without specifying a I(value), this makes @@ -257,7 +257,7 @@ def main(): backup = dict(default='no', type='bool'), state = dict(default='present', choices=['present', 'absent']), no_extra_spaces = dict(required=False, default=False, type='bool'), - create=dict(default=False, type='bool') + create=dict(default=True, type='bool') ), add_file_common_args = True, supports_check_mode = True |