working on using a-play-aws.sh to use an inventory directory that comprise both vagrant computed inventory and static jenkins file

pull/1/head
Raymond Yee 2016-05-04 13:47:16 -07:00
parent 93ae8bca12
commit e2edac78b4
2 changed files with 14 additions and 1 deletions

12
vagrant/Vagrantfile vendored
View File

@ -6,6 +6,8 @@ VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "jenkins"
config.vm.define "please" do |node| config.vm.define "please" do |node|
# Every Vagrant virtual environment requires a box to build off of. # Every Vagrant virtual environment requires a box to build off of.
@ -66,11 +68,21 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
node.vm.box = "ubuntu/trusty64" node.vm.box = "ubuntu/trusty64"
node.vm.network "private_network", type: "dhcp" node.vm.network "private_network", type: "dhcp"
#node.vm.network "private_network", ip: "192.168.33.10" #node.vm.network "private_network", ip: "192.168.33.10"
node.ssh.forward_agent = true node.ssh.forward_agent = true
node.vm.provision 'ansible' do |ansible| node.vm.provision 'ansible' do |ansible|
ansible.playbook = 'just.yml' ansible.playbook = 'just.yml'
# ansible_ssh_port=22 ansible_ssh_host=jenkins.unglueit.com ansible_ssh_user=ubuntu
# ansible_ssh_host=jenkins.unglueit.com ansible_user=ubuntu ansible_ssh_port=22
ansible.host_vars = {
"jenkins" => {"ansible_ssh_port" => 22,
"ansible_ssh_host" => "jenkins.unglueit.com",
"ansible_ssh_user" => "ubuntu"}
}
end end
node.vm.provider "virtualbox" do |v| node.vm.provider "virtualbox" do |v|

View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
ansible-playbook -vvvv -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory \ ansible-playbook -vvvv \
-i .vagrant/provisioners/ansible/inventory/ \
--private-key=/Users/raymondyee/.ssh/id_rsa \ --private-key=/Users/raymondyee/.ssh/id_rsa \
-e aws_access_key=$AWS_ACCESS_KEY \ -e aws_access_key=$AWS_ACCESS_KEY \
-e aws_secret_key=$AWS_SECRET_ACCESS_KEY \ -e aws_secret_key=$AWS_SECRET_ACCESS_KEY \