Refactor parsing puppetscript
chrisma opened this issue · 1 comments
chrisma commented
- Investigate if there is a Ruby lib for parsing puppetscripts
- Parse using regexes with context information in capture groups
- Don't rely on the line number of scripts
- Get rid of
node_file_correct?
- What happens if only a single pp file is broken? Does the entire system go down?
chrisma commented
We could make this more generic by relying solely on a regex to extract the user names, regardless of which line they are in, similar to \$admins\s*=\s*\[["|'](\S+)["|']\]
, see: https://rubular.com/r/4AJ5PUkYflmzcK