Hey Justin! I use this myself a lot. One thing really hit me hard: value_for_platform
fails silently when used in an attribute file. Afaik this will change in chef 11.
You hit the mark! A thing I've forgot to mention: some commands exit with a certain exit code if they did nothing. You can then check this exitcode when setting updated_by_last_action
.
You're welcome!
Hi autolykos!
I turn the commands into LWRPs. This takes some hours but the my colleagues appreciate having a descriptive LWRP instead of a command.
I usually look first whether there is something like a check-command which I can if this command should be excuted. For example domainjoin-cli has the subcommand query
. The provider then looks somewhat like this: https://github.com/opscode-cookbooks/samba/blob/master/providers/user.rb
@hauleth Indeed! Depends on what you actually want.
@tuikiken you just append ".keys" to the profile url. This url can be fetched with curl or similiar tools.
Are you sure? Ruby 1.9.3 represents a Time as 64 bit wide timestamp. Some experiments yielded:
pry(main)> Time.mktime(-4371,1,1)
=> -4371-01-01 00:00:00 +0053
pry(main)> Time.mktime(23012,1,1)
=> 23012-01-01 00:00:00 +0100
I've done this for years. Why haven't I come up with the idea of writing this protip?
Achievements
1,201 Karma
77,439 Total ProTip Views

Walrus

Forked

Charity

Mongoose 3

Mongoose

T-Rex

You can even turn this on for all connections by setting the
sql_safe_updates
variable to 1. ( source )