sys.exit used, but not imported.
This commit is contained in:
parent
4048de9c1e
commit
b4ad532248
1 changed files with 5 additions and 4 deletions
|
@ -32,7 +32,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- Account API token. See I(account_email) for info.
|
- Account API token. See I(account_email) for info.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
|
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
|
@ -67,7 +67,7 @@ options:
|
||||||
default: 3600 (one hour)
|
default: 3600 (one hour)
|
||||||
|
|
||||||
value:
|
value:
|
||||||
description:
|
description:
|
||||||
- Record value
|
- Record value
|
||||||
- "Must be specified when trying to ensure a record exists"
|
- "Must be specified when trying to ensure a record exists"
|
||||||
required: false
|
required: false
|
||||||
|
@ -130,12 +130,13 @@ EXAMPLES = '''
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
from sys import exit
|
||||||
try:
|
try:
|
||||||
from dnsimple import DNSimple
|
from dnsimple import DNSimple
|
||||||
from dnsimple.dnsimple import DNSimpleException
|
from dnsimple.dnsimple import DNSimpleException
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "failed=True msg='dnsimple required for this module'"
|
print "failed=True msg='dnsimple required for this module'"
|
||||||
sys.exit(1)
|
exit(1)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
|
@ -148,7 +149,7 @@ def main():
|
||||||
type = dict(required=False, choices=['A', 'ALIAS', 'CNAME', 'MX', 'SPF', 'URL', 'TXT', 'NS', 'SRV', 'NAPTR', 'PTR', 'AAAA', 'SSHFP', 'HINFO', 'POOL']),
|
type = dict(required=False, choices=['A', 'ALIAS', 'CNAME', 'MX', 'SPF', 'URL', 'TXT', 'NS', 'SRV', 'NAPTR', 'PTR', 'AAAA', 'SSHFP', 'HINFO', 'POOL']),
|
||||||
ttl = dict(required=False, default=3600, type='int'),
|
ttl = dict(required=False, default=3600, type='int'),
|
||||||
value = dict(required=False),
|
value = dict(required=False),
|
||||||
priority = dict(required=False, type='int'),
|
priority = dict(required=False, type='int'),
|
||||||
state = dict(required=False, choices=['present', 'absent']),
|
state = dict(required=False, choices=['present', 'absent']),
|
||||||
solo = dict(required=False, type='bool'),
|
solo = dict(required=False, type='bool'),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue