2017-10-10 06:03:19 +00:00
language : python
2021-02-24 23:57:12 +00:00
python : 3.8 # "3.8" also works
2021-02-24 21:44:51 +00:00
dist : focal
2021-02-24 22:48:17 +00:00
2021-02-24 23:57:12 +00:00
addons :
apt :
sources :
- sourceline : ppa:ansible/ansible
packages :
- ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible
# - python-pip
2021-02-24 22:48:17 +00:00
2021-02-24 21:57:40 +00:00
install :
2021-02-24 22:37:40 +00:00
# - scripts/ansible # See #2105: fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) due to Travis VM's disk layout/perms being different
2021-02-24 22:12:27 +00:00
# - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections
2021-02-24 23:57:12 +00:00
# - pip install ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible
2021-02-24 22:48:17 +00:00
- ansible-galaxy collection install -r collections.yml # Install ~4 Ansible Collections
- "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg
2021-02-24 22:25:14 +00:00
# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp
2021-02-24 22:48:17 +00:00
# - cat ansible.cfg # UNCOMMENT TO VERIFY!
2017-10-10 06:03:19 +00:00
script :
2021-02-24 21:57:40 +00:00
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check