You may want to use a helper method to help clean up the syntax of dealing with the cli_args. Especially helpful if you're dealing with optional arguments. Check out: https://github.com/bflad/chef-docker/blob/master/libraries/helpers.rb and an example usage: https://github.com/bflad/chef-docker/blob/master/providers/container.rb#L111-L115