4 - name: Create cache repository
6 path: .cache/openwrt/tuer
9 - name: Create GOPATH directory
11 path: .cache/openwrt/tuer/gopath
14 - name: Clone necessary git repositories
16 repo: https://github.com/realraum/{{ item }}.git
17 dest: .cache/openwrt/tuer/{{ item }}
19 with_items: [ door_and_sensors ]
21 # - name: Build update-keys
23 - name: Download dependencies
24 command: go get -d ./...
26 chdir: .cache/openwrt/tuer/door_and_sensors/{{ item }}
28 GOPATH: "{{ playbook_dir }}/.cache/openwrt/tuer/gopath"
29 with_items: [ door_client, door_daemon ]
31 - name: Cross-compile Go binaries
32 command: go build -ldflags "-s"
34 chdir: .cache/openwrt/tuer/door_and_sensors/{{ item }}
40 with_items: [ door_client, door_daemon ]
46 delegate_to: localhost
50 openwrt_packages_remove:
65 openwrt_packages_extra: