Skip to content

Commit

Permalink
Version 1.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinbojko committed Jun 23, 2022
1 parent 6683cc6 commit 8c16710
Show file tree
Hide file tree
Showing 28 changed files with 655 additions and 67 deletions.
Empty file modified .gitignore
100755 → 100644
Empty file.
30 changes: 15 additions & 15 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
variables:
packer_version: "1.8.0"
packer_version: "1.8.1"
dind: 20.10-dind
build_alma: "false"
build_centos: "false"
build_rocky: "false"
build_oracle: "false"
build_ubuntu: "false"
build_windows2022_std: "true"
build_windows2022_dc: "true"
build_windows2022_std: "false"
build_windows2022_dc: "false"
stages:
- get-packer
- centos7-validate
Expand Down Expand Up @@ -147,7 +147,7 @@ rocky85:
- docker:$dind
before_script:
- export template_file="./templates/hv_rockylinux8_g2.pkr.hcl"
- export var_file="./variables/variables_rockylinux85.pkvars.hcl"
- export var_file="./variables/variables_rockylinux86.pkvars.hcl"
script:
- ./packer version --version
- ./packer validate -var-file="$var_file" "$template_file"
Expand All @@ -163,7 +163,7 @@ rocky85-vagrant:
- docker:$dind
before_script:
- export template_file="./templates/hv_rockylinux8_g2_vagrant.pkr.hcl"
- export var_file="./variables/variables_rockylinux85.pkvars.hcl"
- export var_file="./variables/variables_rockylinux86.pkvars.hcl"
script:
- ./packer version --version
- ./packer validate -var-file="$var_file" "$template_file"
Expand All @@ -179,7 +179,7 @@ rocky85-docker:
- docker:$dind
before_script:
- export template_file="./templates/hv_rockylinux8_g2_docker.pkr.hcl"
- export var_file="./variables/variables_rockylinux85.pkvars.hcl"
- export var_file="./variables/variables_rockylinux86.pkvars.hcl"
script:
- ./packer version --version
- ./packer validate -var-file="$var_file" "$template_file"
Expand All @@ -196,7 +196,7 @@ oracle85:
- docker:$dind
before_script:
- export template_file="./templates/hv_oraclelinux8_g2.pkr.hcl"
- export var_file="./variables/variables_oraclelinux85.pkvars.hcl"
- export var_file="./variables/variables_oraclelinux86.pkvars.hcl"
script:
- ./packer version --version
- ./packer validate -var-file="$var_file" "$template_file"
Expand All @@ -212,7 +212,7 @@ oracle85-vagrant:
- docker:$dind
before_script:
- export template_file="./templates/hv_oraclelinux8_g2_vagrant.pkr.hcl"
- export var_file="./variables/variables_oraclelinux85.pkvars.hcl"
- export var_file="./variables/variables_oraclelinux86.pkvars.hcl"
script:
- ./packer version --version
- ./packer validate -var-file="$var_file" "$template_file"
Expand All @@ -228,7 +228,7 @@ oracle85-docker:
- docker:$dind
before_script:
- export template_file="./templates/hv_oraclelinux8_g2_docker.pkr.hcl"
- export var_file="./variables/variables_oraclelinux85.pkvars.hcl"
- export var_file="./variables/variables_oraclelinux86.pkvars.hcl"
script:
- ./packer version --version
- ./packer validate -var-file="$var_file" "$template_file"
Expand Down Expand Up @@ -468,7 +468,7 @@ build_rocky:
- "Get-Vm -name packer-*|Stop-VM -Force"
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- .\hv_rockylinux85.ps1
- .\hv_rockylinux86.ps1
rules:
- if: $build_rocky == "true"
when: on_success
Expand All @@ -483,7 +483,7 @@ build_rocky_docker:
- "Get-Vm -name packer-*|Stop-VM -Force"
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- .\hv_rockylinux85_docker.ps1
- .\hv_rockylinux86_docker.ps1
rules:
- if: $build_rocky == "true"
when: on_success
Expand All @@ -500,7 +500,7 @@ build_rocky_vagrant:
- "Get-Vm -name packer-*|Stop-VM -Force"
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- .\hv_rockylinux85_vagrant.ps1
- .\hv_rockylinux86_vagrant.ps1
rules:
- if: $build_rocky == "true"
when: on_success
Expand All @@ -518,7 +518,7 @@ build_oracle:
- "Get-Vm -name packer-*|Stop-VM -Force"
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- .\hv_oraclelinux85.ps1
- .\hv_oraclelinux86.ps1
rules:
- if: $build_oracle == "true"
when: on_success
Expand All @@ -533,7 +533,7 @@ build_oracle_docker:
- "Get-Vm -name packer-*|Stop-VM -Force"
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- .\hv_oraclelinux85_docker.ps1
- .\hv_oraclelinux86_docker.ps1
rules:
- if: $build_oracle == "true"
when: on_success
Expand All @@ -550,7 +550,7 @@ build_oracle_vagrant:
- "Get-Vm -name packer-*|Stop-VM -Force"
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- .\hv_oraclelinux85_vagrant.ps1
- .\hv_oraclelinux86_vagrant.ps1
rules:
- if: $build_oracle == "true"
when: on_success
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## version 1.9.7 2022-06-22

