falkorlib 0.8.10 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +56 -116
- data/README.md +1 -1
- data/binscripts/bootstrap.sh +8 -10
- data/falkorlib.gemspec +12 -12
- data/lib/falkorlib/bootstrap/base.rb +29 -25
- data/lib/falkorlib/bootstrap/latex.rb +7 -2
- data/lib/falkorlib/bootstrap/vagrant.rb +17 -10
- data/lib/falkorlib/common.rb +3 -3
- data/lib/falkorlib/config.rb +3 -3
- data/lib/falkorlib/gem_tasks.rb +1 -1
- data/lib/falkorlib/git_tasks.rb +1 -1
- data/lib/falkorlib/puppet_tasks.rb +1 -1
- data/lib/falkorlib/version.rb +2 -1
- data/spec/falkorlib/bootstrap_latex_spec.rb +6 -5
- data/spec/falkorlib/git_spec.rb +2 -2
- data/spec/falkorlib/gitflow_spec.rb +5 -4
- data/templates/latex/beamer/.Makefile.local +1 -0
- data/templates/latex/beamer/_content.md.erb +1 -1
- data/templates/latex/beamer/main.tex.erb +20 -8
- data/templates/latex/images/logo_ANSSI.png +0 -0
- data/templates/latex/images/logo_RF.png +0 -0
- data/templates/vagrant/.gitignore +14 -0
- data/templates/vagrant/Vagrantfile.erb +53 -15
- data/templates/vagrant/vagrant/config.yaml.sample +9 -6
- data/templates/vagrant/vagrant/scripts/bootstrap.sh +32 -14
- metadata +80 -76
- data/templates/latex/images/logo_UL.pdf +0 -0
- data/templates/latex/images/logo_ULHPC.pdf +0 -0
data/spec/falkorlib/git_spec.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#########################################
|
3
3
|
# git_spec.rb
|
4
4
|
# @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
5
|
-
# Time-stamp: <
|
5
|
+
# Time-stamp: <Wed 2023-11-22 17:21 svarrette>
|
6
6
|
#
|
7
7
|
# @description Check the Git operations
|
8
8
|
#
|
@@ -316,7 +316,7 @@ describe FalkorLib::Git do
|
|
316
316
|
|
317
317
|
[ :subtrees, :submodules ].each do |type|
|
318
318
|
it "#config_warn(#{type})" do
|
319
|
-
t = capture(:
|
319
|
+
t = capture(:stderr) { FalkorLib::Git.config_warn(type) }
|
320
320
|
expect(t).to include "FalkorLib.config.git"
|
321
321
|
expect(t).to include "FalkorLib.config.git.submodulesdir" if type == :submodules
|
322
322
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#########################################
|
3
3
|
# gitflow_spec.rb
|
4
4
|
# @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
5
|
-
# Time-stamp: <
|
5
|
+
# Time-stamp: <Wed 2023-11-22 09:52 svarrette>
|
6
6
|
#
|
7
7
|
# @description Check the Git Flow operations -- see https://github.com/nvie/gitflow
|
8
8
|
#
|
@@ -50,7 +50,7 @@ describe FalkorLib::GitFlow do
|
|
50
50
|
it "#branch" do
|
51
51
|
expected = {
|
52
52
|
:master => 'production',
|
53
|
-
:develop => '
|
53
|
+
:develop => 'master'
|
54
54
|
}
|
55
55
|
expected.each do |type,v|
|
56
56
|
b = FalkorLib::GitFlow.branches(type.to_sym, dir)
|
@@ -82,9 +82,10 @@ describe FalkorLib::GitFlow do
|
|
82
82
|
c = FalkorLib::GitFlow.guess_gitflow_config(dir)
|
83
83
|
{
|
84
84
|
:master => 'production',
|
85
|
-
:develop => '
|
85
|
+
:develop => 'master'
|
86
86
|
}.each do |type,v|
|
87
|
-
expect(c[:branches][type.to_sym]).to eq(v)
|
87
|
+
expect(c[:branches][type.to_sym]).to eq(v) if v.is_a? String
|
88
|
+
expect(v).to include(c[:branches][type.to_sym]) if v.is_a? Array
|
88
89
|
end
|
89
90
|
{
|
90
91
|
:feature => 'feature/',
|
@@ -0,0 +1 @@
|
|
1
|
+
BIBTEX = biber
|
@@ -155,7 +155,7 @@ The classical markdown syntax `` does not allow any control
|
|
155
155
|
|
156
156
|
So you probaby wish to do it in \LaTeX\ directly
|
157
157
|
|
158
|
-
\centerline{\includegraphics[width=4em]{
|
158
|
+
\centerline{\includegraphics[width=4em]{logo_ANSSI.png}}
|
159
159
|
|
160
160
|
A normal (left aligned) text afterward
|
161
161
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
% Time-stamp: <Thu
|
1
|
+
% Time-stamp: <Thu 2023-11-23 17:53 svarrette>
|
2
2
|
% =============================================================================
|
3
3
|
% File: <%= config[:name] %>.tex --
|
4
4
|
% Author(s): <%= config[:author] %> (<%= config[:mail] %>)
|
@@ -15,6 +15,16 @@
|
|
15
15
|
\documentclass[aspectratio=169]{beamer}
|
16
16
|
% \documentclass[draft]{beamer}
|
17
17
|
\usepackage{_style}
|
18
|
+
\usepackage[
|
19
|
+
backend=biber,
|
20
|
+
maxnames=999,
|
21
|
+
giveninits=true,
|
22
|
+
style=verbose,
|
23
|
+
]{biblatex}
|
24
|
+
% \addbibresource{biblio.bib}
|
25
|
+
\setbeamerfont{footnote}{size=\tiny}
|
26
|
+
% Usage in slides: \footfullcite{<bibentry>}
|
27
|
+
|
18
28
|
|
19
29
|
% The key part to use my theme -- if you precise nothing, the image that
|
20
30
|
% illustrate the slides is assumed to be images/slides_image.jpg
|
@@ -41,8 +51,11 @@
|
|
41
51
|
\author[<%= config[:author] %> \& al.]{
|
42
52
|
\underline{<%= config[:author] %>}
|
43
53
|
}
|
44
|
-
\institute[
|
45
|
-
|
54
|
+
\institute[ANSSI/SDE/DST/LAM]{
|
55
|
+
ANSSI/SDE/DST/LAM
|
56
|
+
Agence nationale de la sécurité des systèmes d'information / French National Cybersecurity Agency
|
57
|
+
Laboratoire Architectures Matérielles et logicielles (LAM)
|
58
|
+
\myurl{<%= config[:url] %>}
|
46
59
|
}
|
47
60
|
|
48
61
|
% Mandatory to **declare** a logo to be placed on the bottom right -- normally the
|
@@ -80,11 +93,10 @@
|
|
80
93
|
\column{0.5\textwidth}
|
81
94
|
% \emph{Contact}\\
|
82
95
|
{\tiny
|
83
|
-
\emph{
|
84
|
-
~~~~ \structure{
|
85
|
-
|
86
|
-
|
87
|
-
~~~~ L-4365 Esch-sur-Alzette\\
|
96
|
+
\emph{ANSSI/SDE/DST/LAM}\\
|
97
|
+
~~~~ \structure{Laboratoire Architectures Matérielles et logicielles}\\
|
98
|
+
\emph{Contacts:}\\
|
99
|
+
~~~~\emph{<%= config[:author] %>}\\
|
88
100
|
~~~~ \textit{mail:} \href{mailto:<%= config[:mail] %>}{<%= config[:mail] %>}\\
|
89
101
|
}
|
90
102
|
\column{0.5\textwidth}
|
Binary file
|
Binary file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/vagrant
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=vagrant
|
3
|
+
|
4
|
+
### Vagrant ###
|
5
|
+
# General
|
6
|
+
.vagrant/
|
7
|
+
|
8
|
+
# Log files (if you are creating logs in debug mode, uncomment this)
|
9
|
+
# *.log
|
10
|
+
|
11
|
+
### Vagrant Patch ###
|
12
|
+
*.box
|
13
|
+
|
14
|
+
# End of https://www.toptal.com/developers/gitignore/api/vagrant
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- mode: ruby -*-
|
2
2
|
# vi: set ft=ruby :
|
3
|
-
# Time-stamp: <Mon
|
3
|
+
# Time-stamp: <Mon 2023-12-04 17:12 svarrette>
|
4
4
|
###########################################################################################
|
5
5
|
# __ __ _ __ _ _
|
6
6
|
# \ \ / /_ _ __ _ _ __ __ _ _ __ | |_ / _(_) | ___
|
@@ -25,7 +25,7 @@ require 'erb'
|
|
25
25
|
[ 'vagrant-hosts',
|
26
26
|
'vagrant-vbguest',
|
27
27
|
'vagrant-cachier',
|
28
|
-
|
28
|
+
'vagrant-libvirt',
|
29
29
|
'deep_merge',
|
30
30
|
'terminal-table' ].each do |plugin|
|
31
31
|
abort "Install the '#{plugin}' plugin with 'vagrant plugin install #{plugin}'" unless Vagrant.has_plugin?("#{plugin}")
|
@@ -53,9 +53,10 @@ DEFAULT_SETTINGS = {
|
|
53
53
|
# Default images settings
|
54
54
|
:defaults => {
|
55
55
|
:os => :<%= config[:os] %>,
|
56
|
+
:provider => :<%= config[:provider] %>,
|
56
57
|
:ram => <%= config[:ram] %>,
|
57
58
|
:vcpus => <%= config[:vcpus] %>,
|
58
|
-
:vbguest_auto_update =>
|
59
|
+
:vbguest_auto_update => false,
|
59
60
|
:role => 'default',
|
60
61
|
# :nodes => 1,
|
61
62
|
},
|
@@ -66,10 +67,18 @@ DEFAULT_SETTINGS = {
|
|
66
67
|
},
|
67
68
|
# Default Boxes
|
68
69
|
:boxes => {
|
69
|
-
:
|
70
|
-
:
|
71
|
-
:
|
72
|
-
:
|
70
|
+
:debian12 => '<%= config[:boxes][:debian12] %>',
|
71
|
+
:debian12_uefi => '<%= config[:boxes][:debian12_uefi] %>',
|
72
|
+
:almalinux9 => '<%= config[:boxes][:almalinux9] %>',
|
73
|
+
:almalinux8 => '<%= config[:boxes][:almalinux8] %>',
|
74
|
+
:almalinux8_uefi => '<%= config[:boxes][:almalinux8_uefi] %>',
|
75
|
+
:rockylinux8 => '<%= config[:boxes][:rockylinux8] %>',
|
76
|
+
:centosstream9 => '<%= config[:boxes][:centosstream9] %>',
|
77
|
+
:centosstream8 => '<%= config[:boxes][:centosstream8] %>',
|
78
|
+
:ubuntu22 => '<%= config[:boxes][:ubuntu22] %>',
|
79
|
+
:ubuntu20 => '<%= config[:boxes][:ubuntu20] %>',
|
80
|
+
:fedora38 => '<%= config[:boxes][:fedora38] %>',
|
81
|
+
:archlinux => '<%= config[:boxes][:archlinux] %>'
|
73
82
|
},
|
74
83
|
# virtual images to deploy
|
75
84
|
# <name>:
|
@@ -126,18 +135,21 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
126
135
|
# set auto_update to false, if you do NOT want to check the correct
|
127
136
|
# additions version when booting these boxes
|
128
137
|
config.vbguest.auto_update = defaults[:vbguest_auto_update]
|
138
|
+
config.vbguest.installer_options = { allow_kernel_upgrade: true }
|
139
|
+
|
129
140
|
end
|
130
141
|
|
131
142
|
# Shell provisioner, to bootstrap each box with the minimal settings/packages
|
132
143
|
DEFAULT_PROVISIONING_SCRIPTS.each do |script|
|
133
144
|
config.vm.provision "shell", path: "#{script}", keep_color: true
|
134
145
|
end
|
135
|
-
|
146
|
+
|
147
|
+
# config.vm.synced_folder ".", "/vagrant", type: "virtualbox" # done by default
|
136
148
|
## Uncomment the below part if you want and additional shared directory
|
137
149
|
# config.vm.synced_folder "vagrant/shared", "/shared", mount_options: ['dmode=777','fmode=777'],
|
138
150
|
# type: "virtualbox" # Shared directory for users
|
139
151
|
if Dir.exist?(File.join(TOP_PUPPETDIR, 'hieradata'))
|
140
|
-
config.vm.synced_folder "#{puppet_dir}/hieradata", "/tmp/vagrant-puppet/hieradata"
|
152
|
+
config.vm.synced_folder "#{puppet_dir}/hieradata", "/tmp/vagrant-puppet/hieradata" #, type: "virtualbox"
|
141
153
|
end
|
142
154
|
|
143
155
|
# network settings
|
@@ -161,12 +173,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
161
173
|
boxname = defaults[:os].to_s.downcase.gsub(/([^\d]+)(\d+)/, '\\1-\\2')
|
162
174
|
name = boxname if name == 'default'
|
163
175
|
os = node[:os] ? node[:os].to_sym : defaults[:os].to_sym
|
176
|
+
provider = (os =~ /_uefi$/)? 'libvirt' : defaults[:provider]
|
177
|
+
provider = node[:provider] if node[:provider]
|
164
178
|
ram = node[:ram] ? node[:ram] : defaults[:ram]
|
165
179
|
vcpus = node[:vcpus] ? node[:vcpus] : defaults[:vcpus]
|
166
180
|
role = node[:role] ? node[:role] : 'default'
|
167
181
|
desc = node[:desc] ? node[:desc] : 'n/a'
|
168
182
|
puppet_modules = node[:puppet_modules] ? node[:puppet_modules] : []
|
169
|
-
|
183
|
+
warn "provider: #{provider}"
|
170
184
|
abort "Non-existing box OS '#{os}' for the VM '#{name}'" if settings[:boxes][os.to_sym].nil?
|
171
185
|
abort "Empty IP address range" if ip_range.empty?
|
172
186
|
ip = ip_range[ ip_index.to_i ].to_s
|
@@ -175,13 +189,36 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
175
189
|
config.vm.define "#{name}" do |c|
|
176
190
|
c.vm.box = settings[:boxes][os.to_sym]
|
177
191
|
c.vm.hostname = "#{fqdn}"
|
178
|
-
c.vm.network
|
192
|
+
c.vm.network :private_network,
|
193
|
+
:ip => ip,
|
194
|
+
:libvirt__network_address => network[:range], # ip_range[0].to_s + '/24',
|
195
|
+
:libvirt__forward_mode => 'nat'
|
196
|
+
|
179
197
|
c.vm.provision :hosts, :sync_hosts => true
|
198
|
+
# (eventually) Force default provider
|
199
|
+
c.vm.provider :"#{provider}" if provider != 'virtualbox'
|
180
200
|
|
181
|
-
|
201
|
+
# Custom VM configs for virtualbox provider
|
202
|
+
c.vm.provider 'virtualbox' do |v|
|
182
203
|
v.customize [ 'modifyvm', :id, '--name', hostname, '--memory', ram.to_s ]
|
183
204
|
v.customize [ 'modifyvm', :id, '--cpus', vcpus.to_s ] if vcpus.to_i > 1
|
184
205
|
#v.customize [ 'setextradata', :id, 'VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root', '1']
|
206
|
+
v.customize ["modifyvm", :id, "--firmware", "efi"]
|
207
|
+
end
|
208
|
+
# Custom VM configs for libvirt provider
|
209
|
+
# see https://vagrant-libvirt.github.io/vagrant-libvirt/configuration.html
|
210
|
+
c.vm.provider :libvirt do |lv|
|
211
|
+
lv.uri = 'qemu:///system'
|
212
|
+
lv.host = hostname
|
213
|
+
lv.cpus = vcpus
|
214
|
+
lv.memory = ram
|
215
|
+
# lv.nested = true
|
216
|
+
|
217
|
+
# Emulated TPM
|
218
|
+
lv.tpm_model = "tpm-crb"
|
219
|
+
lv.tpm_type = "emulator"
|
220
|
+
lv.tpm_version = "2.0"
|
221
|
+
|
185
222
|
end
|
186
223
|
|
187
224
|
# role specialization
|
@@ -201,8 +238,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
201
238
|
end
|
202
239
|
|
203
240
|
# A role fact MUST be defined (default: 'default') as it is used in Hiera config
|
241
|
+
facts_dir = '/etc/facter/facts.d/'
|
204
242
|
c.vm.provision "shell",
|
205
|
-
inline: "echo '{ \"role\": \"#{role}\" }' > /
|
243
|
+
inline: "mkdir -p #{facts_dir}; echo '{ \"role\": \"#{role}\" }' > #{facts_dir}/custom.json",
|
206
244
|
keep_color: true
|
207
245
|
################ Puppet install ##############
|
208
246
|
c.vm.provision "puppet" do |puppet|
|
@@ -222,14 +260,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
222
260
|
|
223
261
|
__table[:rows] << [ name, fqdn, os.to_sym, "#{vcpus}/#{ram}", role, desc, ip]
|
224
262
|
|
225
|
-
if settings[:vms].keys.last == name
|
263
|
+
#if settings[:vms].keys.last == name
|
226
264
|
c.trigger.after :up do |trigger|
|
227
265
|
trigger.info = (Terminal::Table.new __table).to_s
|
228
266
|
trigger.warn = <<-EOF
|
229
267
|
- Virtual Vagrant infrastructure successfully deployed!
|
230
268
|
EOF
|
231
269
|
end
|
232
|
-
end
|
270
|
+
#end
|
233
271
|
|
234
272
|
end # config.vm.define
|
235
273
|
end # settings
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -*- mode: yaml; -*-
|
2
|
-
# Time-stamp: <Sat
|
2
|
+
# Time-stamp: <Sat 2023-11-18 16:59 svarrette>
|
3
3
|
################################################################################
|
4
4
|
# Complementary configuration for Vagrant
|
5
5
|
# You can overwrite here the default settings defined in ../Vagrantfile and
|
@@ -11,15 +11,18 @@
|
|
11
11
|
# Format:
|
12
12
|
# :<os><version>: <username>/<box> # see https://vagrantcloud.com
|
13
13
|
# :boxes:
|
14
|
-
# :
|
15
|
-
# :
|
16
|
-
# :
|
17
|
-
# :
|
14
|
+
# :debian12: 'debian/bookworm64'
|
15
|
+
# :rockylinux9: 'rockylinux/9'
|
16
|
+
# :rockylinux8: 'rockylinux/8'
|
17
|
+
# :ubuntu22: 'ubuntu/jammy64'
|
18
|
+
# :ubuntu20: 'ubuntu/focal64'
|
19
|
+
# :fedora38: 'generic/fedora38'
|
20
|
+
# :archlinux: 'archlinux/archlinux'
|
18
21
|
|
19
22
|
#_________________
|
20
23
|
# Default settings
|
21
24
|
# :defaults:
|
22
|
-
# :os: :
|
25
|
+
# :os: :debian12 # Default OS from the above box definition
|
23
26
|
# :ram: 512 # Default RAM
|
24
27
|
# :vcpus: 1 # Default number of virtual CPUs
|
25
28
|
# :vbguest_auto_update: 1 # check/update box guest additions
|
@@ -1,13 +1,13 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
# Time-stamp: <
|
2
|
+
# Time-stamp: <Mon 2023-12-04 17:51 svarrette>
|
3
3
|
###########################################################################################
|
4
4
|
# __ __ _ ____ _ _
|
5
5
|
# \ \ / /_ _ __ _ _ __ __ _ _ __ | |_ | __ ) ___ ___ | |_ ___| |_ _ __ __ _ _ __
|
6
|
-
# \ \ / / _` |/ _` | '__/ _` | '_ \| __| | _ \ / _ \ / _ \| __/ __| __| '__/ _` | '_ \
|
7
|
-
|
6
|
+
# \ \ / / _` |/ _` | '__/ _` | '_ \| __| | _ \ / _ \ / _ \| __/ __| __| '__/ _` | '_ \ .
|
7
|
+
# \ V / (_| | (_| | | | (_| | | | | |_ | |_) | (_) | (_) | |_\__ \ |_| | | (_| | |_) |
|
8
8
|
# \_/ \__,_|\__, |_| \__,_|_| |_|\__| |____/ \___/ \___/ \__|___/\__|_| \__,_| .__/
|
9
9
|
# |___/ |_|
|
10
|
-
# Copyright (c) 2017-
|
10
|
+
# Copyright (c) 2017-2023 Sebastien Varrette
|
11
11
|
###########################################################################################
|
12
12
|
# (prefered) way to see a Vagrant box configured.
|
13
13
|
#
|
@@ -26,12 +26,12 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
26
26
|
MOTD="/etc/motd"
|
27
27
|
DOTFILES_DIR='/etc/dotfiles.d'
|
28
28
|
DOTFILES_URL='https://github.com/ULHPC/dotfiles.git'
|
29
|
-
EXTRA_PACKAGES=
|
29
|
+
EXTRA_PACKAGES='swtpm swtpm-tools'
|
30
30
|
|
31
31
|
TITLE=$(hostname -s)
|
32
32
|
|
33
33
|
# List of default packages to install
|
34
|
-
COMMON_DEFAULT_PACKAGES="ruby wget figlet git screen bash-completion rsync vim htop net-tools
|
34
|
+
COMMON_DEFAULT_PACKAGES="ruby wget figlet git screen bash-completion rsync vim htop net-tools"
|
35
35
|
|
36
36
|
######
|
37
37
|
# Print information in the following form: '[$2] $1' ($2=INFO if not submitted)
|
@@ -67,6 +67,15 @@ setup_redhat() {
|
|
67
67
|
touch /etc/sysconfig/bash-prompt-screen
|
68
68
|
chmod +x /etc/sysconfig/bash-prompt-screen
|
69
69
|
|
70
|
+
if [ -x "/usr/bin/crb" ]; then
|
71
|
+
info "Enable CodeReady Builder (CRB) repository"
|
72
|
+
/usr/bin/crb enable
|
73
|
+
fi
|
74
|
+
|
75
|
+
if ! grep -e "fastestmirror" /etc/dnf/dnf.conf; then
|
76
|
+
echo "fastestmirror=1" >> /etc/dnf/dnf.conf
|
77
|
+
fi
|
78
|
+
|
70
79
|
info "Running yum update"
|
71
80
|
yum update -y >/dev/null
|
72
81
|
|
@@ -81,17 +90,24 @@ setup_redhat() {
|
|
81
90
|
os_version=$(rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release))
|
82
91
|
info "Adding Puppet Labs repo and installing Puppet for RHEL/CentOS ${os_version}"
|
83
92
|
# Get the major version
|
84
|
-
yum install -y https://yum.puppetlabs.com/
|
93
|
+
yum install -y https://yum.puppetlabs.com/puppet7-release-el-$(echo $os_version | cut -d '.' -f 1).noarch.rpm
|
85
94
|
yum install -y puppet
|
86
95
|
}
|
87
96
|
|
88
97
|
setup_apt() {
|
98
|
+
export DEBIAN_FRONTEND=noninteractive
|
99
|
+
|
89
100
|
case $1 in
|
90
101
|
3*) codename=cumulus ;;
|
91
102
|
6) codename=squeeze ;;
|
92
103
|
7) codename=wheezy ;;
|
93
104
|
8) codename=jessie ;;
|
94
105
|
9) codename=stretch ;;
|
106
|
+
10) codename=buster ;;
|
107
|
+
11) codename=bullseye ;;
|
108
|
+
12) codename=bookworm ;;
|
109
|
+
13) codename=trixie ;;
|
110
|
+
14) codename=forky ;;
|
95
111
|
12.04) codename=precise ;;
|
96
112
|
14.04) codename=trusty ;;
|
97
113
|
16.04) codename=xenial ;;
|
@@ -104,13 +120,12 @@ setup_apt() {
|
|
104
120
|
info "Installing default packages"
|
105
121
|
apt-get install -y ${COMMON_DEFAULT_PACKAGES} git-core ${EXTRA_PACKAGES} >/dev/null
|
106
122
|
|
107
|
-
info "
|
108
|
-
|
109
|
-
|
123
|
+
info "Set locale"
|
124
|
+
localectl set-locale LANG=en_US.UTF-8
|
125
|
+
|
126
|
+
info "Installing puppet"
|
127
|
+
apt-get install -y puppet >/dev/null
|
110
128
|
|
111
|
-
info "installing Environment modules and LMod"
|
112
|
-
apt-get install -y environment-modules lmod
|
113
|
-
apt-get install -y build-essentials
|
114
129
|
}
|
115
130
|
|
116
131
|
setup_linux() {
|
@@ -144,7 +159,7 @@ setup_linux() {
|
|
144
159
|
info "Detected Linux distro: ${distro} version ${majver} on arch ${ARCH}"
|
145
160
|
case "$distro" in
|
146
161
|
debian|ubuntu) setup_apt $majver ;;
|
147
|
-
redhat|fedora|centos|scientific|amazon) setup_redhat $majver ;;
|
162
|
+
redhat|rocky|fedora|centos|almalinux|scientific|amazon) setup_redhat $majver ;;
|
148
163
|
*) echo "Not supported distro: $distro"; exit 1;;
|
149
164
|
esac
|
150
165
|
|
@@ -169,6 +184,9 @@ setup_dotfiles () {
|
|
169
184
|
info "installing dotfiles for 'vagrant' user"
|
170
185
|
sudo -u vagrant ${dotfile_install_cmd}
|
171
186
|
fi
|
187
|
+
info "cleanup .inputrc"
|
188
|
+
rm -f /root/.inputrc
|
189
|
+
sudo -u vagrant rm -f ~vagrant/.inputrc
|
172
190
|
}
|
173
191
|
|
174
192
|
setup_motd() {
|