4 - name: Create go directories
6 path: .cache/openwrt/tuer/{{ item }}
8 with_items: [ gopath, gocache ]
10 - name: Clone necessary git repositories
12 repo: https://github.com/realraum/{{ item }}.git
13 dest: .cache/openwrt/tuer/{{ item }}
15 with_items: [ door_and_sensors ]
17 # - name: Build update-keys
19 - name: Download dependencies
20 command: go get -d ./...
22 chdir: .cache/openwrt/tuer/door_and_sensors/{{ item }}
24 GOCACHE: "{{ playbook_dir }}/.cache/openwrt/tuer/gocache"
25 GOPATH: "{{ playbook_dir }}/.cache/openwrt/tuer/gopath"
26 with_items: [ door_client, door_daemon ]
28 - name: Cross-compile Go binaries
29 command: go build -ldflags "-s"
31 chdir: .cache/openwrt/tuer/door_and_sensors/{{ item }}
33 GOCACHE: "{{ playbook_dir }}/.cache/openwrt/tuer/gocache"
34 GOPATH: "{{ playbook_dir }}/.cache/openwrt/tuer/gopath"
39 with_items: [ door_client, door_daemon ]
45 delegate_to: localhost
49 openwrt_packages_remove:
64 openwrt_packages_extra: