/programming-ansible-basics

Some basic examples about how to program using Ansible libraries

Primary LanguagePythonMIT LicenseMIT

Examples

Two examples describing how to use Ansible programmatically in Python.

  • test_modules.py : set up the environment to run an Ansible module
  • test_playbook.py: creates an inventory and loads a .yml file with a playbook, then runs the playbook and shows the results like Ansible-playbook CLI tool

Other files:

  • ansible.cfg : just a basic Ansible configuration file
  • test.yml : simple playbook