yaml file transform MAC address to INT

Solution Verified - Updated -

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content