diff options
| author | Paul Buetow <paul@buetow.org> | 2023-05-28 00:01:27 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-05-28 00:01:27 +0300 |
| commit | 5b2deaa0e51468a04a3c7c72ad8e5181a8e804e2 (patch) | |
| tree | 5e4437db2debeecd31686916c2b3bd79d0c78ae5 /gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html | |
| parent | de7e5d7c4c6f85a1516b573f471351e6db5c1334 (diff) | |
Update content for html
Diffstat (limited to 'gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html')
| -rw-r--r-- | gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html index 04415adc..53b2286d 100644 --- a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html +++ b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html @@ -26,7 +26,7 @@ | | | | | | - `--....---' + `--....---' \ \ \ `. hjw \ `. @@ -36,16 +36,16 @@ <br /> <h2 style='display: inline'>ZFS</h2><br /> <br /> -<span>The ZFS module is a pretty basic one. It does not manage ZFS pools yet as I am not creating them often enough which would justify implementing an automation. But let's see how we can create a ZFS file system (on an already given ZFS pool named ztank):</span><br /> +<span>The ZFS module is a pretty basic one. It does not manage ZFS pools yet as I am not creating them often enough which would justify implementing an automation. But let's see how we can create a ZFS file system (on an already given ZFS pool named ztank):</span><br /> <br /> <span>Puppet snippet:</span><br /> <br /> <pre> -zfs::create { 'ztank/foo': +zfs::create { 'ztank/foo': ensure => present, - filesystem => '/srv/foo', + filesystem => '/srv/foo', - require => File['/srv'], + require => File['/srv'], } </pre> <br /> @@ -59,7 +59,7 @@ Info: Loading facts Info: Loading facts Info: Loading facts Notice: Compiled catalog for alphacentauri.home in environment production in 7.14 seconds -Info: Applying configuration version '1460189837' +Info: Applying configuration version '1460189837' Info: mount[files]: allowing * access Info: mount[restricted]: allowing * access Notice: /Stage[main]/Main/Node[alphacentauri]/Zfs::Create[ztank/foo]/Exec[ztank/foo_create]/returns: executed successfully @@ -74,11 +74,11 @@ admin alphacentauri:~ [1215]% <span>The destruction of the file system just requires to set "ensure" to "absent" in Puppet:</span><br /> <br /> <pre> -zfs::create { 'ztank/foo': +zfs::create { 'ztank/foo': ensure => absent, - filesystem => '/srv/foo', + filesystem => '/srv/foo', - require => File['/srv'], + require => File['/srv'], }¬ </pre> <br /> @@ -92,7 +92,7 @@ Info: Loading facts Info: Loading facts Info: Loading facts Notice: Compiled catalog for alphacentauri.home in environment production in 6.14 seconds -Info: Applying configuration version '1460190203' +Info: Applying configuration version '1460190203' Info: mount[files]: allowing * access Info: mount[restricted]: allowing * access Notice: /Stage[main]/Main/Node[alphacentauri]/Zfs::Create[ztank/foo]/Exec[zfs destroy -r ztank/foo]/returns: executed successfully @@ -115,35 +115,35 @@ zsh: exit 1 grep foo include jail::freebsd # Cloned interface for Jail IPv4 NAT -freebsd::rc_config { 'cloned_interfaces': - value => 'lo1', +freebsd::rc_config { 'cloned_interfaces': + value => 'lo1', } -freebsd::rc_config { 'ipv4_addrs_lo1': - value => '192.168.0.1-24/24' +freebsd::rc_config { 'ipv4_addrs_lo1': + value => '192.168.0.1-24/24' } -freebsd::ipalias { '2a01:4f8:120:30e8::17': +freebsd::ipalias { '2a01:4f8:120:30e8::17': ensure => up, - proto => 'inet6', - preflen => '64', - interface => 're0', - aliasnum => '8', + proto => 'inet6', + preflen => '64', + interface => 're0', + aliasnum => '8', } -class { 'jail': +class { 'jail': ensure => present, jails_config => { sync => { - '_ensure' => present, - '_type' => 'freebsd', - '_mirror' => 'ftp://ftp.de.freebsd.org', - '_remote_path' => 'FreeBSD/releases/amd64/10.1-RELEASE', - '_dists' => [ 'base.txz', 'doc.txz', ], - '_ensure_directories' => [ '/opt', '/opt/enc' ], - '_ensure_zfs' => [ '/sync' ], - 'host.hostname' => "'sync.ian.buetow.org'", - 'ip4.addr' => '192.168.0.17', - 'ip6.addr' => '2a01:4f8:120:30e8::17', + '_ensure' => present, + '_type' => 'freebsd', + '_mirror' => 'ftp://ftp.de.freebsd.org', + '_remote_path' => 'FreeBSD/releases/amd64/10.1-RELEASE', + '_dists' => [ 'base.txz', 'doc.txz', ], + '_ensure_directories' => [ '/opt', '/opt/enc' ], + '_ensure_zfs' => [ '/sync' ], + 'host.hostname' => "'sync.ian.buetow.org'", + 'ip4.addr' => '192.168.0.17', + 'ip6.addr' => '2a01:4f8:120:30e8::17', }, } } @@ -158,7 +158,7 @@ Info: Loading facts Info: Loading facts Info: Loading facts Notice: Compiled catalog for sun.ian.buetow.org in environment production in 1.80 seconds -Info: Applying configuration version '1460190986' +Info: Applying configuration version '1460190986' Notice: /Stage[main]/Jail/File[/etc/jail.conf]/ensure: created Info: mount[files]: allowing * access Info: mount[restricted]: allowing * access @@ -208,14 +208,14 @@ admin sun:/etc [1945]% cat /etc/jail.conf # Generated by Puppet allow.chflags = true; -exec.start = '/bin/sh /etc/rc'; -exec.stop = '/bin/sh /etc/rc.shutdown'; +exec.start = '/bin/sh /etc/rc'; +exec.stop = '/bin/sh /etc/rc.shutdown'; mount.devfs = true; mount.fstab = "/etc/fstab.jail.$name"; path = "/jail/$name"; sync { - host.hostname = 'sync.ian.buetow.org'; + host.hostname = 'sync.ian.buetow.org'; ip4.addr = 192.168.0.17; ip6.addr = 2a01:4f8:120:30e8::17; } @@ -340,8 +340,8 @@ Checking integrity... [sync.ian.buetow.org] [11/12] Extracting rubygem-ruby-augeas-0.5.0_2: 100% [sync.ian.buetow.org] [12/12] Installing puppet38-3.8.4_1... ===> Creating users and/or groups. -Creating group 'puppet' with gid '814'. -Creating user 'puppet' with uid '814'. +Creating group 'puppet' with gid '814'. +Creating user 'puppet' with uid '814'. [sync.ian.buetow.org] [12/12] Extracting puppet38-3.8.4_1: 100% . . @@ -367,12 +367,12 @@ Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts -Could not retrieve fact='pkgng_version', resolution='<anonymous>': undefined method `pkgng_enabled' for Facter:Module +Could not retrieve fact='pkgng_version', resolution='<anonymous>': undefined method `pkgng_enabled' for Facter:Module Warning: Config file /usr/local/etc/puppet/hiera.yaml not found, using Hiera defaults Notice: Compiled catalog for sync.ian.buetow.org in environment production in 1.31 seconds Warning: Found multiple default providers for package: pkgng, gem, pip; using pkgng -Info: Applying configuration version '1460192563' -Notice: /Stage[main]/S_base_freebsd/User[root]/shell: shell changed '/bin/csh' to '/bin/tcsh' +Info: Applying configuration version '1460192563' +Notice: /Stage[main]/S_base_freebsd/User[root]/shell: shell changed '/bin/csh' to '/bin/tcsh' Notice: /Stage[main]/S_user::Root_files/S_user::All_files[root_user]/File[/root/user]/ensure: created Notice: /Stage[main]/S_user::Root_files/S_user::My_files[root]/File[/root/userfiles]/ensure: created Notice: /Stage[main]/S_user::Root_files/S_user::My_files[root]/File[/root/.task]/ensure: created |
