remove j2 file extensions
This commit is contained in:
@ -15,6 +15,47 @@ iso_packages:
|
||||
- binutils
|
||||
- isolinux
|
||||
|
||||
# list of packages to be installed with base image
|
||||
install_packages:
|
||||
- openssh-server
|
||||
- resolvconf
|
||||
- sudo
|
||||
- htop
|
||||
- net-tools
|
||||
- curl
|
||||
- pigz
|
||||
- jq
|
||||
- nmap
|
||||
- lm-sensors
|
||||
- speedtest-cli
|
||||
- ethtool
|
||||
- tidy
|
||||
- lynx
|
||||
- iotop
|
||||
- iftop
|
||||
- gnupg
|
||||
- pwgen
|
||||
- unzip
|
||||
- iw
|
||||
- lshw
|
||||
- firmware-iwlwifi
|
||||
- dnsutils
|
||||
- git
|
||||
- brightnessctl
|
||||
- v4l-utils
|
||||
- ffmpeg
|
||||
- libpam-kwallet5
|
||||
- thermald
|
||||
- acpi
|
||||
- lshw
|
||||
- iw
|
||||
- bind9-dnsutils
|
||||
- openssh-server
|
||||
- curl
|
||||
- openvpn
|
||||
- net-tools
|
||||
- htop
|
||||
|
||||
deb13_src: "/opt/cosmos/deb13-source"
|
||||
|
||||
deb13_iso: "/opt/cosmos/deb13-iso"
|
||||
@ -32,4 +73,5 @@ configure_routing: true
|
||||
cpu_architecture: "amd64"
|
||||
# this is true because it will always be set in jenkins
|
||||
refresh_only: true
|
||||
armcpu_check: false
|
||||
...
|
||||
@ -1,10 +1,12 @@
|
||||
[Unit]
|
||||
Description=Update /etc/issue with ethN IP addresses
|
||||
Description=Update login screen with IP addresses
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/root/update_issue.sh
|
||||
Type=oneshot
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@ -1,17 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Retrieve IP addresses of interfaces
|
||||
ip_addresses=$(ip -o -4 addr show | awk '(/eth|en|wl|wn|vmpbr0|tun/) {print $2 "," $4 "\r"}' | column -s , -t)
|
||||
# Get OS Build Info
|
||||
os_build=$(cat /etc/os-release | grep PRETTY | cut -d "\"" -f 2)
|
||||
# Put hostname in a variable that probably isn't reserved or anything
|
||||
host_name=$(hostname)
|
||||
|
||||
# Write to /etc/issue
|
||||
{
|
||||
echo $os_build
|
||||
echo "Hostname: ${host_name}"
|
||||
echo "IP Addresses:"
|
||||
echo "$ip_addresses"
|
||||
|
||||
} > /etc/issue
|
||||
i=1
|
||||
while [ $i ]
|
||||
do
|
||||
|
||||
# Retrieve IP addresses of interfaces
|
||||
ip_addresses=$(ip -o -4 addr show | awk '(/eth|en|wl|wn|vmpbr0|tun/) {print $2 "," $4 "\r"}' | column -s , -t)
|
||||
# Get OS Build Info
|
||||
os_build=$(cat /etc/os-release | grep PRETTY | cut -d "\"" -f 2)
|
||||
# Put hostname in a variable that probably isn't reserved or anything
|
||||
host_name=$(hostname)
|
||||
|
||||
# Write to /etc/issue
|
||||
{
|
||||
echo $os_build
|
||||
echo "Hostname: ${host_name}"
|
||||
echo "IP Addresses:"
|
||||
echo "$ip_addresses"
|
||||
|
||||
} > /etc/issue
|
||||
|
||||
|
||||
sleep 1
|
||||
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
|
||||
- name: Build ISO - Modify Source - Copy Preseed
|
||||
template:
|
||||
src: preseed-usb.cfg.j2
|
||||
src: preseed-usb.cfg
|
||||
dest: "{{ deb13_src }}/preseed.cfg"
|
||||
mode: 0644
|
||||
|
||||
|
||||
@ -25,14 +25,14 @@
|
||||
# Copy DHCP config file 1
|
||||
- name: DHCP - Copy dhcpd.conf
|
||||
template:
|
||||
src: dhcpd.conf.j2
|
||||
src: dhcpd.conf
|
||||
dest: /etc/dhcp/dhcpd.conf
|
||||
mode: 0644
|
||||
|
||||
# Copy DHCP config file 2
|
||||
- name: DHCP - Copy isc-dhcp-server
|
||||
template:
|
||||
src: isc-dhcp-server.j2
|
||||
src: isc-dhcp-server
|
||||
dest: /etc/default/isc-dhcp-server
|
||||
mode: 0644
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
# Download vendor list for dhcp-lease-list
|
||||
- name: DHCP - Download vendor list for dhcp-lease-list
|
||||
get_url:
|
||||
url: "http://standards-oui.ieee.org/oui.txt"
|
||||
url: "https://standards-oui.ieee.org/oui.txt"
|
||||
dest: /usr/local/etc/oui.txt
|
||||
mode: '0644'
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
# Copy TFTP Config File
|
||||
- name: TFTP - Copy tftpd-hpa
|
||||
template:
|
||||
src: tftpd-hpa.j2
|
||||
src: tftpd-hpa
|
||||
dest: /etc/default/tftpd-hpa
|
||||
mode: 0644
|
||||
|
||||
@ -122,14 +122,14 @@
|
||||
- name: Files - Copy grub.cfg to tftp
|
||||
when: not deploy_iso | bool
|
||||
template:
|
||||
src: grub.cfg.j2
|
||||
src: grub.cfg
|
||||
dest: /srv/tftp/debian-installer/amd64/grub/grub.cfg
|
||||
mode: 0644
|
||||
|
||||
- name: Files - Copy grub-iso.cfg to tftp
|
||||
when: deploy_iso | bool
|
||||
template:
|
||||
src: grub-iso.cfg.j2
|
||||
src: grub-iso.cfg
|
||||
dest: /srv/tftp/debian-installer/amd64/grub/grub.cfg
|
||||
mode: 0644
|
||||
|
||||
@ -137,7 +137,7 @@
|
||||
# It's served from HTTP now because bollocks to weird TFTP foolishness
|
||||
- name: Files - Copy server preseed to http
|
||||
template:
|
||||
src: preseed-server-v2.cfg.j2
|
||||
src: preseed-server-v2.cfg
|
||||
dest: /var/www/html/preseed-server.cfg
|
||||
mode: 0644
|
||||
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
# Update sysctl.conf file to enable IP forwarding
|
||||
- name: sysctl - enable IP forwarding
|
||||
lineinfile:
|
||||
path: /etc/sysctl.conf
|
||||
create: true
|
||||
path: /etc/sysctl.d/ip_forwarding.conf
|
||||
regexp: '^net.ipv4.ip_forward='
|
||||
line: 'net.ipv4.ip_forward=1'
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# This role builds a pxe server and / or an ISO for the amd64 matt-cloud base image
|
||||
|
||||
- name: PXE Server - Architecture Warning
|
||||
when: '"arm" in cpu_architecture'
|
||||
when: armcpu_check | bool
|
||||
debug:
|
||||
msg: "Warning - ARM CPU Detected, will not proceed"
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
- name: PXE Server - Build Deb12-MC.iso
|
||||
include_tasks: build_iso.yaml
|
||||
when: '"amd" in cpu_architecture'
|
||||
when: not armcpu_check | bool
|
||||
|
||||
...
|
||||
|
||||
|
||||
@ -61,7 +61,9 @@ popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
# Package selection
|
||||
tasksel tasksel/first multiselect standard, ssh-server
|
||||
d-i pkgsel/include string openssh-server curl openvpn net-tools htop jq pigz sudo
|
||||
# Templated package install
|
||||
d-i pkgsel/include string {% for item in install_packages %}
|
||||
{{ item }} {% if not loop.last %} {% endif %}{% endfor %}
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
d-i preseed/late_command string \
|
||||
@ -69,7 +71,6 @@ d-i preseed/late_command string \
|
||||
mkdir -p /target/root/.config/htop; \
|
||||
mkdir -p /target/etc/openvpn/client; \
|
||||
mkdir -p /target/opt/cosmos/init; \
|
||||
in-target echo " * * * * * root /root/update_issue.sh" >> /etc/crontab; \
|
||||
in-target curl -o /opt/cosmos/cosmos-init.tar -L http://{{ server_ip }}/cosmos-init.tar; \
|
||||
in-target tar -xf /opt/cosmos/cosmos-init.tar -C /opt/cosmos; \
|
||||
cp /target/opt/cosmos/init/jenkins_key.pub /target/root/.ssh/authorized_keys; \
|
||||
@ -71,7 +71,9 @@ popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
# Package selection
|
||||
tasksel tasksel/first multiselect standard, ssh-server
|
||||
d-i pkgsel/include string openssh-server curl openvpn net-tools resolvconf htop jq pigz sudo
|
||||
# Templated package install
|
||||
d-i pkgsel/include string {% for item in install_packages %}
|
||||
{{ item }} {% if not loop.last %} {% endif %}{% endfor %}
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
d-i preseed/late_command string \
|
||||
Reference in New Issue
Block a user