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: Download dependencies
18 command: go get -d ./...
20 chdir: .cache/openwrt/tuer/door_and_sensors/{{ item }}
22 GOCACHE: "{{ playbook_dir }}/.cache/openwrt/tuer/gocache"
23 GOPATH: "{{ playbook_dir }}/.cache/openwrt/tuer/gopath"
24 with_items: [ door_client, door_daemon, update-keys ]
26 - name: Cross-compile Go binaries
27 command: go build -ldflags "-s"
29 chdir: .cache/openwrt/tuer/door_and_sensors/{{ item }}
31 GOCACHE: "{{ playbook_dir }}/.cache/openwrt/tuer/gocache"
32 GOPATH: "{{ playbook_dir }}/.cache/openwrt/tuer/gopath"
37 with_items: [ door_client, door_daemon, update-keys ]
41 delegate_to: localhost
45 openwrt_packages_remove:
60 openwrt_packages_extra:
66 /usr/local/bin/door_client: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/door_client/door_client"
67 /usr/local/bin/door_daemon: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/door_daemon/door_daemon"
68 /usr/local/bin/update-keys: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/update-keys/update-keys"
71 /etc/config/network: |
72 config interface 'loopback'
75 option ipaddr '127.0.0.1'
76 option netmask '255.0.0.0'
78 config globals 'globals'
79 option ula_prefix 'fdc9:e01f:83db::/48'
81 config interface 'lan'
85 option ipaddr '192.168.33.7'
86 option netmask '255.255.255.0'
87 option gateway '192.168.33.1'
88 option dns '192.168.33.1'
89 option dns_search 'realraum.at'
91 /etc/config/dropbear: |
93 option PasswordAuth 'on'
94 option RootPasswordAuth 'off'
97 /etc/dropbear/authorized_keys: |-
98 {% for key in noc_ssh_keys %}