chore: rm pyinfra script

main
CrimsonTome 2022-11-22 23:04:56 +00:00 committed by Rowan Clark
parent c047546d26
commit 8d6142cef3
No known key found for this signature in database
GPG Key ID: F620D51904044094
1 changed files with 0 additions and 44 deletions

View File

@ -1,44 +0,0 @@
from pyinfra import host
from pyinfra.facts.files import File
from pyinfra.facts.server import LinuxName
from pyinfra.operations import apt, server, dnf, files
os = host.get_fact(LinuxName)
print (os)
# why does this not work????
# username = host.get_fact(User)
username = str(server.shell("whoami"))
print(username)
hostname = host.get_fact(server.Hostname)
print(hostname)
# why does this not work????
# homeDir = host.get_fact(server.Home)
homeDir = str(server.shell("echo $HOME"))
print(homeDir)
# files.directory(
# name="Ensure /home/username/git exists",
# path=str(homeDir)+"/git",
# user=username,
# group=username,
# )
# files.directory(
# name="Ensure /home/username/.config exists",
# path=str(homeDir)+"/.config",
# user=username,
# group=username,
# )
# files.directory(
# name="Ensure /home/username/.ssh exists",
# path=str(homeDir)+"/.ssh",
# user=username,
# group=username,
# )