Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

23 changes: 23 additions & 0 deletions templates/common/gcp/units/gcp-hostname.service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: gcp-hostname.service
enabled: true
contents: |
[Unit]
Description=Set GCP Transient Hostname
# Removal of this file signals firstboot completion
ConditionPathExists=!/etc/ignition-machine-config-encapsulated.json
# Block services relying on Networking being up.
Before=network-online.target
# Wait for NetworkManager to report its online
After=NetworkManager-wait-online.service
# Run before hostname checks
Before=node-valid-hostname.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/afterburn --provider gcp --hostname=/run/afterburn.hostname
ExecStart=/bin/bash -c "source /usr/local/sbin/set-valid-hostname.sh; set_valid_hostname `cat /run/afterburn.hostname`"

[Install]
WantedBy=multi-user.target
WantedBy=network-online.target