Skip to content

Commit

Permalink
Avoid FQDN for OEM Hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
bill-buchan committed Mar 7, 2024
1 parent 9a2a314 commit bef8412
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
loop:
- emcli_setup.sh
- add_targets.sh
tags: clean_up

# block
become: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
register: agentpatcher_directory

- name: Backup Old AgentPatcher
ansible.builtin.shell: mv {{ agent_home }}/AgentPatcher {{ agent_home }}/AgentPatcher_PREV
ansible.builtin.shell: mv {{ agent_home }}/AgentPatcher {{ agent_home }}/AgentPatcher_PREV.$(date +%Y%m%d%H%M)
when: agentpatcher_directory.stat.exists and agentpatcher_directory.stat.isdir

- name: Unzip OMS AgentPatcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ HOST_FQDN_NAME=$(hostname --fqdn)

# For delius hosts, we cannot use the hostname to determine the lifecycle status, so we use the tags instead
APPLICATION="{{ ec2.tags['application'] }}"

# For OEM hosts we do not use the FQDN for the targets
if [[ "${APPLICATION}" == "hmpps-oem" ]]; then
HOST_FQDN_NAME=${HOSTNAME}
fi
if [[ "${APPLICATION}" == "delius" ]]; then
LIFECYCLE_STATUS=$(echo {{ ec2.tags['environment-name'].split('-')[-1] }})
# First character must be made uppercase
Expand Down

0 comments on commit bef8412

Please sign in to comment.