fix: ordered elements and attributes to make file content deterministic

Hi!

This fix helps us to make generated files deterministic, otherwise the order of attributes and elements changes each time puppet master is restarted or there are some changes in libs, it leads to puppet changes  in the config files and service restarts, although nothing has changed in fact

For us this is a workaround, may be you have a better suggestion...