yaml syntax fixes, simplified letsencrypt cert-change check

This commit is contained in:
AnsibleGuy 2022-02-05 12:50:12 +01:00
parent 13568254e4
commit e9bdd2fd0b
7 changed files with 23 additions and 15 deletions

1
.github/FUNDING.yml vendored
View File

@ -1,3 +1,4 @@
---
# These are supported funding model platforms # These are supported funding model platforms
patreon: ansibleguy patreon: ansibleguy

9
.yamllint Normal file
View File

@ -0,0 +1,9 @@
---
extends: default
rules:
truthy:
allowed-values: ['true', 'false', 'yes', 'no']
line-length:
max: 150

View File

@ -55,12 +55,9 @@ class FilterModule(object):
block_started = False block_started = False
for line in running_config.split('\n'): for line in running_config.split('\n'):
if block_started: if block_started:
if line.find('Certificate Name:') != -1: if line.find('Domains:') != -1:
# block ended
break
elif line.find('Domains:') != -1:
run_domains = line.split(': ')[1].split(' ') run_domains = line.split(': ')[1].split(' ')
break
elif line.find(f"Certificate Name: {cert_key}") != -1: elif line.find(f"Certificate Name: {cert_key}") != -1:
block_started = True block_started = True

View File

@ -1,3 +1,4 @@
---
# external roles and collections to download # external roles and collections to download
# install: ansible-galaxy install -r requirements.yml # install: ansible-galaxy install -r requirements.yml