Skip to content

Commit

Permalink
Capgemini#331 - Changing variables in ansible roles from {{variable}}…
Browse files Browse the repository at this point in the history
… to {{ variable }}
  • Loading branch information
ravbaba committed Jun 24, 2015
1 parent bef9b89 commit 201946c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions roles/haproxy/files/haproxy.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ frontend www
bind *:80

# Generated automatically by consul-template
{{ range services }}
acl host_{{ .Name }} hdr(host) -i {{ .Name }}.{{ env "HAPROXY_DOMAIN" }}
use_backend {{ .Name }}_backend if host_{{ .Name }}
{{ end }}
{{range services}}
acl host_{{.Name}} hdr(host) -i {{.Name}}.{{env "HAPROXY_DOMAIN"}}
use_backend {{.Name}}_backend if host_{{.Name}}
{{end}}

{{ range services }}
backend {{ .Name }}_backend
{{ range service .Name }}
server {{ .Node }} {{ .Address }}:{{ .Port }}{{ end }}
{{ end }}
{{range services}}
backend {{.Name}}_backend
{{range service .Name}}
server {{.Node}} {{.Address}}:{{.Port}}{{end}}
{{end}}
6 changes: 3 additions & 3 deletions roles/mesos/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

- name: Set Mesos Master Cluster name
copy:
content: "{{mesos_cluster_name}}"
content: "{{ mesos_cluster_name }}"
dest: /etc/mesos-master/cluster
mode: 0644
sudo: yes
Expand Down Expand Up @@ -133,7 +133,7 @@

- name: Create Mesos Slave work area
file:
dest: "{{mesos_slave_work_dir}}"
dest: "{{ mesos_slave_work_dir }}"
mode: 0755
state: directory
sudo: yes
Expand All @@ -143,7 +143,7 @@

- name: Set Mesos Slave work area
copy:
content: "{{mesos_slave_work_dir}}"
content: "{{ mesos_slave_work_dir }}"
dest: /etc/mesos-slave/work_dir
mode: 0644
sudo: yes
Expand Down
2 changes: 1 addition & 1 deletion roles/zookeeper/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

- name: Create zookeeper myid file
copy:
content: "{{zookeeper_id}}"
content: "{{ zookeeper_id }}"
dest: /etc/zookeeper/conf/myid
mode: 0644
sudo: yes
Expand Down
2 changes: 1 addition & 1 deletion roles/zookeeper/templates/zoo.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ syncLimit=2
{% endfor %}
{% else %}
{% for host in groups[zookeeper_server_group] %}
server.{{loop.index}}={{ hostvars[host]['ansible_ssh_host'] }}:{{ zookeeper_leader_connect_port }}:{{ zookeeper_leader_election_port }}
server.{{ loop.index }}={{ hostvars[host]['ansible_ssh_host'] }}:{{ zookeeper_leader_connect_port }}:{{ zookeeper_leader_election_port }}
{% endfor %}
{% endif %}

0 comments on commit 201946c

Please sign in to comment.