slurm.fact.sh
$ ansible slurm-controller -m setup -a "filter=ansible_local"
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
[WARNING]: error loading fact - please check content
slurm-controller-dev | SUCCESS => {
"ansible_facts": {
"ansible_local": {
"golang": {
"general": {
"home": "/opt/go/1.14.4",
"version": "1.14.4"
}
},
"slurm": "error loading fact - please check content"
}
},
"changed": false
}
Since the slurm.conf seems to be a kind of INI file (without section name), I guess that the INI -> JSON complain because there are 2 options with the same name NodeName
I tested a little around (after having add a [general] section):
import configparser
config = configparser.ConfigParser()
config.read('/etc/slurm-llnl/slurm.conf')
config.read('/etc/slurm-llnl/slurm.conf')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/shared/software/miniconda/envs/python-3.9/lib/python3.9/configparser.py", line 697, in read
self._read(fp, filename)
File "/shared/software/miniconda/envs/python-3.9/lib/python3.9/configparser.py", line 1093, in _read
raise DuplicateOptionError(sectname, optname,
configparser.DuplicateOptionError: While reading from '/etc/slurm-llnl/slurm.conf' [line 66]: option 'nodename' in section 'general' already exists