working on using a-play-aws.sh to use an inventory directory that comprise both vagrant computed inventory and static jenkins file
parent
93ae8bca12
commit
e2edac78b4
|
@ -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|
|
||||||
|
|
|
@ -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 \
|
||||||
|
|
Loading…
Reference in New Issue