* `extra` scripts and playbooks optimizations
* [RockyLinux] added `RockyLinux 8.6`
* [OracleLinux] added `OracleLinux 8.6`
* [Windows] bump puppet-agent package to version 7.14.0

## Version 1.9.6 2022-05-04

* [BREAKING_CHANGE] bumped `puppet` package and repository to version 7, for all Linux RHEL-based machines
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
- [Hyper-V Generation 2 Ubuntu 20.04 Image](#hyper-v-generation-2-ubuntu-2004-image)
- [Templates RockyLinux 8.x](#templates-rockylinux-8x)
- [Warnings - RockyLinux 8](#warnings---rockylinux-8)
- [Hyper-V Generation 2 RockyLinux 8.5 Image](#hyper-v-generation-2-rockylinux-85-image)
- [Hyper-V Generation 2 RockyLinux 8.5 Vagrant support](#hyper-v-generation-2-rockylinux-85-vagrant-support)
- [Hyper-V Generation 2 RockyLinux 8.5 image with extra docker volume](#hyper-v-generation-2-rockylinux-85-image-with-extra-docker-volume)
- [Hyper-V Generation 2 RockyLinux 8.6 Image](#hyper-v-generation-2-rockylinux-86-image)
- [Hyper-V Generation 2 RockyLinux 8.6 Vagrant support](#hyper-v-generation-2-rockylinux-86-vagrant-support)
- [Hyper-V Generation 2 RockyLinux 8.6 image with extra docker volume](#hyper-v-generation-2-rockylinux-86-image-with-extra-docker-volume)
- [Templates OracleLinux 8.x](#templates-oraclelinux-8x)
- [Warnings - OracleLinux 8](#warnings---oraclelinux-8)
- [Hyper-V Generation 2 OracleLinux 8.5 Image](#hyper-v-generation-2-oraclelinux-85-image)
- [Hyper-V Generation 2 OracleLinux 8.5 Vagrant support](#hyper-v-generation-2-oraclelinux-85-vagrant-support)
- [Hyper-V Generation 2 OracleLinux 8.5 image with extra docker volume](#hyper-v-generation-2-oraclelinux-85-image-with-extra-docker-volume)
- [Hyper-V Generation 2 OracleLinux 8.6 Image](#hyper-v-generation-2-oraclelinux-86-image)
- [Hyper-V Generation 2 OracleLinux 8.6 Vagrant support](#hyper-v-generation-2-oraclelinux-86-vagrant-support)
- [Hyper-V Generation 2 OracleLinux 8.6 image with extra docker volume](#hyper-v-generation-2-oraclelinux-86-image-with-extra-docker-volume)
- [Templates AlmaLinux 8.x](#templates-almalinux-8x)
- [Warnings - AlmaLinux 8](#warnings---almalinux-8)
- [Hyper-V Generation 2 AlmaLinux 8.5 Image](#hyper-v-generation-2-almalinux-85-image)
Expand Down Expand Up @@ -140,7 +140,7 @@ To adjust to your Hyper-V, please check variables below and/or in ./variables fi
|conemu|latest|
|dotnetfx|latest|
|sysinternals|latest|
|puppet|6.26.0|
|puppet|7.14.0|
|tabby|latest|

- latest Nuget poweshell module
Expand All @@ -151,7 +151,7 @@ To adjust to your Hyper-V, please check variables below and/or in ./variables fi

Example of usage:

`.\phase3.ps1 -Version 6.26.0 -AddPrivateChoco $true -PuppetMaster foreman.example.com`
`.\phase3.ps1 -Version 7.14.0 -AddPrivateChoco $true -PuppetMaster foreman.example.com`

Puppet is set to clear any temp SSL keys and to be stopped after generalize phase

Expand Down Expand Up @@ -408,17 +408,17 @@ Run `hv_ubuntu2004.ps1`
- for Windows based machines adjust your settings in ./scripts/phase-2.ps1
- for Linux based machines adjust your settings in ./files/gen2-centos/provision.sh and ./files/gen2-centos/puppet.conf

### Hyper-V Generation 2 RockyLinux 8.5 Image
### Hyper-V Generation 2 RockyLinux 8.6 Image

Run `hv_rockylinux85.ps1`
Run `hv_rockylinux86.ps1`

### Hyper-V Generation 2 RockyLinux 8.5 Vagrant support
### Hyper-V Generation 2 RockyLinux 8.6 Vagrant support

Run `hv_rockylinux85_vagrant.ps1` for RockyLinux 8.5
Run `hv_rockylinux86_vagrant.ps1` for RockyLinux 8.6

### Hyper-V Generation 2 RockyLinux 8.5 image with extra docker volume
### Hyper-V Generation 2 RockyLinux 8.6 image with extra docker volume

Run `hv_rockylinux85_docker.ps1` for RockyLinux 8.5
Run `hv_rockylinux86_docker.ps1` for RockyLinux 8.6

## Templates OracleLinux 8.x

Expand All @@ -432,17 +432,17 @@ Run `hv_rockylinux85_docker.ps1` for RockyLinux 8.5
- for Windows based machines adjust your settings in ./scripts/phase-2.ps1
- for Linux based machines adjust your settings in ./files/gen2-centos/provision.sh and ./files/gen2-centos/puppet.conf

### Hyper-V Generation 2 OracleLinux 8.5 Image
### Hyper-V Generation 2 OracleLinux 8.6 Image

Run `hv_oraclelinux85.ps1`
Run `hv_oraclelinux86.ps1`

### Hyper-V Generation 2 OracleLinux 8.5 Vagrant support
### Hyper-V Generation 2 OracleLinux 8.6 Vagrant support

Run `hv_oraclelinux85_vagrant.ps1` for OracleLinux 8.5
Run `hv_oraclelinux86_vagrant.ps1` for OracleLinux 8.5

### Hyper-V Generation 2 OracleLinux 8.5 image with extra docker volume
### Hyper-V Generation 2 OracleLinux 8.6 image with extra docker volume

Run `hv_oraclelinux85_docker.ps1` for OracleLinux 8.5
Run `hv_oraclelinux86_docker.ps1` for OracleLinux 8.6

## Templates AlmaLinux 8.x

Expand Down
8 changes: 8 additions & 0 deletions extra/.ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
skip_list:
- package-latest
- command-instead-of-shell
- no-handler
- risky-file-permissions
- risky-shell-pipe
- no-relative-paths
- experimental
11 changes: 11 additions & 0 deletions extra/.yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: relaxed

rules:
comments-indentation: disable
colons: false
line-length:
max: 300
level: warning
indentation:
spaces: consistent
indent-sequences: consistent
33 changes: 33 additions & 0 deletions extra/files/gen2-kali2021/common-password
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# /etc/pam.d/common-password - password-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define the services to be
# used to change user passwords. The default is pam_unix.

# Explanation of pam_unix options:
#
# The "sha512" option enables salted SHA512 passwords. Without this option,
# the default is Unix crypt. Prior releases used the option "md5".
#
# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
# login.defs.
#
# See the pam_unix manpage for other options.

# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules. See
# pam-auth-update(8) for details.

# here are the per-package modules (the "Primary" block)
password [success=1 default=ignore] pam_unix.so sha512 minlen=1
# here's the fallback if no module succeeds
password requisite pam_permit.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
password required pam_permit.so
# and here are more per-package modules (the "Additional" block)
# end of pam-auth-update config
Empty file.
7 changes: 7 additions & 0 deletions extra/files/gen2-kali2021/motd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
neofetch --config /etc/neofetch/config.conf
if [ -f ~/.Xauthority ]; then
xauth merge ~/.Xauthority
fi
export XAUTHORITY=$HOME/.Xauthority

40 changes: 40 additions & 0 deletions extra/files/gen2-kali2021/prepare_neofetch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
# prepare (comment/uncomment lines according to our needs)

config="/etc/neofetch/config.conf"
config_dir="/etc/neofetch"

if [ ! -d $config_dir ];then
echo "No $config_dir exists - creating one"
mkdir -v $config_dir
fi

if [ ! -e $config ];then
if [ -e /root/.config/neofetch/config.conf ];then
echo "Copying config from root to /etc/neofetch"
cp -pv /root/.config/neofetch/config.conf $config
fi
fi

if [ -e $config ]; then
echo "Starting Neofetch configuration"
# comment
sed -i -e 's/^[[:blank:]]*info "Packages" packages/#info "Packages" packages/g' $config
sed -i -e 's/^[[:blank:]]*info "Resolution" resolution/#info "Resolution" resolution/g' $config
sed -i -e 's/^[[:blank:]]*info "DE" de/#info "DE" de/g' $config
sed -i -e 's/^[[:blank:]]*info "WM" wm/#info "WM" wm/g' $config
sed -i -e 's/^[[:blank:]]*info "WM Theme" wm_theme/#info "WM Theme" wm_theme/g' $config
sed -i -e 's/^[[:blank:]]*info "Theme" theme/#info "Theme" theme/g' $config
sed -i -e 's/^[[:blank:]]*info "Icons" icons/#info "Icons" icons/g' $config
sed -i -e 's/^[[:blank:]]*info "Terminal" term/#info "Terminal" term/g' $config
sed -i -e 's/^[[:blank:]]*info "Terminal Font" term_font/#info "Terminal Font" term_font/g' $config
sed -i -e 's/^[[:blank:]]*info cols/#info cols/g' $config
# uncomment
sed -i -e 's/^[[:blank:]]*# info "Disk" disk/info "Disk" disk/g' $config
sed -i -e 's/^[[:blank:]]*# info "Local IP" local_ip/info "Local IP" local_ip/g' $config
# disable color block - workaround for HV console
sed -i -e 's/color_blocks="on"/color_blocks="off"/g' $config
echo "Finished Neofetch configuration"
else
echo "File $config doesn't exist - couldn't configure neofetch"
fi
Loading

0 comments on commit 8c16710

Please sign in to comment.