FOSDEM / infrastructure

Infrastructure used during the conference
Other
54 stars 22 forks source link

Implement CI tests for ansible #197

Open SuperQ opened 5 years ago

SuperQ commented 5 years ago

Some CI testing suggestions from @paulfantom

ansible-lint -x ANSIBLE0006,ANSIBLE0010,ANSIBLE0013,ANSIBLE0016 ansible/playbooks/site.yml
ansible-playbook -i hosts ansible/playbooks/site.yml

And after conference it could be expanded to have better coverage (maybe based on molecule). Note: Second command needs to decrypt secrets.yml and that's why I suggest to use travis as they have a good policy around such things.

paulfantom commented 5 years ago

Ansible needs to know all variables before running playbooks and tests. This means either: 1) decrypting secrets.yml before running tests suite 2) creating fake, unencrypted secrets.yml files for testing

Just to be on a safe side I would recommend going with second option.

SuperQ commented 5 years ago

CI is enabled, and our first test is a simple run of yamllint. https://github.com/FOSDEM/infrastructure/pull/215

SuperQ commented 5 years ago

Added the ansible-lint testing here: https://github.com/FOSDEM/infrastructure/pull/218.