(PUP-3119) Added yaml output to puppet resource

This enables you to list resources in YAML format for copy/paste into Hiera files.

The output should be suitable for use with the create_resources function
Would you take this block and make a private  helper method that returns the sorted keys with ensure first, so that the intention is more clear here?