aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-05-20 16:10:39 +0200
committerKristian Lyngstol <kristian@bohemians.org>2016-05-20 16:10:39 +0200
commit212753aa48e60ccc9cbd74a16f313cebc6d3cda6 (patch)
treeb9b0a04232ce33f11c4ff17546460ca6a78e6f78
parentd9cca77d0a13273ae595011d572c2f00de258d6d (diff)
Ansible: Add group_vars and expose port 80 by default
A thousand ways to override front_ports and varnish_ports now, so this concept should work well. Might just move the variables into the inventory file itself, we'll see.
-rw-r--r--ansible/group_vars/front-test.yml3
-rw-r--r--ansible/inventory-localhost1
-rw-r--r--ansible/playbook-test.yml4
3 files changed, 6 insertions, 2 deletions
diff --git a/ansible/group_vars/front-test.yml b/ansible/group_vars/front-test.yml
new file mode 100644
index 0000000..33d5011
--- /dev/null
+++ b/ansible/group_vars/front-test.yml
@@ -0,0 +1,3 @@
+---
+front_ports: [ "80:80" ]
+varnish_ports: []
diff --git a/ansible/inventory-localhost b/ansible/inventory-localhost
index 2302eda..7cc7a20 100644
--- a/ansible/inventory-localhost
+++ b/ansible/inventory-localhost
@@ -1 +1,2 @@
+[front-test]
localhost ansible_connection=local
diff --git a/ansible/playbook-test.yml b/ansible/playbook-test.yml
index c2a8aa5..f110435 100644
--- a/ansible/playbook-test.yml
+++ b/ansible/playbook-test.yml
@@ -11,10 +11,10 @@
ports: []
- name: "gondul-front-test"
links: [ "gondul-db-test:db" ]
- ports: []
+ ports: "{{ front_ports }}"
- name: "gondul-varnish-test"
links: [ "gondul-front-test:gondul-front" ]
- ports: []
+ ports: "{{ varnish_ports }}"
- name: "gondul-collector-test"
links: [ "gondul-db-test:db" ]
ports: []