configure authorized keys
This commit is contained in:
@@ -208,7 +208,41 @@
|
|||||||
become: true
|
become: true
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
clean: yes
|
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
|
# - name: Create ansible-pull.sh crontab entry
|
||||||
# become: true
|
# 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
|
* authorized_keys = heath
|
||||||
* hpf-ans
|
x hpf-ans
|
||||||
* system user
|
x system user
|
||||||
* /usr/bin/bash
|
x /usr/bin/bash
|
||||||
* member of hpf-sudo-ntp
|
x member of hpf-sudo-np
|
||||||
* authorized_keys = hpf-ans
|
* authorized_keys = hpf-ans
|
||||||
* first
|
* first
|
||||||
* normal user
|
* normal user
|
||||||
|
|||||||
Reference in New Issue
Block a user