diff --git a/all.yml b/all.yml index cfba670..2492c13 100755 --- a/all.yml +++ b/all.yml @@ -1,12 +1,19 @@ - hosts: datacenter name: Roles + gather_facts: false roles: + - name: setup + tags: setup - name: common tags: common - name: hosts tags: hosts - name: ssh_config - tags: ssh_configS + tags: ssh_config + - name: sshd_config + tags: sshd_config + - name: ssh_keys + tags: ssh_keys - name: wake_on_lan tags: wake_on_lan - name: matter-server diff --git a/collections/requirements.yml b/collections/requirements.yml index f924ac5..9953b26 100755 --- a/collections/requirements.yml +++ b/collections/requirements.yml @@ -1,3 +1,6 @@ ---- +# requirements.yml +# ansible-galaxy collection install -r collections/requirements.yml --force collections: - - name: community.general \ No newline at end of file + - name: community.general + source: https://galaxy.ansible.com + - name: community.docker diff --git a/roles/requirements.yml b/roles/requirements.yml index d978f66..12f30a5 100755 --- a/roles/requirements.yml +++ b/roles/requirements.yml @@ -1,5 +1,5 @@ ---- +# requirements.yml collections: - name: community.general source: https://galaxy.ansible.com - \ No newline at end of file + - name: community.docker diff --git a/roles/ssh_keys/tasks/main.yml b/roles/ssh_keys/tasks/main.yml index 7bb2d87..d93aa18 100755 --- a/roles/ssh_keys/tasks/main.yml +++ b/roles/ssh_keys/tasks/main.yml @@ -17,3 +17,8 @@ owner: jd group: jd when: inventory_hostname != 'nas.home.lan' + - name: Set authorized key taken from file + ansible.posix.authorized_key: + user: jd + state: present + key: "{{ lookup('file', '/home/jd/.ssh/id_rsa.pub') }}"