I am new here and I have a client that requested that I remove the ruby dependency from the foreman_scap_client and replace it with python, since they are an ansible shop. I started the conversion by creating a YAML parser, to avoid installing pyyaml on the target hosts.
I chose python over bash because I am worried about parsing the yaml config file in bash. Also, it isn’t as easy for me to write unittest, like I can with python.
They really do not want ruby installed, for some reason.
I am not too familiar with Go. After that comment, I googled it and I found out that it may be better to do it in Go. Do you want me to submit a PR, if it is in GO, and not python?
I can’t speak for the maintainers of the current rubygem-foreman_scap_client, but I see no reason why we would be against an alternative implementation.
Thanks @theredgreek for raising it here and opening this topic. I think @ofedoren and @aruzicka may be interested in this, when they have a bit of time. I have a feeling even pure shell script could do, but whatever has lower amount of dependencies the better. I also heard about experiments with pull provider in other language, perhaps it would be useful to have the same stack for it.
You are right. I should just do it in bash, even though all the cool kids write everything in Go and Rust. I guess I would have to develop a bash yaml parser…
Well I think Python is available almost everywhere either, go lang has benefit of being statically compiled. I think it needs a broader discussion on what’s the best fit (shell was just suggestion for consideration, I don’t feel knowledgeable enough to push for a specific technology)
The only reason we write down a YAML config is our Ansible/Puppet code deploys it that way. There’s little reason it needs to be that way. If you look at https://github.com/theforeman/ansible-foreman_scap_client/blob/master/tasks/main.yml then it really is small. Writing some other file (like bash env vars) is easy. Probably easier than trying to parse YAML in bash.