internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ansible/ansible

Issue:
Fixes #24578: ROLLBACK_COMPLETE is a failure state
##### SUMMARY
Fixes #24578. When CloudFormation fails to create stack and ends up in ROLLBACK_COMPLETED status, should be a failure state for this module.

##### ISSUE TYPE
 - Bugfix Pull Request

##### COMPONENT NAME
cloudformation

##### ANSIBLE VERSION
```
ansible 2.3.0.0
  config file = /Users/jose.armesto/.ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.13 (default, Feb  7 2017, 22:08:53) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
```




Discussion:
cc @tedder @ryansb
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
Thanks for the comment! I've added the link to documentation and fixed the spacing issue.
Looks good, works for me.
`shipit`
<!-- job_id: 591b2802a761a6070030ebc7 -->
<!-- job_id: 591b28031973250800b808ca -->
<!-- job_id: /testresults/ansible-test-failure.json -->

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: shippable_test_result --->
I don't know why the build failed by changing a comment
Looks like a `pip install` failed, so probably transient.
is there a way to re-run it? Should I do something?
The CI failure was unrelated to this PR. It has been fixed and I've restarted CI for this PR.
Ok, thank you!
Thank you @fiunchinho, much appreciated!

Resolving patch:
diff --git a/lib/ansible/modules/cloud/amazon/cloudformation.py b/lib/ansible/modules/cloud/amazon/cloudformation.py
--- a/lib/ansible/modules/cloud/amazon/cloudformation.py
+++ b/lib/ansible/modules/cloud/amazon/cloudformation.py
@@ -343,8 +343,10 @@ def stack_operation(cfn, stack_name, operation):
             else:
                 ret.update({'changed': False, 'failed': True, 'output' : 'Stack not found.'})
                 return ret
-        elif stack['StackStatus'].endswith('_ROLLBACK_COMPLETE'):
-            ret.update({'changed': True, 'failed' :True, 'output': 'Problem with %s. Rollback complete' % operation})
+        # it covers ROLLBACK_COMPLETE and UPDATE_ROLLBACK_COMPLETE
+        # Possible states: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#w1ab2c15c17c21c13
+        elif stack['StackStatus'].endswith('ROLLBACK_COMPLETE'):
+            ret.update({'changed': True, 'failed': True, 'output': 'Problem with %s. Rollback complete' % operation})
             return ret
         # note the ordering of ROLLBACK_COMPLETE and COMPLETE, because otherwise COMPLETE will match both cases.
         elif stack['StackStatus'].endswith('_COMPLETE'):


Test patch:
Repository: ansible/ansible

Issue:
digital_ocean_sshkey doc refinement
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and master branch are affected too.
-->

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Documentation Report

##### COMPONENT NAME
<!--- Name of the module/plugin/task/feature -->
digital_ocean_sshkey.py
##### ANSIBLE VERSION
<!--- Paste verbatim output from “ansible --version” between quotes below -->
```
ansible 2.4.0 (bugfix/28923 6b1f532c03) last updated 2017/09/01 23:20:46 (GMT -400)
  config file = /Users/devMac/ansible.cfg
  configured module search path = [u'/Users/devMac/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/devMac/Development/github/ansible/lib/ansible
  executable location = /Users/devMac/Development/github/ansible/bin/ansible
  python version = 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
```

##### CONFIGURATION
<!---
Mention any settings you have changed/added/removed in ansible.cfg
(or using the ANSIBLE_* environment variables).
-->
Turned off retry files
##### OS / ENVIRONMENT
<!---
Mention the OS you are running Ansible from, and the OS you are
managing, or say “N/A” for anything that is not platform-specific.
Also mention the specific version of what you are trying to control,
e.g. if this is a network bug the version of firmware on the network device.
-->
macOS 10.11.6
##### SUMMARY
<!--- Explain the problem briefly -->
Updated module doc examples to include api token along with removal of unused import



