Ansible is a radically simple IT automation system. It handles configuration management, application deployment, cloud provisioning, ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex changes like zero-downtime rolling updates with load balancers easy.
IBM i systems can be managed nodes of Ansible. This project is to enrich IBM i support on Ansible, like providing more IBM i modules and examples to manage IBM i nodes.
Dependencies on IBM i node:
- 5733SC1 Base and Option 1
- 5770DG1
- Python
- python itoolkit
- python ibm_db
Note: 1) Use yum to install 3, 4, 5. About how to install yum on IBM i, refer to examples/ibmi/playbooks/ibmi-install-yum.yml. 2) Both python 2 and python 3 are supported. The python which is used by Ansible depends on value of ansible_python_interpreter in the inventory file. For example, ansible_python_interpreter = "/QOpensys/pkgs/bin/python2" or ansible_python_interpreter = "/QOpensys/pkgs/bin/python3"
How to enable ansible server and IBM i nodes?
- Install ansible server. For example, run "yum install ansible" on a supported platform.
- Clone this repository to your Ansible server.
- Create your inventory file under examples/ibmi, an example can be found here "examples/ibmi/hosts_ibmi.ini"
- Run "ansible-playbook -i your_inventory_file playbooks/enable-ansible-for-i/setup.yml"
Manage IBM i nodes by Ansible Tower?
- Create your repository to fork this repository.
- Create your playbook in the root directory, for example, the same directory of ibmi-try-tower-structure.yml
- Create Project in Ansible Tower to point to your repository.
- Create job template to run your own playbook
Note, you can create new pull request to merge the changes in this repository into yours.
Directory structure:
├── action_plugins - Only applicable to Ansible tower. In where copies of lib/ansible/plugins/action/ are kept.
├── examples - Ansible playbook examples.
├── lib - Source code of IBM i new modules and plugins. Copy the folder to the module path on ansible server.
├── library - Only applicable to Ansible tower. In where copies of lib/ansible/modules/ibmi/ are kept.
├── module_utils - Only applicable to Ansible tower. In where copies of lib/ansible/module_utils/ are kept.
├── test - Integration test code of IBM i new modules and plugins.
├── ibmi_try_tower_structure.yml. Only applicable to Ansible tower.
License:
GNU General Public License v3.0 or later.