diff options
author | Hannes Ljungberg <hannes@5monkeys.se> | 2019-04-22 17:29:46 +0200 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2019-04-23 14:06:25 -0600 |
commit | 4dee11336c1737c4b09364ce137f02c0ae395fa9 (patch) | |
tree | a3cc4589213ef75bd1d083b87f7802cbd74d6235 /lib | |
parent | 3cd3c0d7c6034e38f059aa4579c8c036f99dbd46 (diff) | |
download | ansible-4dee11336c1737c4b09364ce137f02c0ae395fa9.tar.gz |
docker_swarm_service: Use str type for configs/secrets gid/uid (#55591)
* Change type of secrets gid/uid to str
* Add changelog fragment
Co-Authored-By: hannseman <hannes@5monkeys.se>
(cherry picked from commit 14c60e6ec8f21435460767a3ff684cd67907fd2f)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/modules/cloud/docker/docker_swarm_service.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/ansible/modules/cloud/docker/docker_swarm_service.py b/lib/ansible/modules/cloud/docker/docker_swarm_service.py index 7c66810844..296420a5e6 100644 --- a/lib/ansible/modules/cloud/docker/docker_swarm_service.py +++ b/lib/ansible/modules/cloud/docker/docker_swarm_service.py @@ -58,15 +58,15 @@ options: uid: description: - UID of the config file's owner. - type: int + type: str gid: description: - GID of the config file's group. - type: int + type: str mode: description: - - File access mode inside the container. - type: str + - File access mode inside the container. Must be an octal number (like C(0644) or C(0444)). + type: int constraints: description: - List of the service constraints. @@ -611,14 +611,14 @@ options: uid: description: - UID of the secret file's owner. - type: int + type: str gid: description: - GID of the secret file's group. - type: int + type: str mode: description: - - File access mode inside the container. + - File access mode inside the container. Must be an octal number (like C(0644) or C(0444)). type: int state: description: @@ -2250,8 +2250,8 @@ class DockerServiceManager(object): 'config_id': config_data['ConfigID'], 'config_name': config_data['ConfigName'], 'filename': config_data['File'].get('Name'), - 'uid': int(config_data['File'].get('UID')), - 'gid': int(config_data['File'].get('GID')), + 'uid': config_data['File'].get('UID'), + 'gid': config_data['File'].get('GID'), 'mode': config_data['File'].get('Mode') }) @@ -2263,8 +2263,8 @@ class DockerServiceManager(object): 'secret_id': secret_data['SecretID'], 'secret_name': secret_data['SecretName'], 'filename': secret_data['File'].get('Name'), - 'uid': int(secret_data['File'].get('UID')), - 'gid': int(secret_data['File'].get('GID')), + 'uid': secret_data['File'].get('UID'), + 'gid': secret_data['File'].get('GID'), 'mode': secret_data['File'].get('Mode') }) @@ -2506,16 +2506,16 @@ def main(): config_id=dict(type='str', required=True), config_name=dict(type='str', required=True), filename=dict(type='str'), - uid=dict(type='int'), - gid=dict(type='int'), + uid=dict(type='str'), + gid=dict(type='str'), mode=dict(type='int'), )), secrets=dict(type='list', elements='dict', options=dict( secret_id=dict(type='str', required=True), secret_name=dict(type='str', required=True), filename=dict(type='str'), - uid=dict(type='int'), - gid=dict(type='int'), + uid=dict(type='str'), + gid=dict(type='str'), mode=dict(type='int'), )), networks=dict(type='list', elements='str'), |