From 212753aa48e60ccc9cbd74a16f313cebc6d3cda6 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Fri, 20 May 2016 16:10:39 +0200 Subject: 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. --- ansible/group_vars/front-test.yml | 3 +++ ansible/inventory-localhost | 1 + ansible/playbook-test.yml | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 ansible/group_vars/front-test.yml (limited to 'ansible') 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: [] -- cgit v1.2.3