New values are recorded.
Blank the file.
# cp /dev/null state.yaml
Run the agent.
# /opt/puppet/bin/puppet agent --test
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/ensure: audit change: newly-recorded value file
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/content: audit change: newly-recorded value {md5}e08b47228d3d97a3dbe2004d821500b2
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/target: audit change: newly-recorded value notlink
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/owner: audit change: newly-recorded value 0
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/group: audit change: newly-recorded value 3
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/mode: audit change: newly-recorded value 644
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/type: audit change: newly-recorded value file
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/seluser: audit change: newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/selrole: audit change: newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/seltype: audit change: newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/selrange: audit change: newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/ctime: audit change: newly-recorded value Thu Jul 24 03:10:00 -0700 2014
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/mtime: audit change: newly-recorded value Thu Jul 24 03:10:00 -0700 2014
Next run is normal
# /opt/puppet/bin/puppet agent --test
warning: iconv couldn't be loaded, which is required for UTF-8/UTF-16 conversions
info: Caching catalog for
host.example.cominfo: Applying configuration version '1406237846'
notice: Finished catalog run in 0.42 second
The puppet agent writes the information to state.yaml.
# ls -l /var/lib/puppet/state
total 370
drwxr-xr-x 2 root root 5 Oct 25 2012 graphs
-rw-rw---- 1 root root 420363 Jul 24 14:19 last_run_report.yaml
-rw-rw---- 1 root root 243 Jul 24 14:19 last_run_summary.yaml
-rw-r--r-- 1 root root 2825 Jul 24 14:19 resources.txt
-rw-rw---- 1 root root 42639 Jul 24 14:19 state.yaml
The file state.yaml records the MD5 sum.
# view /var/lib/puppet/state/state.yaml
"File[/etc/logadm.conf]":
!ruby/sym type: file
!ruby/sym checked: 2014-07-24 15:14:08.612241 -07:00
!ruby/sym target: !ruby/sym notlink
!ruby/sym owner: 0
!ruby/sym seltype:
!ruby/sym group: 3
!ruby/sym selrange:
!ruby/sym mode: "644"
!ruby/sym seluser:
!ruby/sym mtime: 2014-07-24 03:10:00.000000 -07:00
!ruby/sym ensure: !ruby/sym file
!ruby/sym content: "{md5}e08b47228d3d97a3dbe2004d821500b2"
!ruby/sym selrole:
!ruby/sym ctime: 2014-07-24 03:10:00.000000 -07:00
The last run is recorded in the file below.
# view /var/lib/puppet/state/last_run_report.yaml
"File[/etc/logadm.conf]": !ruby/object:Puppet::Resource::Status
change_count: 0
changed: false
evaluation_time: 0.000796
events: []
failed: false
file: *id001
line: 73
out_of_sync: false
out_of_sync_count: 0
resource: "File[/etc/logadm.conf]"
resource_type: File
skipped: false
tags:
- file
- class
- Solaris
time: 2014-07-24 15:14:08.611898 -07:00
title: /etc/logadm.conf