Skip to content

Commit

Permalink
Removed the need to use vars_files with relative paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandruanghel committed Nov 12, 2018
1 parent f259d61 commit 5c338a0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
6 changes: 5 additions & 1 deletion build_cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ aws|azure|gce|openstack)
;;
esac

ansible-playbook --connection=local "playbooks/clouds/build_${cloud_to_use}.yml" "$@"
ansible-playbook "playbooks/clouds/build_${cloud_to_use}.yml" \
--connection=local \
--extra-vars="@playbooks/group_vars/all" \
--extra-vars="@inventory/${cloud_to_use}/group_vars/all" \
"$@"
3 changes: 0 additions & 3 deletions playbooks/clouds/build_aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
hosts: localhost
connection: local
gather_facts: False
vars_files:
- ../group_vars/all
- ../../inventory/aws/group_vars/all
tasks:
- name: Create the VPC
ec2_vpc_net:
Expand Down
3 changes: 0 additions & 3 deletions playbooks/clouds/build_azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
hosts: localhost
connection: local
gather_facts: False
vars_files:
- ../group_vars/all
- ../../inventory/azure/group_vars/all
tasks:
- name: Build {{ cloud_config.resource_group }} Resource Group
azure_rm_resourcegroup:
Expand Down
3 changes: 0 additions & 3 deletions playbooks/clouds/build_gce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
hosts: localhost
connection: local
gather_facts: False
vars_files:
- ../group_vars/all
- ../../inventory/gce/group_vars/all
tasks:
- name: Create the {{ cloud_config.vpc_name }} VPC network
gce_net:
Expand Down
3 changes: 0 additions & 3 deletions playbooks/clouds/build_openstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
hosts: localhost
connection: local
gather_facts: False
vars_files:
- ../group_vars/all
- ../../inventory/openstack/group_vars/all
tasks:
- name: Build Openstack Nodes
include_tasks: build_openstack_nodes.yml
Expand Down

0 comments on commit 5c338a0

Please sign in to comment.