trixie/installbox.yml

37 lines
1.2 KiB
YAML
Raw Normal View History

2018-05-31 18:20:51 +03:00
---
# This playbook deploys the installbox on a minimal installation.
- name: apply configuration to the installbox
2018-06-04 18:00:25 +03:00
hosts: all
2018-05-31 18:20:51 +03:00
remote_user: ansible
become: yes
vars:
2018-06-04 18:00:25 +03:00
if_lan: "" # ← interface name here, like: ens3 or enp2s0"
2018-05-31 18:20:51 +03:00
if_wan: "{{ ansible_default_ipv4.interface }}"
2018-06-04 18:00:25 +03:00
hostname: "{{ ansible_hostname }}"
2018-05-31 18:20:51 +03:00
ipaddr_lan: 192.168.0.10
dhcp_range: 192.168.0.50,192.168.0.150,2h
dhcp_list: "{{ lookup('sequence', 'start=50 end=150 format=192.168.0.%d', wantlist=True) }}"
2018-05-31 18:20:51 +03:00
tftp_root: "/var/lib/tftpboot"
2019-05-27 18:04:01 +03:00
deb_mirror: "cdn-fastly.deb.debian.org" # SRV records ("deb.debian.org") do not work with squid
2019-05-24 17:26:15 +03:00
di_dist: "buster"
2019-05-24 22:17:33 +03:00
di_version: "10"
di_pkg: "debian-installer-{{ di_version }}-netboot-amd64"
2019-05-24 17:26:15 +03:00
ansible_user: ansible
repo_dir: "/home/{{ ansible_user }}/kiosk"
2018-06-04 18:00:25 +03:00
pre_tasks:
- name: validate if interface is available
fail:
msg: "Interface {{ if_lan }} does not exist or is already used."
when: if_lan not in ansible_interfaces or if_lan == if_wan
2018-05-31 18:20:51 +03:00
roles:
- up2date-debian
- two-interface-shorewall
- dhcp-dns-dnsmasq
- transparent-squid
- tftp-netboot-installer
- preseed-installer
2018-06-07 17:51:18 +03:00
# - installbox2kiosk # enable this to install kiosk automatically