BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Learning paths › Automation › Roles, imports and writing your own module

Roles, imports and writing your own module

Packaging and extending: a role laid out where Ansible will find it and published for installation by version, a task file loaded dynamically or statically with the difference visible in --list-tasks, a role looped or expanded up front, and several playbooks composed into one run — then writing your own module, beginning as a plain Python CSV report, wrapped in AnsibleModule, fed hostvars, and returning a clear failure instead of a traceback — and finally RESTCONF driven through the uri module, with a recorded working request first, PUT's scope seen, routes merged without loss and one loopback deleted by key. Explanation and checks; four written exercises.

Lessons

More in Automation