Discussion:
cc @alukovenko @mgregson
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
cc @alukovenko @mgregson
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_sshkey.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_sshkey.py
--- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean_sshkey.py
+++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean_sshkey.py
@@ -59,12 +59,15 @@
 EXAMPLES = '''
 - name: "Create ssh key"
   digital_ocean_sshkey:
+    oauth_token: "{{ oauth_token }}"
     name: "My SSH Public Key"
-    public_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example"
+    ssh_pub_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example"
+    state: present
   register: result
 
 - name: "Delete ssh key"
   digital_ocean_sshkey:
+    oauth_token: "{{ oauth_token }}"
     state: "absent"
     fingerprint: "3b:16:bf:e4:8b:00:8b:b8:59:8c:a9:d3:f0:19:45:fa"
 '''
@@ -87,7 +90,6 @@
 '''
 
 import json
-import os
 import hashlib
 import base64
 


Test patch:
Repository: ansible/ansible

Issue:
ssh_key_gen requires a user home directory
When creating a user with `createhome: no` but `generate_ssh_key: yes`, the code will fail here:

https://github.com/ansible/ansible/blob/d548c477c027441d12c10a83aed72424279da8c7/lib/ansible/modules/system/user.py#L650

If the `ssh_file` is specified as an absolute filepath, this check is unnecessary.  Instead, I think this check should be moved into `get_ssh_key_path`, before line 644.

##### ISSUE TYPE
 - Bug Report

##### COMPONENT NAME
user module

##### ANSIBLE VERSION
head / master




Discussion:
@jobevers Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information. 

Here are the items we could not find in your description:
- issue type
- ansible version
- component name

Please set the description of this issue with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE.md

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: issue_missing_data --->
@jobevers Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information. 

Here are the items we could not find in your description:
- issue type
- ansible version
- component name

Please set the description of this issue with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE.md

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: issue_missing_data --->
cc @sfromm
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
@jobevers: This looks like an easy fix. Would you like to submit the PR and we can review from there?

Resolving patch:
diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py
--- a/lib/ansible/modules/system/user.py
+++ b/lib/ansible/modules/system/user.py
@@ -641,14 +641,18 @@ def get_ssh_key_path(self):
         if os.path.isabs(self.ssh_file):
             ssh_key_file = self.ssh_file
         else:
+            if not os.path.exists(info[5]) and not self.module.check_mode:
+                raise Exception('User %s home directory does not exist' % self.name)
             ssh_key_file = os.path.join(info[5], self.ssh_file)
         return ssh_key_file
 
     def ssh_key_gen(self):
         info = self.user_info()
-        if not os.path.exists(info[5]) and not self.module.check_mode:
-            return (1, '', 'User %s home directory does not exist' % self.name)
-        ssh_key_file = self.get_ssh_key_path()
+        try:
+            ssh_key_file = self.get_ssh_key_path()
+        except Exception:
+            e = get_exception()
+            return (1, '', str(e))
         ssh_dir = os.path.dirname(ssh_key_file)
         if not os.path.exists(ssh_dir):
             if self.module.check_mode:


Test patch:
Repository: ansible/ansible

Issue:
os_image fails when id is None
##### ISSUE TYPE
 - Bug Report

##### COMPONENT NAME
os_image

##### ANSIBLE VERSION
```
ansible 2.4.0
  config file = None
  configured module search path = ['/nfs/users/nfs_j/jr17/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /software/hgi/pkglocal/ansible-git-20170906-8f4c8844-hgiextras-992e571d167746f79b7bae07a0db5835/lib/python3.6/site-packages/ansible
  executable location = /software/hgi/pkglocal/ansible-git-20170906-8f4c8844-hgiextras-992e571d167746f79b7bae07a0db5835/bin/ansible
  python version = 3.6.1 (default, May 17 2017, 13:38:25) [GCC 4.9.1]
```

##### OS / ENVIRONMENT
Linux

##### SUMMARY
The `os_image` module can no longer create images in our Redhat OpenStack Platform without specifying an `id`. This appears to be an issue with this line: https://github.com/ansible/ansible/commit/de5fb8d98c40ad806420187bbf87fd3f642d7846#diff-e94793c3600e1b246be477c573726d17R168

This appears to be because shade (currently using 1.16.0) passes the `id` along verbatim without checking if it is `None`, and our openstack glance service returns a `400 Bad Request` error when requesting to create an image with the ID `None`. 

A PR will be submitted shortly to fix this issue. 


Discussion:

Resolving patch:
diff --git a/lib/ansible/modules/cloud/openstack/os_image.py b/lib/ansible/modules/cloud/openstack/os_image.py
--- a/lib/ansible/modules/cloud/openstack/os_image.py
+++ b/lib/ansible/modules/cloud/openstack/os_image.py
@@ -164,9 +164,11 @@ def main():
 
         if module.params['state'] == 'present':
             if not image:
+                kwargs={}
+                if module.params['id'] is not None:
+                    kwargs['id'] = module.params['id']
                 image = cloud.create_image(
                     name=module.params['name'],
-                    id=module.params['id'],
                     filename=module.params['filename'],
                     disk_format=module.params['disk_format'],
                     container_format=module.params['container_format'],
@@ -174,7 +176,8 @@ def main():
                     timeout=module.params['timeout'],
                     is_public=module.params['is_public'],
                     min_disk=module.params['min_disk'],
-                    min_ram=module.params['min_ram']
+                    min_ram=module.params['min_ram'],
+                    **kwargs
                 )
                 changed = True
                 if not module.params['wait']:


Test patch:
Repository: ansible/ansible

Issue:
docker_service doesn't respect "pull: no" parameter when building new image.
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and master branch are affected too.
-->

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Bug Report

##### COMPONENT NAME
docker_service

##### ANSIBLE VERSION
<!--- Paste verbatim output from “ansible --version” between quotes below -->
```
ansible 2.3.1.0
configured module search path = Default w/o overrides
python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
```

##### CONFIGURATION
<!---
Mention any settings you have changed/added/removed in ansible.cfg
(or using the ANSIBLE_* environment variables).
-->
ansible.cfg:
```ini
[defaults]
host_key_checking = False
private_key_file = files/keys/ansible
remote_user = root
debug=1
```

##### OS / ENVIRONMENT
Host: CentOS Linux release 7.3.1611 (Core)
Managed: CentOS Linux release 7.3.1611 (Core)

##### SUMMARY
docker_service module doesn't respect "pull: no" parameter.
In my docker_service description I use "pull: no" with "build: yes" in order to build some images, that use some local image (FROM: localimg).

##### STEPS TO REPRODUCE
docker_service task description:
```yml
docker_service:
    pull: no
    build: yes
    project_src: /path-to-project
    files:
      - docker-compose.yml
    state: present
    stopped: yes
```
docker-compose.yml:
```yml
  someservice:
    image: serviceimg
    build:
      context: ../
      dockerfile: ./docker/Dockerfile
```
Dockerfile:
```Dockerfile
FROM localimg
```

##### EXPECTED RESULTS
Expected docker_service to build the image "serviceimg".
Locally it builds:
```bash
docker-compose -f docker-compose.yml build
```
completes successfully.

##### ACTUAL RESULTS
The task fails after "Trying to pull repository docker.io/library/localimg".


Discussion:
cc @chouseknecht
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/lib/ansible/modules/cloud/docker/docker_service.py b/lib/ansible/modules/cloud/docker/docker_service.py
--- a/lib/ansible/modules/cloud/docker/docker_service.py
+++ b/lib/ansible/modules/cloud/docker/docker_service.py
@@ -895,7 +895,7 @@ def cmd_build(self):
 
                     # build the image
                     try:
-                        new_image_id = service.build(pull=True, no_cache=self.nocache)
+                        new_image_id = service.build(pull=self.pull, no_cache=self.nocache)
                     except Exception as exc:
                         self.client.fail("Error: build failed with %s" % str(exc))
 


Test patch:
Repository: ansible/ansible

Issue:
yum_repository: Make clear "file" parameter must not include the ".repo" extension
##### ISSUE TYPE
 - Documentation Report

##### COMPONENT NAME
yum_repository

##### ANSIBLE VERSION
```
ansible 2.3.1.0
  config file = [...]
  configured module search path = Default w/o overrides
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
```

##### SUMMARY
Make clear on http://docs.ansible.com/ansible/latest/yum_repository_module.html, that the "file" parameter **must not** include the `.repo` extension.  While it might be clear on second thought, it isn't on first thought.



Discussion:
cc @jtyr
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/lib/ansible/modules/packaging/os/yum_repository.py b/lib/ansible/modules/packaging/os/yum_repository.py
--- a/lib/ansible/modules/packaging/os/yum_repository.py
+++ b/lib/ansible/modules/packaging/os/yum_repository.py
@@ -9,9 +9,11 @@
 __metaclass__ = type
 
 
-ANSIBLE_METADATA = {'metadata_version': '1.1',
-                    'status': ['stableinterface'],
-                    'supported_by': 'core'}
+ANSIBLE_METADATA = {
+    'metadata_version': '1.1',
+    'status': ['stableinterface'],
+    'supported_by': 'core'
+}
 
 DOCUMENTATION = '''
 ---
