Skip to content
This repository was archived by the owner on Jun 19, 2020. It is now read-only.

Commit 2ea59d1

Browse files
committed
Removal of necessity to add public keys.
1 parent d3c8cbd commit 2ea59d1

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

Vagrantfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
7777

7878
config.vm.synced_folder "./../site", "/vagrant", owner:"www-data", group:"www-data", mount_options:["dmode=775", "fmode=775"]
7979

80+
if File.exist?('.vagrant/machines/default/' + deployment_vars_local['fuel_local_vagrant_provider'] + '/private_key')
81+
if !File.exist?('.vagrant/private_key')
82+
print "Generating symlink for private key..."
83+
File.symlink(File.expand_path('.vagrant/machines/default/' + deployment_vars_local['fuel_local_vagrant_provider'] + '/private_key'), '.vagrant/private_key')
84+
print "Going on..."
85+
end
86+
end
87+
8088
end

hosts/production.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ your.production.server.example.com
77
[production:children]
88
web
99
vagrant
10+
11+
[vagrant:vars]
12+
ansible_ssh_private_key_file=.vagrant/private_key

hosts/staging.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ your.staging.server.example.com
77
[staging:children]
88
web
99
vagrant
10+
11+
[vagrant:vars]
12+
ansible_ssh_private_key_file=.vagrant/private_key

setup.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@
117117
- name: FUEL | Ensure Apache is running
118118
service: name=apache2 state=restarted enabled=yes
119119

120-
- authorized_key: user=vagrant key="{{ item }}"
121-
with_items:
122-
- "{{ fuel_pubkey_urls }}"
123-
124-
125120
- hosts: vagrant
126121
remote_user: vagrant
127122
sudo: yes

vagrant-inventory

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
192.168.50.50
33

44
[vagrant:vars]
5+
ansible_ssh_private_key_file=.vagrant/private_key
56
vhostTemplatePath=templates/vhost.conf
6-
mysqlTemplatePath=templates/mysql
7+
mysqlTemplatePath=templates/mysql

vars/deployment_vars_local.yml.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
fuel_local_url: your-local-url.dev
44
fuel_local_site_path: /path/to/your/local/project/site
5+
fuel_local_vagrant_provider: vmware_fusion

0 commit comments

Comments
 (0)