parse a file for data and put it into a variable
I have a file called "accesslist" which looks like this:
server1:user1,user2,user3 server2:user3 server3:user2,user3
I need to parse this file and depending on the $hostname of the server, it will give me the names of the users. I will put these names into my access.conf file using Puppet DSL and templates. How should I go about parsing the accesslist? Should I write a custom function in Puppet?