comparison users.py @ 3:61945df2a392

updates to work on recent raspbian installs
author drewp@bigasterisk.com
date Sun, 07 Nov 2021 15:42:37 -0800
parents 1550a6db59b3
children 68eeca50ae7f
comparison
equal deleted inserted replaced
2:7f7af7e2ba8d 3:61945df2a392
1 from pyinfra import host 1 from pyinfra import host
2 from pyinfra.operations import server 2 from pyinfra.operations import server
3 from pyinfra.facts.server import LinuxDistribution 3 from pyinfra.facts.server import LinuxDistribution
4 4
5 is_pi = host.get_fact(LinuxDistribution)['name'] == 'Debian' 5 is_pi = host.get_fact(LinuxDistribution)['name'] in ['Debian', 'Raspbian GNU/Linux']
6 6
7 # raspbian took 1000 for 'pi' group, but drewp is rarely used on pi 7 # raspbian took 1000 for 'pi' group, but drewp is rarely used on pi
8 # setups so hopefully it won't matter much that drew group has a 8 # setups so hopefully it won't matter much that drew group has a
9 # different id. 9 # different id.
10 drewp_gid = 1000 if not is_pi else 501 10 drewp_gid = 1000 if not is_pi else 501