{"id":3773,"date":"2018-04-03T10:23:10","date_gmt":"2018-04-03T09:23:10","guid":{"rendered":"https:\/\/www.devco.net\/?p=3773"},"modified":"2018-04-03T10:23:10","modified_gmt":"2018-04-03T09:23:10","slug":"adding-rich-object-data-types-to-puppet","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2018\/04\/03\/adding-rich-object-data-types-to-puppet.php","title":{"rendered":"Adding rich object data types to Puppet"},"content":{"rendered":"

Extending Puppet using types, providers, facts and functions are well known and widely done. Something new is how to add entire new data types to the Puppet DSL to create entirely new language behaviours.<\/p>\n

I’ve done a bunch of this recently with the Choria Playbooks<\/a> and some other fun experiments, today I’ll walk through building a small network wide spec system using the Puppet DSL.<\/p>\n

Overview<\/H2>
\nA quick look at what we want to achieve here, I want to be able to do Choria RPC requests and assert their outcomes, I want to write tests using the Puppet DSL and they should run on a specially prepared environment. In my case I have a AWS environment with CentOS, Ubuntu, Debian and Archlinux machines:<\/p>\n

Below I test the File Manager Agent<\/a>:<\/p>\n