]>
Commit | Line | Data |
---|---|---|
0f3047a7 IB |
1 | nixops show a deprecation message at each deployment because hetzner |
2 | info is outdated. To fix it: | |
3 | ||
4 | cp -a ~/.nixops ~/.nixops.bak | |
5 | ||
6 | nixops export --all > all.json | |
7 | ||
8 | network=$(cat all.json| jq -r '."cef694f3-081d-11e9-b31f-0242ec186adf".resources.eldiron."hetzner.networkInfo"' | jq -r -c '.networking.interfaces.eth0 = { "ipv4": { "addresses": [ { "address": .networking.interfaces.eth0.ipAddress, "prefixLength": .networking.interfaces.eth0.prefixLength } ] } }') | |
9 | ||
10 | cat all.json | jq --arg network "$network" '."cef694f3-081d-11e9-b31f-0242ec186adf".resources.eldiron."hetzner.networkInfo" = $network' > all_new.json | |
11 | ||
12 | nixops delete --force -d eldiron | |
13 | ||
14 | nixops import < all_new.json | |
15 | ||
16 | rm all.json all_new.json | |
17 | ||
18 | *check that everything works*, then: | |
19 | ||
20 | rm -rf ~/.nixops.bak |