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_output_image_suffixes:
47 - combined-ext4.img.gz
48 - combined-squashfs.img
49 openwrt_packages_remove:
64 openwrt_packages_extra:
75 /usr/local/bin/door_client:
77 file: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/door_client/door_client"
78 /usr/local/bin/door_daemon:
80 file: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/door_daemon/door_daemon"
81 /usr/local/bin/update-keys:
83 file: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/update-keys/update-keys"
85 /usr/local/bin/authorized_keys.sh:
87 file: "{{ playbook_dir }}/files/tuer/authorized_keys.sh"
89 /usr/local/bin/update-keys-from-stdin.sh:
91 file: "{{ playbook_dir }}/files/tuer/update-keys-from-stdin.sh"
97 AllowUsers root tuerctl tuergit
98 AuthenticationMethods publickey
99 AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u
101 AllowAgentForwarding no
102 AllowTcpForwarding no
104 UsePrivilegeSeparation sandbox
107 AuthorizedKeysFile /dev/null
108 AuthorizedKeysCommand /usr/local/bin/authorized_keys.sh
109 AuthorizedKeysCommandUser tuergit
112 /etc/ssh/authorized_keys.d/root:
114 {% for key in noc_ssh_keys %}
118 /etc/ssh/authorized_keys.d/tuergit:
120 {% for key in noc_ssh_keys %}
128 hostname: '{{ inventory_hostname }}'
129 timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
134 - name: timeserver 'ntp'
139 - '0.lede.pool.ntp.org'
140 - '1.lede.pool.ntp.org'
141 - '2.lede.pool.ntp.org'
142 - '3.lede.pool.ntp.org'
145 - name: globals 'globals'
147 ula_prefix: fdc9:e01f:83db::/48
149 - name: interface 'loopback'
156 - name: interface 'lan'
162 netmask: 255.255.255.0
163 gateway: 192.168.33.1
165 dns_search: realraum.at
172 opts: nosuid,nodev,noexec,noatime
178 shell: /usr/bin/git-shell
180 shell: /bin/false # TODO fixme