5 - name: Create go directories
7 path: .cache/openwrt/tuer/{{ item }}
9 with_items: [ gopath, gocache ]
11 - name: Clone necessary git repositories
13 repo: https://github.com/realraum/{{ item }}.git
14 dest: .cache/openwrt/tuer/{{ item }}
16 with_items: [ door_and_sensors ]
18 - name: Download dependencies
19 command: go get -d ./...
21 chdir: .cache/openwrt/tuer/door_and_sensors/{{ item }}
23 GOCACHE: "{{ playbook_dir }}/.cache/openwrt/tuer/gocache"
24 GOPATH: "{{ playbook_dir }}/.cache/openwrt/tuer/gopath"
25 with_items: [ door_client, door_daemon, update-keys ]
27 - name: Cross-compile Go binaries
28 command: go build -ldflags "-s"
30 chdir: .cache/openwrt/tuer/door_and_sensors/{{ item }}
32 GOCACHE: "{{ playbook_dir }}/.cache/openwrt/tuer/gocache"
33 GOPATH: "{{ playbook_dir }}/.cache/openwrt/tuer/gopath"
38 with_items: [ door_client, door_daemon, update-keys ]
42 delegate_to: localhost
46 openwrt_packages_remove:
61 openwrt_packages_extra:
67 /usr/local/bin/door_client: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/door_client/door_client"
68 /usr/local/bin/door_daemon: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/door_daemon/door_daemon"
69 /usr/local/bin/update-keys: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/update-keys/update-keys"
72 /etc/config/network: |
73 config interface 'loopback'
76 option ipaddr '127.0.0.1'
77 option netmask '255.0.0.0'
79 config globals 'globals'
80 option ula_prefix 'fdc9:e01f:83db::/48'
82 config interface 'lan'
86 option ipaddr '192.168.33.7'
87 option netmask '255.255.255.0'
88 option gateway '192.168.33.1'
89 option dns '192.168.33.1'
90 option dns_search 'realraum.at'
92 /etc/config/dropbear: |
94 option PasswordAuth 'on'
95 option RootPasswordAuth 'off'
98 /etc/dropbear/authorized_keys: |-
99 {% for key in noc_ssh_keys %}