Home / DevOps

DevOps

Upload ssh key through ansible

Upload ssh key through ansible

Upload ssh key through ansible Create a file named ssh-key-setup.yml in directory name /etc/ansible/playbooks. --- - hosts: all become: yes #To start ansible-playbook ssh-key-setup.yml -u panev --ask-pass tasks: - name: Creates destination directory file: state=directory mode=0700 dest=/root/.ssh/ #file: state=directory mode=0700 owner=panev group=panev dest=/home/panev/.ssh/ #FOR USERS - name: Pushes user's rsa …

Read More »