diff --git a/bootstrap.yml b/bootstrap.yml index 29a0287..00d1900 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -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 diff --git a/files/ssh_keys/first.pub b/files/ssh_keys/first.pub new file mode 100644 index 0000000..2d90fab --- /dev/null +++ b/files/ssh_keys/first.pub @@ -0,0 +1 @@ +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM5BBUOxkuSK7WlpaDvp6lrM9ajLSyh4PWD7VFzYOFN5/zfafy6Vf/oxtLE4UACw5ZGvBMQNH40bW+T9aO0lQ9g= Heath@HPetersenFamily.com diff --git a/files/ssh_keys/heath.pub b/files/ssh_keys/heath.pub new file mode 100644 index 0000000..0b0afcf --- /dev/null +++ b/files/ssh_keys/heath.pub @@ -0,0 +1 @@ +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBFiio/AimTUloJdfk4TXyWO7A0Fd9SoUcqheBjEvj4TnrxpSL/EhwF2CU9jZTasm6NBo2eKcH4aMt1l2ejOtIM= Heath@HPetersenFamily.com diff --git a/files/ssh_keys/hpf-ans.pub b/files/ssh_keys/hpf-ans.pub new file mode 100644 index 0000000..5958033 --- /dev/null +++ b/files/ssh_keys/hpf-ans.pub @@ -0,0 +1 @@ +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGKMs/y5N2ROuPabOAFUGDYb50ER/vssX9Zcsm/yPEn81EWl7NezZ1ULCchiXfEsC1qB4jm9NxocpwXmo0A5YbY= hpf-ans Heath@HPetersenFamily.com diff --git a/scraps/TODO.txt b/scraps/TODO.txt index 2ade85a..9924cdc 100644 --- a/scraps/TODO.txt +++ b/scraps/TODO.txt @@ -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