Last active
April 19, 2020 09:52
-
-
Save mikebell/9dda588d45f4314c313665d73f3ab441 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh_authorized_keys: | |
- "github:mikebell" | |
hostname: k30s-master | |
write_files: | |
- enconding: "" | |
content: |- | |
#!/bin/bash | |
write_log () { | |
local message="${1}" | |
logger -t "run-cmd" "${message}" | |
echo "${message}" | |
} | |
write_log "Getting the service using eth0..." | |
ETH0=$(connmanctl services | awk '{ print $3 }' | while read -r s1; do connmanctl services $s1 | grep -q "eth0" && echo "$s1"; done) | |
write_log "eth0 is bound to: ${ETH0}" | |
write_log "Setting up manual net config..." | |
connmanctl config $ETH0 --ipv4 manual 192.168.1.250 255.255.255.0 192.168.1.1 --nameservers 1.1.1.1 1.0.0.1 | |
connmanctl config $ETH0 --ipv6 off | |
write_log "Restarting connman..." | |
service connman restart | |
write_log "$(connmanctl services $ETH0)" | |
write_log "Network setup done." | |
owner: root:root | |
path: /etc/run-cmd.sh | |
permissions: '0755' | |
run_cmd: | |
- "/etc/run-cmd.sh" | |
k3s_args: | |
- server | |
- "--disable-agent --no-deploy traefik --no-deploy servicelb" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment