Ansible role. Install and configure Ansible Runner.
Documentation at readthedocs.io
Feel free to share your feedback and report issues.
This role has been developed and tested with
- vbotka.ansible_lib
- community.general
- See default variables in defaults/main.yml
- See OS specific default variables in vars/defaults/
- See examples in vars/main.yml.samples
- Put OS specific custom variables into the directory vars/
- See the precedence of the variables in /tasks/vars.yml
- See tasks/pkg.yml. The OS specific packages will be installed if you set
ar_pkg_install: true
ar_pip_install: false
ar_venv_install: false
- See tasks/pip.yml. Instead, you can use pip to install ansible-runner
ar_pkg_install: false
ar_pip_install: true
ar_venv_install: false
- When installing by pip, set variable ar_owner to the user who will own the packages. For example,
ar_owner: admin
When undefined, not escalated setup (become=false) will gather subset user and the variable ar_owner will be set. See tasks/vars.yml
ar_owner: "{{ ansible_user | default(ansible_user_id) }}"
The pip installation task will run
become_user: "{{ ar_owner }}"
become: true
pip:
name: ...
By default the pip arguments are set
ar_pip_extraagrs: --user --upgrade
See Conclusions. The pip module isn't always idempotent #28952:
Managing system site-packages with Pip is not a good idea and will probably break your OS. Those should be solely managed by the OS package manager (apt/yum/dnf/etc.). If you want to manage env for some software in Python, better use a virtualenv technology.
- See tasks/venv.yml. Optionally, you can use pip to install ansible-runner in Python virtual environment
ar_pkg_install: false
ar_pip_install: false
ar_venv_install: true
Use the configuration file .ansible-lint.local when running ansible-lint. Some rules might be disabled and some warnings might be ignored. See the notes in the configuration file.
shell> ansible-lint -c .ansible-lint.local