From c8f39d9a7f689807d0571bc847336cedaef2d8fa Mon Sep 17 00:00:00 2001 From: Raymond Yee Date: Tue, 26 May 2015 14:09:58 -0700 Subject: [PATCH] fix security group setting for please add setup_django_localvm.sh --- vagrant/Vagrantfile | 4 ++-- vagrant/please.yml | 6 ++++-- vagrant/setup_django_localvm.sh | 4 ++++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 vagrant/setup_django_localvm.sh diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index ca1c2e34..97bf89b8 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -19,7 +19,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| #node.vm.synced_folder "data", "vagrant_data" node.vm.provision 'ansible' do |ansible| - ansible.playbook = 'hello.yml' + ansible.playbook = 'please.yml' end @@ -45,7 +45,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| aws.availability_zone = "us-east-1c" aws.ami = "ami-d8132bb0" # put into just security group - aws.security_groups = ["sg-d7f442bf"] + aws.security_groups = ["just"] aws.tags = { 'Name' => 'please_vagrant' diff --git a/vagrant/please.yml b/vagrant/please.yml index c11e7644..9991eec8 100644 --- a/vagrant/please.yml +++ b/vagrant/please.yml @@ -23,8 +23,9 @@ ttl: 60 value: "{{ansible_ssh_host}}" overwrite: yes - aws_access_key: "{{aws_access_key}}" - aws_secret_key: "{{aws_secret_key}}" + aws_access_key: "{{ lookup('env','AWS_ACCESS_KEY_ID') }}" + aws_secret_key: "{{ lookup('env','AWS_SECRET_ACCESS_KEY') }}" + # sudo add repo to get latest version of python 2.7 - name: add-apt-repository ppa:fkrull/deadsnakes-python2.7 @@ -354,6 +355,7 @@ authorized_key: user={{user}} key={{item}} state=present with_fileglob: - /opt/regluit/deploy/public_keys/* + sudo: no - name: add public key from jenkins authorized_key: > diff --git a/vagrant/setup_django_localvm.sh b/vagrant/setup_django_localvm.sh new file mode 100644 index 00000000..e8d42cc0 --- /dev/null +++ b/vagrant/setup_django_localvm.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd /opt/regluit +source ENV/bin/activate +export DJANGO_SETTINGS_MODULE=regluit.settings.localvm \ No newline at end of file