Skip to content

Instantly share code, notes, and snippets.

@jasonroelofs
Last active December 14, 2015 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonroelofs/5039558 to your computer and use it in GitHub Desktop.
Save jasonroelofs/5039558 to your computer and use it in GitHub Desktop.
Chef-Solo config doesn't match command line options. The following give me two different log outputs.
The command line options give me exactly the log output I want, old Chef 10 with enough info and not too verbose. One line per action, no printing of the templates being rendered
$ chef-solo --force-logger --log_level info
...
[2013-02-26T15:54:06+00:00] INFO: Processing service[syslog-ng] action enable (syslog-ng::default line 30)
[2013-02-26T15:54:06+00:00] INFO: Processing service[syslog-ng] action start (syslog-ng::default line 30)
[2013-02-26T15:54:06+00:00] INFO: Processing package[logrotate] action upgrade (logrotate::default line 1)
[2013-02-26T15:54:06+00:00] INFO: Processing package[sudo] action upgrade (sudo::default line 1)
[2013-02-26T15:54:06+00:00] INFO: Processing template[/etc/sudoers] action create (sudo::default line 5)
[2013-02-26T15:54:06+00:00] INFO: Processing directory[/etc/sudoers.d] action create (sudo::default line 11)
# But when I put the exact same values here in the solo.rb, I get half of what I want, and half of
# what I really don't want (namely verbose printing of actions being taken).
log_level :info
force_logger true
__END__
Recipe: users::admin
* group[admin] action create[2013-02-26T15:55:09+00:00] INFO: Processing group[admin] action create (users::admin line 2)
[2013-02-26T15:55:10+00:00] INFO: group[admin] altered
- alter group group[admin]
- replace group members with new list of members
* file[/etc/sudoers.d/admin] action create[2013-02-26T15:55:10+00:00] INFO: Processing file[/etc/sudoers.d/admin] action create (users::admin line 5)
(up to date)
Recipe: users::deploy
* group[deploy] action create[2013-02-26T15:55:10+00:00] INFO: Processing group[deploy] action create (users::deploy line 2)
[2013-02-26T15:55:10+00:00] INFO: group[deploy] altered
- alter group group[deploy]
- replace group members with new list of members
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment