mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
serverless: fix broken import
This commit is contained in:
parent
94a327dd09
commit
c52f355bcb
2 changed files with 10 additions and 3 deletions
|
@ -58,7 +58,7 @@ options:
|
||||||
default: true
|
default: true
|
||||||
notes:
|
notes:
|
||||||
- Currently, the `serverless` command must be in the path of the node executing the task. In the future this may be a flag.
|
- Currently, the `serverless` command must be in the path of the node executing the task. In the future this may be a flag.
|
||||||
requirements: [ "serverless" ]
|
requirements: [ "serverless", "yaml" ]
|
||||||
author: "Ryan Scott Brown @ryansb"
|
author: "Ryan Scott Brown @ryansb"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -116,7 +116,12 @@ command:
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import traceback
|
import traceback
|
||||||
import yaml
|
|
||||||
|
try:
|
||||||
|
import yaml
|
||||||
|
HAS_YAML = True
|
||||||
|
except ImportError:
|
||||||
|
HAS_YAML = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
|
@ -159,6 +164,9 @@ def main():
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not HAS_YAML:
|
||||||
|
module.fail_json(msg='yaml is required for this module')
|
||||||
|
|
||||||
service_path = module.params.get('service_path')
|
service_path = module.params.get('service_path')
|
||||||
state = module.params.get('state')
|
state = module.params.get('state')
|
||||||
functions = module.params.get('functions')
|
functions = module.params.get('functions')
|
||||||
|
|
|
@ -43,7 +43,6 @@ lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py
|
||||||
lib/ansible/modules/cloud/google/gc_storage.py
|
lib/ansible/modules/cloud/google/gc_storage.py
|
||||||
lib/ansible/modules/cloud/google/gcdns_record.py
|
lib/ansible/modules/cloud/google/gcdns_record.py
|
||||||
lib/ansible/modules/cloud/google/gcdns_zone.py
|
lib/ansible/modules/cloud/google/gcdns_zone.py
|
||||||
lib/ansible/modules/cloud/misc/serverless.py
|
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disks.py
|
lib/ansible/modules/cloud/ovirt/ovirt_disks.py
|
||||||
lib/ansible/modules/cloud/univention/udm_user.py
|
lib/ansible/modules/cloud/univention/udm_user.py
|
||||||
lib/ansible/modules/cloud/webfaction/webfaction_app.py
|
lib/ansible/modules/cloud/webfaction/webfaction_app.py
|
||||||
|
|
Loading…
Reference in a new issue