@@ -112,7 +114,8 @@
     required: false
     default: null
     description:
-      - File to use to save the repo in. Defaults to the value of I(name).
+      - File name without the C(.repo) extension to save the repo in. Defaults
+        to the value of I(name).
   gpgcakey:
     required: false
     default: null


Test patch:
Repository: ansible/ansible

Issue:
Error in examples for the new import_tasks.py
##### ISSUE TYPE
 - Documentation Report

##### COMPONENT NAME
import_tasks.py

##### ANSIBLE VERSION
all versions with import_tasks.py and website

##### CONFIGURATION
N/A

##### OS / ENVIRONMENT
N/A

##### SUMMARY
This line has a stray " and still refers to ```include:```

https://github.com/ansible/ansible/blob/b3cee37dc116f7f05ed31de309198f89de85621b/lib/ansible/modules/utilities/logic/import_tasks.py#L52

This carries to http://docs.ansible.com/ansible/latest/import_tasks_module.html of course.

##### STEPS TO REPRODUCE
Go to http://docs.ansible.com/ansible/latest/import_tasks_module.html

##### EXPECTED RESULTS
N/A

##### ACTUAL RESULTS
N/A


Discussion:
@tykling Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information. 

Here are the items we could not find in your description:
- issue type
- ansible version
- component name

