Feat: add public key to ssh to user
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
- username: user
|
||||
password: "$y$j9T$PR8GfM2MjGudOCd7hF9NP1$/qRGtuNuWaRVVGmB1A4rgtaT0MMB9IoB4fnaxW1kvf4" #plop
|
||||
shell: "/bin/zsh"
|
||||
public_key:
|
||||
config:
|
||||
giturl: "https://git.opytex.org/lafrite/dotfiles.git"
|
||||
stowing: ["nvim", "tmux", "zsh"]
|
||||
@@ -14,6 +15,8 @@
|
||||
password: "$y$j9T$PR8GfM2MjGudOCd7hF9NP1$/qRGtuNuWaRVVGmB1A4rgtaT0MMB9IoB4fnaxW1kvf4" #plop
|
||||
groups: ["wheel"]
|
||||
system: yes
|
||||
public_key:
|
||||
- keyfile: id_encrypt_fool.pub
|
||||
config:
|
||||
giturl: "https://git.opytex.org/lafrite/dotfiles.git"
|
||||
stowing: ["tmux"]
|
||||
|
||||
@@ -16,8 +16,16 @@ def test_create_users(host):
|
||||
assert admin.shell == "/bin/bash"
|
||||
assert admin.home == f"/home/{admin.name}"
|
||||
|
||||
def test_install_git_stow(host):
|
||||
pass
|
||||
def test_ssh_key(host):
|
||||
user = host.user("user")
|
||||
sshdir = host.file(user.home + "/.ssh")
|
||||
assert not sshdir.exists
|
||||
|
||||
admin = host.user("admin")
|
||||
sshdir = host.file(admin.home + "/.ssh")
|
||||
assert sshdir.exists
|
||||
autho = host.file(admin.home + "/.ssh/authorized_keys")
|
||||
assert autho.contains("user1@fool")
|
||||
|
||||
def test_clone_dotfiles(host):
|
||||
user = host.user("user")
|
||||
|
||||
Reference in New Issue
Block a user