diff --git a/.travis.yml b/.travis.yml index abc583a44f62a169059b177cabed55bfe3ab9183..17e77d2cb0d93e734ee561f45b448d4c31ed65dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,49 @@ --- language: python -python: "2.7" +python: ["2.7", "3.5"] dist: trusty -sudo: false +sudo: True group: beta services: [docker] +env: + - platform: openbsd60 + driver: vagrant + - platform: openbsd59 + driver: vagrant + - platform: xenial + driver: vagrant + - platform: trusty + driver: vagrant + - platform: jessie + driver: vagrant + - platform: wheezy + driver: vagrant + - driver: docker + platform: all +matrix: + fast_finish: True + allow_failures: + - python: "3.5" + - env: platform=openbsd59 driver=vagrant + - env: platform=jessie driver=vagrant + - env: platform=wheezy driver=vagrant cache: - pip - directories: - $HOME/.pre-commit install: + - sudo apt-get update + - sudo apt-get install -y linux-headers-$(uname -r) virtualbox + - wget https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb + - sudo dpkg -i vagrant_1.9.1_x86_64.deb - pip install -r tests/requirements.txt | cat - ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles - molecule dependency script: - pre-commit run --all-files - - molecule test --driver docker + - molecule test --driver $driver --platform $platform notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/molecule.yml b/molecule.yml index 792e63098a7ab31421eaf2c9acc299cced8f45fc..76623fbf0525766456018a351b90a1f0c96eeaeb 100644 --- a/molecule.yml +++ b/molecule.yml @@ -13,20 +13,34 @@ vagrant: providers: - name: virtualbox type: virtualbox + options: + cpus: 1 platforms: - - name: openbsd - box: kaorimatz/openbsd-6.0-amd64 + - name: openbsd60 + box: fnichol/openbsd-6.0-i386 + - name: openbsd59 + box: fnichol/openbsd-5.9-i386 - name: xenial - box: ubuntu/xenial64 + box: ubuntu/xenial32 + - name: trusty + box: ubuntu/trusty32 + - name: jessie + box: debian/jessie32 + - name: wheezy + box: debian/wheezy32 instances: - name: example options: append_platform_to_hostname: yes raw_config_args: - 'vm.synced_folder ".", "/vagrant", disabled: true' - - 'vbguest.auto_update = false' - - 'landrush.enabled = false' - - 'landrush_ip.override = false' + - 'vbguest.auto_update = false if Vagrant.has_plugin?("vbguest")' + - 'landrush.enabled = false if Vagrant.has_plugin?("landrush")' + - 'landrush_ip.override = false if Vagrant.has_plugin?("landrush")' + - | + vm.provider "virtualbox" do |v| + v.customize "pre-boot", ["modifyvm", :id, "--hwvirtex", "off"] + end docker: containers: diff --git a/tasks/main.yml b/tasks/main.yml index 6784821deee6cb0db41de18ee53b6e04ce43ea01..811069eb5756ec0c7b051652b35347bd1ecc804a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,4 +5,4 @@ assert: that: - ansible_os_family in ['OpenBSD', 'Debian'] - - ansible_distribution_release in ['6.0', 'xenial'] + - ansible_distribution_release in ['6.0', '5.9', 'xenial', 'trusty', 'jessie', 'wheezy'] diff --git a/tests/playbook.yml b/tests/playbook.yml index aa08159b36b209253114a1a10d70493d1af78b75..10beeb2eec9f631d1daabcb1aa0e1dd0121821cc 100644 --- a/tests/playbook.yml +++ b/tests/playbook.yml @@ -1,5 +1,5 @@ --- -- hosts: example-openbsd +- hosts: example-openbsd* gather_facts: false roles: [openbsd-bootstrap] @@ -8,6 +8,5 @@ roles: [debian-bootstrap] - hosts: all - strategy: free roles: - role: example diff --git a/tests/requirements.txt b/tests/requirements.txt index 2e455727c40eeac3b9f47877c6804f18f894852d..1c8ea361c0af0ec637c22c71f1acdb9cd22295a0 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,8 +1,8 @@ ansible==2.2.0.0 -testinfra==1.4.5 -molecule==1.17.0 +testinfra==1.5.1 +molecule==1.17.3 ansible-lint==3.4.9 -pre-commit==0.9.4 +pre-commit==0.10.1 piprot==0.9.7 python-vagrant==0.5.14 docker-py==1.10.6