Use puppet resources

May require a bit more tests before merging.