Ansible SSH Keys Deployment mofm 2017-12-10 21:25 Comments Ansible authorized_key modulu 'delegate_to' ile sunuculara sshkey'leri deploy ederken bazi sshkey'lerin eklenmedigini gorebilirsiniz. Boyle bir sorun ile karsilasmamak icin asagidaki gibi bu module ihtiyac olmadan sshkey'leri ekleyebilirsiniz. - hosts: webservers remote_user: jack tasks: - name: fetch all public keys shell: cat ~/.ssh/id_rsa.pub register: ssh_keys tags: - ssh - name: check ssh public keys debug: msg="{{ ssh_keys.stdout }}" tags: - ssh - name: deploy ssh keys shell: echo {{ ssh_keys.stdout }} >> ~/.ssh/authorized_keys delegate_to: "{{ item }}" with_items: - "{{groups['webservers']}}" tags: - ssh Comments
Comments