Skip to content

Commit

Permalink
cleanup gentoo Vagrant setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed May 18, 2024
1 parent 6a4e84b commit 5840ba2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ FacterDB::get_facts('osfamily=Debian')
| FreeBSD 11 | 1 | 1 | 1 | | | | | |
| FreeBSD 12 | 1 | 1 | 1 | | | 1 | | |
| FreeBSD 13 | 1 | 1 | 1 | 1 | 1 | 1 | | |
| Gentoo | | | | | | 1 | | |
| Gentoo | | | 1 | 1 | 2 | 1 | 1 | 1 |
| OpenBSD 7.5 | | | | | | | | 1 |
| OracleLinux 7 | 1 | | 1 | | | | | |
| OracleLinux 8 | | | 1 | 1 | 1 | 1 | 1 | 1 |
Expand Down
7 changes: 6 additions & 1 deletion facts/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
host.vm.provision 'shell', inline: '/sbin/shutdown -p now'
end
config.vm.define 'gentoo-x86_64', autostart: false do |host|
# gentoo needs some resources, otherwise the installation takes ages
host.vm.provider 'virtualbox' do |v|
v.memory = 4096
v.cpus = 4
end
host.vm.box = 'generic/gentoo'
host.vm.synced_folder '.', '/vagrant'
host.vm.provision 'shell', inline: 'emerge-webrsync && emerge app-crypt/gnupg net-misc/curl'
host.vm.provision 'shell', inline: 'emerge-webrsync --quiet && emerge app-crypt/gnupg net-misc/curl'
host.vm.provision 'file', source: 'Gemfile', destination: 'Gemfile'
host.vm.provision 'shell', path: 'get_facts.sh'
host.vm.provision 'shell', inline: '/sbin/shutdown -h now'
Expand Down
2 changes: 1 addition & 1 deletion facts/get_facts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ case "${osfamily}" in
facter --show-legacy -p -j | tee ${output_file}
;;
'Gentoo')
emerge -vq1 dev-lang/ruby dev-ruby/bundler app-admin/puppet
emerge -vq1 dev-lang/ruby dev-ruby/bundler app-admin/puppet dev-ruby/facter sys-apps/dmidecode app-admin/augeas
output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter hardwaremodel).facts"
mkdir -p $(dirname ${output_file})
facter --show-legacy -p -j | tee ${output_file}
Expand Down

0 comments on commit 5840ba2

Please sign in to comment.