comparison net.py @ 17:0c1496e11b8f

get skaffold on hosts that want to do deploys
author drewp@bigasterisk.com
date Sat, 13 Nov 2021 13:51:55 -0800
parents 516a91a3ec08
children 301dad3cdb7b
comparison
equal deleted inserted replaced
16:c5784e3d4f8d 17:0c1496e11b8f
1 from pyinfra import host 1 from pyinfra import host
2 from pyinfra.facts.hardware import Ipv4Addrs 2 from pyinfra.facts.hardware import Ipv4Addrs
3 from pyinfra.facts.server import LinuxDistribution 3 from pyinfra.facts.server import LinuxDistribution
4 from pyinfra.operations import apt, files, server, systemd 4 from pyinfra.operations import apt, files, server, systemd
5 5
6 bang_is_old = True
7 is_pi = host.get_fact(LinuxDistribution)['name'] in ['Debian', 'Raspbian GNU/Linux'] 6 is_pi = host.get_fact(LinuxDistribution)['name'] in ['Debian', 'Raspbian GNU/Linux']
8 is_wifi = host.name in ['frontdoor', 'living', 'plus'] 7 is_wifi = host.name in ['frontdoor', 'living', 'plus']
9 ssh_host = host.host_data.get('ssh_hostname', host.name)
10 8
11 if is_wifi: 9 if is_wifi:
12 # todo: netplan could do this, below 10 # todo: netplan could do this, below
13 files.put(src="secrets/wpa_supplicant.conf", dest="/etc/wpa_supplicant/wpa_supplicant.conf") 11 files.put(src="secrets/wpa_supplicant.conf", dest="/etc/wpa_supplicant/wpa_supplicant.conf")
14 12