Roles: use environment instead of passing variable in shell command

This commit is contained in:
Julian Labus 2019-03-14 15:35:47 +01:00
parent ac15a69ac5
commit d87a6f877c
No known key found for this signature in database
GPG key ID: 8AF209F2C6B3572A
4 changed files with 15 additions and 5 deletions

View file

@ -22,4 +22,6 @@
mode: 0644 mode: 0644
- name: build dep util - name: build dep util
shell: "GOPATH={{ gopath }} go get -v -u github.com/golang/dep/cmd/dep" shell: "go get -v -u github.com/golang/dep/cmd/dep"
environment:
GOPATH: "{{ gopath }}"

View file

@ -12,7 +12,9 @@
notify: reload systemd notify: reload systemd
- name: build cpthook binary - name: build cpthook binary
shell: 'GOPATH={{ gopath }} go get -u {{ cpthook_src }}' shell: 'go get -u {{ cpthook_src }}'
environment:
GOPATH: "{{ gopath }}"
notify: restart cpthook notify: restart cpthook
- name: configure cpthook systemd unit - name: configure cpthook systemd unit

View file

@ -98,7 +98,9 @@
loop: "{{ meshes | subelements('fastd.nodes.instances') }}" loop: "{{ meshes | subelements('fastd.nodes.instances') }}"
- name: build fastd-exporter binary - name: build fastd-exporter binary
shell: "GOPATH={{ gopath }} go get -v -u github.com/freifunk-darmstadt/fastd-exporter" shell: "go get -v -u github.com/freifunk-darmstadt/fastd-exporter"
environment:
GOPATH: "{{ gopath }}"
notify: restart fastd-exporter notify: restart fastd-exporter
- name: copy vhost fastd_exporter.conf - name: copy vhost fastd_exporter.conf

View file

@ -45,10 +45,14 @@
force: true force: true
- name: get required library versions - name: get required library versions
shell: "cd {{ gopath }}/src/{{ yanic_src }} && GOPATH={{ gopath }} {{ gopath }}/bin/dep ensure" shell: "cd {{ gopath }}/src/{{ yanic_src }} && {{ gopath }}/bin/dep ensure"
environment:
GOPATH: "{{ gopath }}"
- name: build Yanic binary - name: build Yanic binary
shell: 'GOPATH={{ gopath }} go install {{ gopath }}/src/{{ yanic_src }}' shell: 'go install {{ gopath }}/src/{{ yanic_src }}'
environment:
GOPATH: "{{ gopath }}"
notify: restart yanic notify: restart yanic
- name: configure Yanic systemd unit - name: configure Yanic systemd unit