Adds ssh configuration to allow ssh between nodes without passwords

This commit is contained in:
Victor Schröder
2016-04-03 00:11:27 +02:00
parent 1d43566233
commit 58713c2bc9
2 changed files with 19 additions and 0 deletions

View File

@@ -107,6 +107,22 @@
state: present state: present
with_items: instances with_items: instances
- name: copying the ssh key to the nodes
copy:
src: private-key
dest: /home/vagrant/private-key
mode: 0600
group: root
owner: vagrant
- name: copying ssh configuration
copy:
src: ssh-config
dest: /home/vagrant/.ssh/config
mode: 0600
group: root
owner: vagrant
- name: fixing the hostname - name: fixing the hostname
hostname: hostname:
name: "{{ inventory_hostname }}" name: "{{ inventory_hostname }}"

3
prepare-local/ssh-config Normal file
View File

@@ -0,0 +1,3 @@
Host node*
IdentityFile ~/private-key
StrictHostKeyChecking no