Revert "add ruru and ddd to tuergit access"
[noc.git] / ansible / host_vars / torwaechter / main.yml
1 ---
2 ssh_users_tuergit: "{{ user_groups.noc | union(['fgenesis']) }}"
3
4 openwrt_variant: openwrt
5 openwrt_release: 18.06.4
6 openwrt_arch: x86
7 openwrt_target: geode
8 openwrt_output_image_suffixes:
9   - combined-ext4.img.gz
10   - combined-squashfs.img.gz
11
12 openwrt_packages_extra:
13   - "-dropbear"
14   - hwclock
15   - flashrom
16   - git
17   - kmod-usb-acm
18   - openssh-server
19   - openssh-sftp-server
20   - screen
21   - sudo
22   - usbutils
23   - rsync
24   - lsblk
25
26 openwrt_mixin:
27   /home:
28     directory:
29   /run:
30     link: "/var/run"
31
32   # Go binaries
33   /usr/local/bin/door_client:
34     mode: '0755'
35     file: "{{ global_cache_dir }}/{{ inventory_hostname }}/door_and_sensors/door_client/door_client"
36   /usr/local/bin/door_daemon:
37     mode: '0755'
38     file: "{{ global_cache_dir }}/{{ inventory_hostname }}/door_and_sensors/door_daemon/door_daemon"
39   /usr/local/bin/update-keys:
40     mode: '0755'
41     file: "{{ global_cache_dir }}/{{ inventory_hostname }}/door_and_sensors/update-keys/update-keys"
42
43   # door daemon init scripts and configs
44   /etc/init.d/doord:
45     mode: '0755'
46     file: "{{ global_cache_dir }}/{{ inventory_hostname }}/door_and_sensors/initscripts/doord.openwrt"
47   /etc/default/door:
48     mode: '0755'
49     file: "{{ global_cache_dir }}/{{ inventory_hostname }}/door_and_sensors/initscripts/door.default"
50   /etc/default/tuer:
51     link: "./door"
52   /etc/rc.d/S50doord:
53     link: "../init.d/doord"
54
55   # hotplug files
56   /etc/hotplug.d/tty/door.tty:
57     mode: '0755'
58     file: "{{ global_cache_dir }}/{{ inventory_hostname }}/door_and_sensors/scripts/door.tty"
59   /etc/hotplug.d/usb/door.usb:
60     mode: '0755'
61     file: "{{ global_cache_dir }}/{{ inventory_hostname }}/door_and_sensors/scripts/door.usb"
62
63   /usr/local/bin/authorized_keys.sh:
64     mode: '0755'
65     file: "{{ global_files_dir }}/{{ inventory_hostname }}/authorized_keys.sh"
66
67   /usr/local/bin/update-keys-from-stdin.sh:
68     mode: '0755'
69     file: "{{ global_files_dir }}/{{ inventory_hostname }}/update-keys-from-stdin.sh"
70
71   /etc/ssh/sshd_config:
72     content: |
73       Port 22000
74
75       AllowUsers root tuerctl tuergit
76       AuthenticationMethods publickey
77       AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u
78
79       AllowAgentForwarding no
80       AllowTcpForwarding no
81       X11Forwarding no
82       UsePrivilegeSeparation sandbox
83
84       Subsystem sftp /usr/libexec/sftp-server
85
86       Match User tuerctl
87         AuthorizedKeysFile /dev/null
88         AuthorizedKeysCommand /usr/local/bin/authorized_keys.sh
89         AuthorizedKeysCommandUser tuergit
90
91   /etc/ssh/authorized_keys.d/root:
92     content: "{{ ssh_users_root | user_ssh_keys(users) | join('\n') }}\n"
93
94   /etc/ssh/authorized_keys.d/tuergit:
95     content: "{{ ssh_users_tuergit | user_ssh_keys(users) | join('\n') }}\n"
96
97 openwrt_uci:
98   system:
99     - name: system
100       options:
101         hostname: '{{ inventory_hostname }}'
102         timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
103         ttylogin: '0'
104         log_size: '64'
105         urandom_seed: '0'
106
107     - name: timeserver 'ntp'
108       options:
109         enabled: '1'
110         enable_server: '0'
111         server:
112           - '0.lede.pool.ntp.org'
113           - '1.lede.pool.ntp.org'
114           - '2.lede.pool.ntp.org'
115           - '3.lede.pool.ntp.org'
116
117   network:
118     - name: globals 'globals'
119       options:
120         ula_prefix: fdc9:e01f:83db::/48
121
122     - name: interface 'loopback'
123       options:
124         ifname: lo
125         proto: static
126         ipaddr: 127.0.0.1
127         netmask: 255.0.0.0
128
129     - name: interface 'mgmt'
130       options:
131         ifname: eth0
132         accept_ra: 0
133         proto: static
134         ipaddr: "{{ net.mgmt.prefix | ipaddr(100) | ipaddr('address') }}"
135         netmask: "{{ net.mgmt.prefix | ipaddr('netmask') }}"
136         gateway: "{{ net.mgmt.gw }}"
137         dns: "{{ net.mgmt.dns | join(' ') }}"
138         dns_search: realraum.at
139
140
141 # does not work, using symlink to /var/run instead for now
142 openwrt_mounts:
143   - path: /run
144     src: none
145     fstype: tmpfs
146     opts: nosuid,nodev,noexec,noatime
147
148 openwrt_users:
149   tuerd: {}
150   tuergit:
151     home:  /home/tuergit
152     shell: /usr/bin/git-shell
153   tuerctl:
154     shell: /bin/false # TODO fixme