yaml file transform MAC address to INT
Issue
A mac address as 52:54:00:58:15:35 is interpreted as a sexagesimal when YAML parses it.
---
parameter_defaults:
EnableFencing: true
FencingConfig:
devices:
- agent: fence_xvm
host_mac: 52:54:00:58:15:35
...
python -c 'import yaml, sys; print yaml.load(sys.stdin)' < test.yaml
{'parameter_defaults': {'FencingConfig': {'devices': [{'agent': 'fence_xvm', 'host_mac': 41135249735}]}, 'EnableFencing': True}}
Environment
- Ansible 2.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.