diff --git a/defaults/main.yml b/defaults/main.yml index 4ea059e4d807e0c095b8b2bd9fe04f8902c07b7f..a2dd894cb4c912834a29a8b2ce4ffae943b081f7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -23,6 +23,10 @@ live_kernel_version: v1.1.0 live_kernel_url: "https://artifactory.esss.lu.se/artifactory/list/swi-pkg/centos/centos-live/{{ live_kernel_version }}/" live_kernel_path: "{{ tftp_root }}/images/live/" +custom_pxe_version: v0.0.6 +custom_pxe_url: "https://artifactory.esss.lu.se/artifactory/list/swi-pkg/centos/centos-pxe/{{ custom_pxe_version }}/" + + rh_version: - centos7 @@ -43,6 +47,7 @@ autoinstall_grub_menus: - live_centos - proxmox - LESS + - MCR # kickstart selection autoinstall_default_bootmode: localboot @@ -80,3 +85,5 @@ autoinstall_kickstart_files: - firstboot.sh - centos7-thinclient.ks - thinclient_packages.template + - centos7-mcr.ks + - e1000e.template diff --git a/files/ESS-ELREPO.repo.centos7 b/files/ESS-ELREPO.repo.centos7 new file mode 100644 index 0000000000000000000000000000000000000000..1f6b2d7817d900a21dd24e96de83190319e60210 --- /dev/null +++ b/files/ESS-ELREPO.repo.centos7 @@ -0,0 +1,8 @@ +[elrepo-ess] +baseurl = https://artifactory.esss.lu.se/artifactory/elrepo/el7/$basearch/ +enabled = 1 +gpgcheck = 0 +#gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +name = ESS ELREPO 7 RPM repository +repo_gpgcheck = 0 + diff --git a/templates/centos7-mcr.ks.j2 b/templates/centos7-mcr.ks.j2 new file mode 100644 index 0000000000000000000000000000000000000000..0aa146b346df07dd9a018fc9ce091d62c9d5b650 --- /dev/null +++ b/templates/centos7-mcr.ks.j2 @@ -0,0 +1,96 @@ +# This kickstart file should only be used with EL > 5 and/or Fedora > 7. +# For older versions please use the sample.ks kickstart file. + +#platform=x86, AMD64, or Intel EM64T +# System authorization information +auth --useshadow --enablemd5 +# System bootloader configuration +bootloader --location=mbr +# Partition clearing information +clearpart --all --initlabel +# Use text mode install +text +# Firewall configuration +firewall --disabled +# Run the Setup Agent on first boot +firstboot --disable +# System keyboard +keyboard us +# System language +lang en_US +# Use network installation +#url --url=http://172.16.14.22/cobbler/ks_mirror/centos7-x86_64 +url --url=https://artifactory.esss.lu.se/artifactory/list/centos-mirror/7/os/x86_64/ +# If any cobbler repo definitions were referenced in the kickstart profile, include them here. +#repo --name=source-1 --baseurl=http://172.16.14.22/cobbler/ks_mirror/centos7-x86_64 +repo --name=source-1 --baseurl=https://artifactory.esss.lu.se/artifactory/list/centos-mirror/7/os/x86_64/ + +# Network information +network --bootproto=dhcp --device=eth0 --onboot=on + +# Reboot after installation +reboot + +#Root password +rootpw --iscrypted $1$lcr-cobb$ZgH9ugB9zZz7f1KwRZdSB. +# SELinux configuration +selinux --permissive +# Do not configure the X Window System +skipx +# System timezone +timezone Europe/Stockholm +# Install OS instead of upgrade +install +# Clear the Master Boot Record +zerombr +# Allow anaconda to partition the system as needed +autopart + + + + +%pre +set -x -v +exec 1>/tmp/ks-pre.log 2>&1 + +# Once root's homedir is there, copy over the log. +while : ; do + sleep 10 + if [ -d /mnt/sysimage/root ]; then + cp /tmp/ks-pre.log /mnt/sysimage/root/ + logger "Copied %pre section log to system" + break + fi +done & + + +%end + +%packages + +%include http://172.30.4.71/centos7/default_packages.template + + +%end + +%post --nochroot +set -x -v +exec 1>/mnt/sysimage/root/ks-post-nochroot.log 2>&1 + +%end + +%post +set -x -v +exec 1>/root/ks-post.log 2>&1 + +%include http://172.30.4.71/centos7/add_repo.template +%include http://172.30.4.71/centos7/clean_install.template +%include http://172.30.4.71/centos7/create_csi_user.template + +%include http://172.30.4.71/centos7/e1000e.template + +%include http://172.30.4.71/centos7/ansible_callback.template + + +%end + diff --git a/templates/e1000e.template.j2 b/templates/e1000e.template.j2 new file mode 100644 index 0000000000000000000000000000000000000000..2576b9ba43197fb368f0969968d41a3d66921d5e --- /dev/null +++ b/templates/e1000e.template.j2 @@ -0,0 +1,2 @@ +wget -O /etc/yum.repos.d/ESS-ELREPO.repo {{ kickstart_url }}/ESS-ELREPO.repo +yum install -y kmod-e1000e diff --git a/templates/grub-menu/BIOS-MCR.j2 b/templates/grub-menu/BIOS-MCR.j2 new file mode 100644 index 0000000000000000000000000000000000000000..d4da81ff3e0e2e7ada477108bfdb30667eaabbb5 --- /dev/null +++ b/templates/grub-menu/BIOS-MCR.j2 @@ -0,0 +1,2 @@ +linux /images/centos7-x86_64/vmlinuz-custom ksdevice=bootif lang= nomodeset text xdriver=vesa kssendmac ks=http://172.30.4.71/centos7/centos7-mcr.ks noverifyssl inst.sshd=1 +initrd /images/centos7-x86_64/initramfs-custom diff --git a/templates/grub-menu/EFI-MCR.j2 b/templates/grub-menu/EFI-MCR.j2 new file mode 100644 index 0000000000000000000000000000000000000000..82357cde992dd8d0139b3626984dfd8dec74b77b --- /dev/null +++ b/templates/grub-menu/EFI-MCR.j2 @@ -0,0 +1,2 @@ +linuxefi /images/centos7-x86_64/vmlinuz-custom ksdevice=bootif lang= nomodeset text xdriver=vesa kssendmac ks=http://172.30.4.71/centos7/centos7-mcr.ks noverifyssl inst.sshd=1 +initrdefi /images/centos7-x86_64/initramfs-custom