Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 27, 2023
1 parent 8e763c9 commit 5ceb114
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/ddns-lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ def lambda_handler(
default_hostname = '-'.join(['ip'] + private_ip.split('.'))
if tag_data['option_zone'].valid:
if tag_data['option_name'].valid:
LOGGER.info(f"1.1 instance: {instance_id}, using tag_option.zone hostname {tag_data['option_name'].hostname} and tag_option.zone zone {tag_data['option_zone'].zonename)}")
LOGGER.info(
f"1.1 instance: {instance_id}, using tag_option.zone hostname {tag_data['option_name'].hostname} and tag_option.zone zone {tag_data['option_zone'].zonename}")
f_hostname = tag_data['option_name'].hostname
f_zonename = tag_data['option_zone'].zonename
elif tag_data['name'].valid:
Expand All @@ -666,7 +667,8 @@ def lambda_handler(

else:
if tag_data['option_name'].valid:
LOGGER.info(f"2.1 instance: {instance_id}, using tag_option.name hostname {tag_data['option_name'].hostname} and and tag_option.name zone {tag_data['option_name'].zonename)}")
LOGGER.info(
f"2.1 instance: {instance_id}, using tag_option.name hostname {tag_data['option_name'].hostname} and and tag_option.name zone {tag_data['option_name'].zonename}")
f_hostname = tag_data['option_name'].hostname
f_zonename = tag_data['option_name'].zonename
elif not tag_data['option_name'].valid and tag_data['option_name'].hostname and tag_data['dhcp_options'].valid:
Expand Down
Binary file modified code/ddns-lambda.zip
Binary file not shown.

0 comments on commit 5ceb114

Please sign in to comment.