remove j2 file extensions
This commit is contained in:
@ -15,6 +15,47 @@ iso_packages:
|
|||||||
- binutils
|
- binutils
|
||||||
- isolinux
|
- 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_src: "/opt/cosmos/deb13-source"
|
||||||
|
|
||||||
deb13_iso: "/opt/cosmos/deb13-iso"
|
deb13_iso: "/opt/cosmos/deb13-iso"
|
||||||
@ -32,4 +73,5 @@ configure_routing: true
|
|||||||
cpu_architecture: "amd64"
|
cpu_architecture: "amd64"
|
||||||
# this is true because it will always be set in jenkins
|
# this is true because it will always be set in jenkins
|
||||||
refresh_only: true
|
refresh_only: true
|
||||||
|
armcpu_check: false
|
||||||
...
|
...
|
||||||
@ -1,10 +1,12 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Update /etc/issue with ethN IP addresses
|
Description=Update login screen with IP addresses
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/root/update_issue.sh
|
ExecStart=/root/update_issue.sh
|
||||||
Type=oneshot
|
Type=simple
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
i=1
|
||||||
|
while [ $i ]
|
||||||
|
do
|
||||||
|
|
||||||
# Retrieve IP addresses of interfaces
|
# 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)
|
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
|
# Get OS Build Info
|
||||||
@ -15,3 +21,11 @@ host_name=$(hostname)
|
|||||||
echo "$ip_addresses"
|
echo "$ip_addresses"
|
||||||
|
|
||||||
} > /etc/issue
|
} > /etc/issue
|
||||||
|
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
- name: Build ISO - Modify Source - Copy Preseed
|
- name: Build ISO - Modify Source - Copy Preseed
|
||||||
template:
|
template:
|
||||||
src: preseed-usb.cfg.j2
|
src: preseed-usb.cfg
|
||||||
dest: "{{ deb13_src }}/preseed.cfg"
|
dest: "{{ deb13_src }}/preseed.cfg"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
|
|||||||
@ -25,14 +25,14 @@
|
|||||||
# Copy DHCP config file 1
|
# Copy DHCP config file 1
|
||||||
- name: DHCP - Copy dhcpd.conf
|
- name: DHCP - Copy dhcpd.conf
|
||||||
template:
|
template:
|
||||||
src: dhcpd.conf.j2
|
src: dhcpd.conf
|
||||||
dest: /etc/dhcp/dhcpd.conf
|
dest: /etc/dhcp/dhcpd.conf
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
# Copy DHCP config file 2
|
# Copy DHCP config file 2
|
||||||
- name: DHCP - Copy isc-dhcp-server
|
- name: DHCP - Copy isc-dhcp-server
|
||||||
template:
|
template:
|
||||||
src: isc-dhcp-server.j2
|
src: isc-dhcp-server
|
||||||
dest: /etc/default/isc-dhcp-server
|
dest: /etc/default/isc-dhcp-server
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
@ -46,7 +46,7 @@
|
|||||||
# Download vendor list for dhcp-lease-list
|
# Download vendor list for dhcp-lease-list
|
||||||
- name: DHCP - Download vendor list for dhcp-lease-list
|
- name: DHCP - Download vendor list for dhcp-lease-list
|
||||||
get_url:
|
get_url:
|
||||||
url: "http://standards-oui.ieee.org/oui.txt"
|
url: "https://standards-oui.ieee.org/oui.txt"
|
||||||
dest: /usr/local/etc/oui.txt
|
dest: /usr/local/etc/oui.txt
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
@ -73,7 +73,7 @@
|
|||||||
# Copy TFTP Config File
|
# Copy TFTP Config File
|
||||||
- name: TFTP - Copy tftpd-hpa
|
- name: TFTP - Copy tftpd-hpa
|
||||||
template:
|
template:
|
||||||
src: tftpd-hpa.j2
|
src: tftpd-hpa
|
||||||
dest: /etc/default/tftpd-hpa
|
dest: /etc/default/tftpd-hpa
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
@ -122,14 +122,14 @@
|
|||||||
- name: Files - Copy grub.cfg to tftp
|
- name: Files - Copy grub.cfg to tftp
|
||||||
when: not deploy_iso | bool
|
when: not deploy_iso | bool
|
||||||
template:
|
template:
|
||||||
src: grub.cfg.j2
|
src: grub.cfg
|
||||||
dest: /srv/tftp/debian-installer/amd64/grub/grub.cfg
|
dest: /srv/tftp/debian-installer/amd64/grub/grub.cfg
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: Files - Copy grub-iso.cfg to tftp
|
- name: Files - Copy grub-iso.cfg to tftp
|
||||||
when: deploy_iso | bool
|
when: deploy_iso | bool
|
||||||
template:
|
template:
|
||||||
src: grub-iso.cfg.j2
|
src: grub-iso.cfg
|
||||||
dest: /srv/tftp/debian-installer/amd64/grub/grub.cfg
|
dest: /srv/tftp/debian-installer/amd64/grub/grub.cfg
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
@ -137,7 +137,7 @@
|
|||||||
# It's served from HTTP now because bollocks to weird TFTP foolishness
|
# It's served from HTTP now because bollocks to weird TFTP foolishness
|
||||||
- name: Files - Copy server preseed to http
|
- name: Files - Copy server preseed to http
|
||||||
template:
|
template:
|
||||||
src: preseed-server-v2.cfg.j2
|
src: preseed-server-v2.cfg
|
||||||
dest: /var/www/html/preseed-server.cfg
|
dest: /var/www/html/preseed-server.cfg
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
# Update sysctl.conf file to enable IP forwarding
|
# Update sysctl.conf file to enable IP forwarding
|
||||||
- name: sysctl - enable IP forwarding
|
- name: sysctl - enable IP forwarding
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/sysctl.conf
|
create: true
|
||||||
|
path: /etc/sysctl.d/ip_forwarding.conf
|
||||||
regexp: '^net.ipv4.ip_forward='
|
regexp: '^net.ipv4.ip_forward='
|
||||||
line: 'net.ipv4.ip_forward=1'
|
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
|
# This role builds a pxe server and / or an ISO for the amd64 matt-cloud base image
|
||||||
|
|
||||||
- name: PXE Server - Architecture Warning
|
- name: PXE Server - Architecture Warning
|
||||||
when: '"arm" in cpu_architecture'
|
when: armcpu_check | bool
|
||||||
debug:
|
debug:
|
||||||
msg: "Warning - ARM CPU Detected, will not proceed"
|
msg: "Warning - ARM CPU Detected, will not proceed"
|
||||||
|
|
||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
- name: PXE Server - Build Deb12-MC.iso
|
- name: PXE Server - Build Deb12-MC.iso
|
||||||
include_tasks: build_iso.yaml
|
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
|
# Package selection
|
||||||
tasksel tasksel/first multiselect standard, ssh-server
|
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 pkgsel/upgrade select none
|
||||||
|
|
||||||
d-i preseed/late_command string \
|
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/root/.config/htop; \
|
||||||
mkdir -p /target/etc/openvpn/client; \
|
mkdir -p /target/etc/openvpn/client; \
|
||||||
mkdir -p /target/opt/cosmos/init; \
|
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 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; \
|
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; \
|
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
|
# Package selection
|
||||||
tasksel tasksel/first multiselect standard, ssh-server
|
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 pkgsel/upgrade select none
|
||||||
|
|
||||||
d-i preseed/late_command string \
|
d-i preseed/late_command string \
|
||||||
Reference in New Issue
Block a user