falkorlib 0.8.10 → 0.9.1
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 +60 -117
- data/README.md +46 -10
- data/binscripts/bootstrap.sh +8 -10
- data/completion/_falkor +16 -1
- data/falkorlib.gemspec +14 -14
- data/lib/falkorlib/bootstrap/base.rb +37 -32
- data/lib/falkorlib/bootstrap/git.rb +19 -4
- data/lib/falkorlib/bootstrap/latex.rb +7 -2
- data/lib/falkorlib/bootstrap/vagrant.rb +17 -10
- data/lib/falkorlib/cli.rb +16 -1
- 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/bootstrap_spec.rb +45 -1
- data/spec/falkorlib/git_spec.rb +2 -2
- data/spec/falkorlib/gitflow_spec.rb +5 -4
- data/templates/gitignore/All.gitignore +2 -0
- data/templates/gitignore/Python.gitignore +162 -0
- data/templates/gitignore/TeX.gitignore +309 -0
- 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/motd/motd.erb +2 -2
- 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 +86 -79
- data/templates/latex/images/logo_UL.pdf +0 -0
- data/templates/latex/images/logo_ULHPC.pdf +0 -0
@@ -0,0 +1,309 @@
|
|
1
|
+
## Core latex/pdflatex auxiliary files:
|
2
|
+
*.aux
|
3
|
+
*.lof
|
4
|
+
*.log
|
5
|
+
*.lot
|
6
|
+
*.fls
|
7
|
+
*.out
|
8
|
+
*.toc
|
9
|
+
*.fmt
|
10
|
+
*.fot
|
11
|
+
*.cb
|
12
|
+
*.cb2
|
13
|
+
.*.lb
|
14
|
+
|
15
|
+
## Intermediate documents:
|
16
|
+
*.dvi
|
17
|
+
*.xdv
|
18
|
+
*-converted-to.*
|
19
|
+
# these rules might exclude image files for figures etc.
|
20
|
+
# *.ps
|
21
|
+
# *.eps
|
22
|
+
# *.pdf
|
23
|
+
|
24
|
+
## Generated if empty string is given at "Please type another file name for output:"
|
25
|
+
.pdf
|
26
|
+
|
27
|
+
## Bibliography auxiliary files (bibtex/biblatex/biber):
|
28
|
+
*.bbl
|
29
|
+
*.bcf
|
30
|
+
*.blg
|
31
|
+
*-blx.aux
|
32
|
+
*-blx.bib
|
33
|
+
*.run.xml
|
34
|
+
|
35
|
+
## Build tool auxiliary files:
|
36
|
+
*.fdb_latexmk
|
37
|
+
*.synctex
|
38
|
+
*.synctex(busy)
|
39
|
+
*.synctex.gz
|
40
|
+
*.synctex.gz(busy)
|
41
|
+
*.pdfsync
|
42
|
+
|
43
|
+
## Build tool directories for auxiliary files
|
44
|
+
# latexrun
|
45
|
+
latex.out/
|
46
|
+
|
47
|
+
## Auxiliary and intermediate files from other packages:
|
48
|
+
# algorithms
|
49
|
+
*.alg
|
50
|
+
*.loa
|
51
|
+
|
52
|
+
# achemso
|
53
|
+
acs-*.bib
|
54
|
+
|
55
|
+
# amsthm
|
56
|
+
*.thm
|
57
|
+
|
58
|
+
# beamer
|
59
|
+
*.nav
|
60
|
+
*.pre
|
61
|
+
*.snm
|
62
|
+
*.vrb
|
63
|
+
|
64
|
+
# changes
|
65
|
+
*.soc
|
66
|
+
|
67
|
+
# comment
|
68
|
+
*.cut
|
69
|
+
|
70
|
+
# cprotect
|
71
|
+
*.cpt
|
72
|
+
|
73
|
+
# elsarticle (documentclass of Elsevier journals)
|
74
|
+
*.spl
|
75
|
+
|
76
|
+
# endnotes
|
77
|
+
*.ent
|
78
|
+
|
79
|
+
# fixme
|
80
|
+
*.lox
|
81
|
+
|
82
|
+
# feynmf/feynmp
|
83
|
+
*.mf
|
84
|
+
*.mp
|
85
|
+
*.t[1-9]
|
86
|
+
*.t[1-9][0-9]
|
87
|
+
*.tfm
|
88
|
+
|
89
|
+
#(r)(e)ledmac/(r)(e)ledpar
|
90
|
+
*.end
|
91
|
+
*.?end
|
92
|
+
*.[1-9]
|
93
|
+
*.[1-9][0-9]
|
94
|
+
*.[1-9][0-9][0-9]
|
95
|
+
*.[1-9]R
|
96
|
+
*.[1-9][0-9]R
|
97
|
+
*.[1-9][0-9][0-9]R
|
98
|
+
*.eledsec[1-9]
|
99
|
+
*.eledsec[1-9]R
|
100
|
+
*.eledsec[1-9][0-9]
|
101
|
+
*.eledsec[1-9][0-9]R
|
102
|
+
*.eledsec[1-9][0-9][0-9]
|
103
|
+
*.eledsec[1-9][0-9][0-9]R
|
104
|
+
|
105
|
+
# glossaries
|
106
|
+
*.acn
|
107
|
+
*.acr
|
108
|
+
*.glg
|
109
|
+
*.glo
|
110
|
+
*.gls
|
111
|
+
*.glsdefs
|
112
|
+
*.lzo
|
113
|
+
*.lzs
|
114
|
+
*.slg
|
115
|
+
*.slo
|
116
|
+
*.sls
|
117
|
+
|
118
|
+
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
|
119
|
+
# *.ist
|
120
|
+
|
121
|
+
# gnuplot
|
122
|
+
*.gnuplot
|
123
|
+
*.table
|
124
|
+
|
125
|
+
# gnuplottex
|
126
|
+
*-gnuplottex-*
|
127
|
+
|
128
|
+
# gregoriotex
|
129
|
+
*.gaux
|
130
|
+
*.glog
|
131
|
+
*.gtex
|
132
|
+
|
133
|
+
# htlatex
|
134
|
+
*.4ct
|
135
|
+
*.4tc
|
136
|
+
*.idv
|
137
|
+
*.lg
|
138
|
+
*.trc
|
139
|
+
*.xref
|
140
|
+
|
141
|
+
# hyperref
|
142
|
+
*.brf
|
143
|
+
|
144
|
+
# knitr
|
145
|
+
*-concordance.tex
|
146
|
+
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
|
147
|
+
# *.tikz
|
148
|
+
*-tikzDictionary
|
149
|
+
|
150
|
+
# listings
|
151
|
+
*.lol
|
152
|
+
|
153
|
+
# luatexja-ruby
|
154
|
+
*.ltjruby
|
155
|
+
|
156
|
+
# makeidx
|
157
|
+
*.idx
|
158
|
+
*.ilg
|
159
|
+
*.ind
|
160
|
+
|
161
|
+
# minitoc
|
162
|
+
*.maf
|
163
|
+
*.mlf
|
164
|
+
*.mlt
|
165
|
+
*.mtc[0-9]*
|
166
|
+
*.slf[0-9]*
|
167
|
+
*.slt[0-9]*
|
168
|
+
*.stc[0-9]*
|
169
|
+
|
170
|
+
# minted
|
171
|
+
_minted*
|
172
|
+
*.pyg
|
173
|
+
|
174
|
+
# morewrites
|
175
|
+
*.mw
|
176
|
+
|
177
|
+
# newpax
|
178
|
+
*.newpax
|
179
|
+
|
180
|
+
# nomencl
|
181
|
+
*.nlg
|
182
|
+
*.nlo
|
183
|
+
*.nls
|
184
|
+
|
185
|
+
# pax
|
186
|
+
*.pax
|
187
|
+
|
188
|
+
# pdfpcnotes
|
189
|
+
*.pdfpc
|
190
|
+
|
191
|
+
# sagetex
|
192
|
+
*.sagetex.sage
|
193
|
+
*.sagetex.py
|
194
|
+
*.sagetex.scmd
|
195
|
+
|
196
|
+
# scrwfile
|
197
|
+
*.wrt
|
198
|
+
|
199
|
+
# svg
|
200
|
+
svg-inkscape/
|
201
|
+
|
202
|
+
# sympy
|
203
|
+
*.sout
|
204
|
+
*.sympy
|
205
|
+
sympy-plots-for-*.tex/
|
206
|
+
|
207
|
+
# pdfcomment
|
208
|
+
*.upa
|
209
|
+
*.upb
|
210
|
+
|
211
|
+
# pythontex
|
212
|
+
*.pytxcode
|
213
|
+
pythontex-files-*/
|
214
|
+
|
215
|
+
# tcolorbox
|
216
|
+
*.listing
|
217
|
+
|
218
|
+
# thmtools
|
219
|
+
*.loe
|
220
|
+
|
221
|
+
# TikZ & PGF
|
222
|
+
*.dpth
|
223
|
+
*.md5
|
224
|
+
*.auxlock
|
225
|
+
|
226
|
+
# titletoc
|
227
|
+
*.ptc
|
228
|
+
|
229
|
+
# todonotes
|
230
|
+
*.tdo
|
231
|
+
|
232
|
+
# vhistory
|
233
|
+
*.hst
|
234
|
+
*.ver
|
235
|
+
|
236
|
+
# easy-todo
|
237
|
+
*.lod
|
238
|
+
|
239
|
+
# xcolor
|
240
|
+
*.xcp
|
241
|
+
|
242
|
+
# xmpincl
|
243
|
+
*.xmpi
|
244
|
+
|
245
|
+
# xindy
|
246
|
+
*.xdy
|
247
|
+
|
248
|
+
# xypic precompiled matrices and outlines
|
249
|
+
*.xyc
|
250
|
+
*.xyd
|
251
|
+
|
252
|
+
# endfloat
|
253
|
+
*.ttt
|
254
|
+
*.fff
|
255
|
+
|
256
|
+
# Latexian
|
257
|
+
TSWLatexianTemp*
|
258
|
+
|
259
|
+
## Editors:
|
260
|
+
# WinEdt
|
261
|
+
*.bak
|
262
|
+
*.sav
|
263
|
+
|
264
|
+
# Texpad
|
265
|
+
.texpadtmp
|
266
|
+
|
267
|
+
# LyX
|
268
|
+
*.lyx~
|
269
|
+
|
270
|
+
# Kile
|
271
|
+
*.backup
|
272
|
+
|
273
|
+
# gummi
|
274
|
+
.*.swp
|
275
|
+
|
276
|
+
# KBibTeX
|
277
|
+
*~[0-9]*
|
278
|
+
|
279
|
+
# TeXnicCenter
|
280
|
+
*.tps
|
281
|
+
|
282
|
+
# auto folder when using emacs and auctex
|
283
|
+
./auto/*
|
284
|
+
*.el
|
285
|
+
|
286
|
+
# expex forward references with \gathertags
|
287
|
+
*-tags.tex
|
288
|
+
|
289
|
+
# standalone packages
|
290
|
+
*.sta
|
291
|
+
|
292
|
+
# Makeindex log files
|
293
|
+
*.lpz
|
294
|
+
|
295
|
+
# xwatermark package
|
296
|
+
*.xwm
|
297
|
+
|
298
|
+
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
|
299
|
+
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
|
300
|
+
# Uncomment the next line to have this generated file ignored.
|
301
|
+
#*Notes.bib
|
302
|
+
|
303
|
+
### Custom additions by Falkor
|
304
|
+
# GNU Texinfo
|
305
|
+
.texinfo/*
|
306
|
+
|
307
|
+
# Don't consider generated PDF - they must be probably committed at the end
|
308
|
+
# somewhere else
|
309
|
+
/*.pdf
|
@@ -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
|
data/templates/motd/motd.erb
CHANGED
@@ -8,11 +8,11 @@ Welcome to <%= config[:hostname].chomp %>
|
|
8
8
|
<%= ("=" * config[:width]) + "\n" %>
|
9
9
|
Hostname: <%= config[:hostname].chomp %>
|
10
10
|
OS: <%= config[:os] %>
|
11
|
-
IP: <%= Facter.value(
|
11
|
+
IP: <%= Facter.value('networking.ip') %> (@mac: <%= Facter.value('networking.mac') %>)
|
12
12
|
Support: <%= config[:support] %>
|
13
13
|
|
14
14
|
=== <%= config[:desc] %> ===
|
15
15
|
<%= config[:nodemodel] %>
|
16
|
-
RAM: <%= Facter.value(
|
16
|
+
RAM: <%= Facter.value('memory.system.total') %> -- Swap size: <%= Facter.value('memory.swap.total') %>
|
17
17
|
|
18
18
|
<%= ("=" * config[:width]) + "\n" %>
|
@@ -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
|