mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-19 03:10:22 -07:00
remove unnecessary brackets in conditions (#10328)
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
* remove unnecessary brackets in conditions * add changelog frag
This commit is contained in:
parent
5a5b2d2eed
commit
682a89cdf5
32 changed files with 88 additions and 56 deletions
|
@ -501,13 +501,13 @@ class CloudflareAPI(object):
|
|||
if (self.type == 'AAAA') and (self.value is not None):
|
||||
self.value = self.value.lower()
|
||||
|
||||
if (self.type == 'SRV'):
|
||||
if self.type == 'SRV':
|
||||
if (self.proto is not None) and (not self.proto.startswith('_')):
|
||||
self.proto = '_{0}'.format(self.proto)
|
||||
if (self.service is not None) and (not self.service.startswith('_')):
|
||||
self.service = '_{0}'.format(self.service)
|
||||
|
||||
if (self.type == 'TLSA'):
|
||||
if self.type == 'TLSA':
|
||||
if (self.proto is not None) and (not self.proto.startswith('_')):
|
||||
self.proto = '_{0}'.format(self.proto)
|
||||
if (self.port is not None):
|
||||
|
@ -516,7 +516,7 @@ class CloudflareAPI(object):
|
|||
if not self.record.endswith(self.zone):
|
||||
self.record = join_str('.', self.record, self.zone)
|
||||
|
||||
if (self.type == 'DS'):
|
||||
if self.type == 'DS':
|
||||
if self.record == self.zone:
|
||||
self.module.fail_json(msg="DS records only apply to subdomains.")
|
||||
|
||||
|
@ -722,7 +722,7 @@ class CloudflareAPI(object):
|
|||
search_record = self.record
|
||||
new_record = None
|
||||
|
||||
if (self.type in ['A', 'AAAA', 'CNAME', 'TXT', 'MX', 'NS', 'PTR']):
|
||||
if self.type in ['A', 'AAAA', 'CNAME', 'TXT', 'MX', 'NS', 'PTR']:
|
||||
if not self.value:
|
||||
self.module.fail_json(msg="You must provide a non-empty value to create this record type")
|
||||
|
||||
|
@ -740,7 +740,7 @@ class CloudflareAPI(object):
|
|||
"ttl": self.ttl
|
||||
}
|
||||
|
||||
if (self.type in ['A', 'AAAA', 'CNAME']):
|
||||
if self.type in ['A', 'AAAA', 'CNAME']:
|
||||
new_record["proxied"] = self.proxied
|
||||
|
||||
if self.type == 'MX':
|
||||
|
@ -873,7 +873,7 @@ class CloudflareAPI(object):
|
|||
if ('proxied' in new_record) and ('proxied' in cur_record) and (cur_record['proxied'] != self.proxied):
|
||||
do_update = True
|
||||
if ('data' in new_record) and ('data' in cur_record):
|
||||
if (cur_record['data'] != new_record['data']):
|
||||
if cur_record['data'] != new_record['data']:
|
||||
do_update = True
|
||||
if (self.type == 'CNAME') and (cur_record['content'] != new_record['content']):
|
||||
do_update = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue