configure authorized keys
This commit is contained in:
@@ -208,7 +208,41 @@
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
clean: yes
|
||||
changed_when: false
|
||||
|
||||
## New
|
||||
- name: root needs heath's authorized_key
|
||||
become: true
|
||||
ansible.posix.authorized_key:
|
||||
user: root
|
||||
state: present
|
||||
key: "{{ lookup('file', 'files/ssh-keys/heath.pub') }}"
|
||||
|
||||
## New
|
||||
- name: hpf-ans needs hpf-ans's authorized_key
|
||||
become: true
|
||||
ansible.posix.authorized_key:
|
||||
user: hpf-ans
|
||||
state: present
|
||||
key: "{{ lookup('file', 'files/ssh-keys/hpf-ans.pub') }}"
|
||||
|
||||
## New
|
||||
- name: first needs multiple authorized keys
|
||||
ansible.posix.authorized_key:
|
||||
user: first
|
||||
state: present
|
||||
key: "{{ lookup('file', item) }}"
|
||||
loop:
|
||||
- files/ssh-keys/heath.pub
|
||||
- files/ssh-keys/hpf-ans.pub
|
||||
|
||||
## New
|
||||
- name: heath needs heath's authorized_key
|
||||
become: true
|
||||
ansible.posix.authorized_key:
|
||||
user: heath
|
||||
state: present
|
||||
key: "{{ lookup('file', 'files/ssh-keys/heath.pub') }}"
|
||||
|
||||
# - name: Create ansible-pull.sh crontab entry
|
||||
# become: true
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM5BBUOxkuSK7WlpaDvp6lrM9ajLSyh4PWD7VFzYOFN5/zfafy6Vf/oxtLE4UACw5ZGvBMQNH40bW+T9aO0lQ9g= Heath@HPetersenFamily.com
|
||||
@@ -0,0 +1 @@
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBFiio/AimTUloJdfk4TXyWO7A0Fd9SoUcqheBjEvj4TnrxpSL/EhwF2CU9jZTasm6NBo2eKcH4aMt1l2ejOtIM= Heath@HPetersenFamily.com
|
||||
@@ -0,0 +1 @@
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGKMs/y5N2ROuPabOAFUGDYb50ER/vssX9Zcsm/yPEn81EWl7NezZ1ULCchiXfEsC1qB4jm9NxocpwXmo0A5YbY= hpf-ans Heath@HPetersenFamily.com
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
* root
|
||||
x root
|
||||
* authorized_keys = heath
|
||||
* hpf-ans
|
||||
* system user
|
||||
* /usr/bin/bash
|
||||
* member of hpf-sudo-ntp
|
||||
x hpf-ans
|
||||
x system user
|
||||
x /usr/bin/bash
|
||||
x member of hpf-sudo-np
|
||||
* authorized_keys = hpf-ans
|
||||
* first
|
||||
* normal user
|
||||
|
||||
Reference in New Issue
Block a user