Skip to content

Commit 5b44deb

Browse files
committed
use hostname instead of hardcoded value
1 parent 8752c68 commit 5b44deb

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/core-switch/scripts/openstack/yoga/nodes/controller/deploy/identity.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ cd ~/src/openstack
2828
[[ -d $SERVICE ]] || git clone https://opendev.org/openstack/$SERVICE.git -b stable/yoga
2929

3030
[[ $REBUILD == "1" ]] && sudo rm -rf /var/lib/$SERVICE/src/$SERVICE
31-
sudo cp -R ~/src/openstack/$SERVICE /var/lib/$SERVICE/src
32-
[[ -f ~/install/patch/$SERVICE.conf.patch ]] && sudo cp ~/install/patch/$SERVICE.conf.patch /var/lib/$SERVICE/patch
31+
sudo cp -vR ~/src/openstack/$SERVICE /var/lib/$SERVICE/src
32+
sudo cp -v ~/install/patch/$SERVICE*.conf.patch /var/lib/$SERVICE/patch
3333

3434
# this is actually flawed but we won't see a problem
3535
if rg -qF $SERVICE /etc/passwd
@@ -113,7 +113,7 @@ sudo chown www-data:www-data /var/log/nginx/$SERVICE
113113
sudo mkdir /var/www/$SERVICE
114114

115115
# port forwarder
116-
HOST_IP_ADDRESS=$(rg core\\.homelab /etc/hosts | cut -d " " -f1)
116+
HOST_IP_ADDRESS=$(rg -F $(hostname -f) /etc/hosts | cut -d " " -f1)
117117
sudo tee /lib/systemd/system/os-fwd-${SERVICE}.service << EOF
118118
[Unit]
119119
Description=${SERVICE} API forwarder

src/core-switch/scripts/openstack/yoga/nodes/controller/deploy/image.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ cd ~/src/openstack
2626
[[ -d $SERVICE ]] || git clone https://opendev.org/openstack/$SERVICE.git -b stable/yoga
2727

2828
[[ $REBUILD == "1" ]] && sudo rm -rf /var/lib/$SERVICE/src/$SERVICE
29-
sudo cp -R ~/src/openstack/$SERVICE /var/lib/$SERVICE/src
30-
sudo cp ~/install/patch/$SERVICE*.conf.patch /var/lib/$SERVICE/patch || true
29+
sudo cp -vR ~/src/openstack/$SERVICE /var/lib/$SERVICE/src
30+
sudo cp -v ~/install/patch/$SERVICE*.conf.patch /var/lib/$SERVICE/patch
3131

3232
# this is actually flawed but we won't see a problem
3333
if rg -qF $SERVICE /etc/passwd
@@ -114,7 +114,7 @@ sudo chown www-data:www-data /var/log/nginx/$SERVICE
114114
sudo mkdir /var/www/$SERVICE
115115

116116
# port forwarder
117-
HOST_IP_ADDRESS=$(rg core\\.homelab /etc/hosts | cut -d " " -f1)
117+
HOST_IP_ADDRESS=$(rg -F $(hostname -f) /etc/hosts | cut -d " " -f1)
118118
sudo tee /lib/systemd/system/os-fwd-${SERVICE}.service << EOF
119119
[Unit]
120120
Description=${SERVICE} API forwarder

src/core-switch/scripts/openstack/yoga/nodes/controller/deploy/placement.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cd ~/src/openstack
2828

2929
[[ $REBUILD == "1" ]] && sudo rm -rf /var/lib/$SERVICE/src/$SERVICE
3030
sudo cp -R ~/src/openstack/$SERVICE /var/lib/$SERVICE/src
31-
sudo cp ~/install/patch/$SERVICE*.conf.patch /var/lib/$SERVICE/patch || true
31+
sudo cp ~/install/patch/$SERVICE*.conf.patch /var/lib/$SERVICE/patch
3232

3333
# this is actually flawed but we won't see a problem
3434
if rg -qF $SERVICE /etc/passwd
@@ -113,7 +113,7 @@ sudo chown www-data:www-data /var/log/nginx/$SERVICE
113113
sudo mkdir /var/www/$SERVICE
114114

115115
# port forwarder
116-
HOST_IP_ADDRESS=$(rg core\\.homelab /etc/hosts | cut -d " " -f1)
116+
HOST_IP_ADDRESS=$(rg -F $(hostname -f) /etc/hosts | cut -d " " -f1)
117117
sudo tee /lib/systemd/system/os-fwd-${SERVICE}.service << EOF
118118
[Unit]
119119
Description=${SERVICE} API forwarder

0 commit comments

Comments
 (0)