diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2016-05-20 16:10:39 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2016-05-20 16:10:39 +0200 |
commit | 212753aa48e60ccc9cbd74a16f313cebc6d3cda6 (patch) | |
tree | b9b0a04232ce33f11c4ff17546460ca6a78e6f78 | |
parent | d9cca77d0a13273ae595011d572c2f00de258d6d (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.yml | 3 | ||||
-rw-r--r-- | ansible/inventory-localhost | 1 | ||||
-rw-r--r-- | ansible/playbook-test.yml | 4 |
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: [] |