Please set the description of this issue with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE.md

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: issue_missing_data --->

Resolving patch:
diff --git a/lib/ansible/modules/utilities/logic/import_tasks.py b/lib/ansible/modules/utilities/logic/import_tasks.py
--- a/lib/ansible/modules/utilities/logic/import_tasks.py
+++ b/lib/ansible/modules/utilities/logic/import_tasks.py
@@ -49,7 +49,7 @@
     - debug:
         msg: task1
 
-    - include: stuff.yml"
+    - import_tasks: stuff.yml
       when: hostvar is defined
 """
 


Test patch:
Repository: ansible/ansible

Issue:
nxos_snmp_user documented auth should be authentication 
##### ISSUE TYPE
- Documentation Report

##### COMPONENT NAME
nxos_snmp_user_module
http://docs.ansible.com/ansible/latest/nxos_snmp_user_module.html
##### ANSIBLE VERSION
```
[root@localhost ~]# ansible --version
ansible 2.5.0
  config file = /root/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug  4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
```

##### CONFIGURATION
[root@localhost ~]# ansible-config dump --only-changed
DEFAULT_GATHERING(/root/ansible.cfg) = explicit
DEFAULT_HOST_LIST(/root/ansible.cfg) = [u'/root/hosts']
HOST_KEY_CHECKING(/root/ansible.cfg) = False
PARAMIKO_HOST_KEY_AUTO_ADD(/root/ansible.cfg) = True

##### OS / ENVIRONMENT
CentOS Linux release 7.3.1611 (Core)
##### SUMMARY
`auth` is documented, but it should be `authentication` 

##### STEPS TO REPRODUCE
just the docs are wrong, the following playbook works:

```
---
- hosts: cisco
  connection: local
  tasks:
    - nxos_snmp_user:
        user: example_user
        group: network-admin
        authentication: sha
        pwd: test_password
        provider: "{{login_info}}"
```




Discussion:
cc @GGabriele @jedelman8 @mikewiebe @privateip @rahushen @rcarrillocruz @trishnaguha
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/lib/ansible/modules/network/nxos/nxos_snmp_user.py b/lib/ansible/modules/network/nxos/nxos_snmp_user.py
--- a/lib/ansible/modules/network/nxos/nxos_snmp_user.py
+++ b/lib/ansible/modules/network/nxos/nxos_snmp_user.py
@@ -43,15 +43,15 @@
         description:
             - Group to which the user will belong to.
         required: true
-    auth:
+    authentication:
         description:
-            - Auth parameters for the user.
+            - Authentication parameters for the user.
         required: false
         default: null
         choices: ['md5', 'sha']
     pwd:
         description:
-            - Auth password when using md5 or sha.
+            - Authentication password when using md5 or sha.
         required: false
         default: null
     privacy:
@@ -77,7 +77,7 @@
 - nxos_snmp_user:
     user: ntc
     group: network-operator
-    auth: md5
+    authentication: md5
     pwd: test_password
 '''
 


Test patch:
Repository: ansible/ansible

Issue:
ecs_taskdefinition reads containers parameter even when not defined
##### ISSUE TYPE
 - Bug Report

##### COMPONENT NAME
ecs_taskdefinition module

##### ANSIBLE VERSION
```
0% ansible --version
ansible 2.4.0.0
  config file = None
  configured module search path = [u'/Users/kimmoko/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.13 (default, Apr  4 2017, 08:47:57) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)]
```

##### CONFIGURATION

##### OS / ENVIRONMENT
N/A

##### SUMMARY
`containers` parameter is not marked as required (https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py#L227) but is read anyway in (https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py#L244):

##### STEPS TO REPRODUCE
```yaml
   - name: delete taskdef
      ecs_taskdefinition:
        family: "xxxx"
        state: absent
        revision: "yyy"
```

##### EXPECTED RESULTS
Module runs without exception.

##### ACTUAL RESULTS
Module fails with exception.
```
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: 'NoneType' object is not iterable
fatal: [localhost]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_UuUi_a/ansible_module_ecs_taskdefinition.py\", line 396, in <module>\n    main()\n  File \"/tmp/ansible_UuUi_a/ansible_module_ecs_taskdefinition.py\", line 244, in main\n    for container in module.params['containers']:\nTypeError: 'NoneType' object is not iterable\n", 
    "module_stdout": "", 
    "rc": 0
}
```



Discussion:

Resolving patch:
diff --git a/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py b/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py
--- a/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py
+++ b/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py
@@ -129,6 +129,7 @@
 
 from ansible.module_utils.basic import AnsibleModule
 from ansible.module_utils.ec2 import boto3_conn, camel_dict_to_snake_dict, ec2_argument_spec, get_aws_connection_info
+from ansible.module_utils._text import to_text
 
 class EcsTaskManager:
     """Handles ECS Tasks"""
@@ -241,10 +242,9 @@ def main():
     task_mgr = EcsTaskManager(module)
     results = dict(changed=False)
 
-    for container in module.params['containers']:
-        if 'environment' in container:
-            for environment in container['environment']:
-                environment['value'] = str(environment['value'])
+    for container in module.params.get('containers', []):
+        for environment in container.get('environment', []):
+            environment['value'] = to_text(environment['value'])
 
     if module.params['state'] == 'present':
         if 'containers' not in module.params or not module.params['containers']:


Test patch: