Skip to content

Commit

Permalink
Fix user for copying ssh keys
Browse files Browse the repository at this point in the history
  • Loading branch information
storax committed Aug 3, 2015
1 parent 75058e9 commit 4901575
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions crafternodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# So we can set the right hostname for rabbitmq and the db
- name: Create RayCrafter crafter node
hosts: [crafternodes, masterservers]
sudo: yes
sudo_user: root
become: yes
become_user: root
remote_user: vagrant
vars_files:
- env_vars/secret.yml
Expand All @@ -16,9 +16,14 @@
- {role: supervisor, when: "'crafternodes' in group_names"}
- {role: web, when: "'crafternodes' in group_names"}
- {role: celery, when: "'crafternodes' in group_names"}
- {role: graylog, when: "'crafternodes' in group_names"}
- {role: gridftp, when: "'crafternodes' in group_names"}
tasks:
- name: Copy private ssh key of masterserver
- name: Create .ssh key dir
become_user: "{{ web_user}}"
file: path="~/.ssh" state=directory
when: "'crafternodes' in group_names"
- name: Copy private ssh key of crafternodes
become_user: "{{ web_user }}"
copy: src="{{playbook_dir}}/files/ssh/id_rsa" dest="~/.ssh/id_rsa"
owner={{ ansible_ssh_user }} mode=0700
owner={{ web_user }} mode=0700
when: "'crafternodes' in group_names"

0 comments on commit 4901575

Please sign in to comment.