$ docker run -it --rm puppet/puppet-agent --version |
5.5.1 |
$ cat mounttmp.pp |
$dir = '/var/run/test' |
$dir2 = '/run/test2' |
exec { 'dir': |
command => "/bin/mkdir -p ${dir} ${dir2}", |
} |
mount { [$dir, $dir2]: |
ensure => mounted, |
fstype => tmpfs, |
device => tmpfs, |
options => 'size=1m', |
remounts => false, |
require => Exec['dir'], |
} |
$ check="mount | grep /test" && puppet='puppet apply --test --trace -e "$(cat /workspace/code.pp)"' |
$ docker run --hostname test.example.com --cap-add=SYS_ADMIN -it --rm --entrypoint 'sh' -v $PWD/mounttmp.pp:/workspace/code.pp puppet/puppet-agent -c "$check ; $puppet ; $check ; $puppet ; $check" |
Notice: Compiled catalog for test.example.com in environment production in 0.07 seconds |
Info: Applying configuration version '1537822009' |
Notice: /Stage[main]/Main/Exec[dir]/returns: executed successfully |
Notice: /Stage[main]/Main/Mount[/var/run/test]/ensure: defined 'ensure' as 'mounted' |
Info: Computing checksum on file /etc/fstab |
Info: /Stage[main]/Main/Mount[/var/run/test]: Scheduling refresh of Mount[/var/run/test] |
Info: Mount[/var/run/test](provider=parsed): Remounting |
Notice: /Stage[main]/Main/Mount[/var/run/test]: Triggered 'refresh' from 1 event |
Info: /Stage[main]/Main/Mount[/var/run/test]: Scheduling refresh of Mount[/var/run/test] |
Notice: /Stage[main]/Main/Mount[/run/test2]/ensure: defined 'ensure' as 'mounted' |
Info: /Stage[main]/Main/Mount[/run/test2]: Scheduling refresh of Mount[/run/test2] |
Info: Mount[/run/test2](provider=parsed): Remounting |
Notice: /Stage[main]/Main/Mount[/run/test2]: Triggered 'refresh' from 1 event |
Info: /Stage[main]/Main/Mount[/run/test2]: Scheduling refresh of Mount[/run/test2] |
Info: Creating state file /opt/puppetlabs/puppet/cache/state/state.yaml |
Notice: Applied catalog in 0.16 seconds |
tmpfs on /run/test type tmpfs (rw,relatime,size=1024k) |
tmpfs on /run/test2 type tmpfs (rw,relatime,size=1024k) |
Notice: Compiled catalog for test.example.com in environment production in 0.07 seconds |
Info: Applying configuration version '1537822012' |
Notice: /Stage[main]/Main/Exec[dir]/returns: executed successfully |
Notice: /Stage[main]/Main/Mount[/var/run/test]/ensure: ensure changed 'unmounted' to 'mounted' |
Info: /Stage[main]/Main/Mount[/var/run/test]: Scheduling refresh of Mount[/var/run/test] |
Info: Mount[/var/run/test](provider=parsed): Remounting |
Notice: /Stage[main]/Main/Mount[/var/run/test]: Triggered 'refresh' from 1 event |
Info: /Stage[main]/Main/Mount[/var/run/test]: Scheduling refresh of Mount[/var/run/test] |
Notice: Applied catalog in 0.11 seconds |
tmpfs on /run/test type tmpfs (rw,relatime,size=1024k) |
tmpfs on /run/test2 type tmpfs (rw,relatime,size=1024k) |
tmpfs on /run/test type tmpfs (rw,relatime,size=1024k)
|