diff --git a/.travis.yml b/.travis.yml index abc583a44f62a169059b177cabed55bfe3ab9183..64732bce0932c1d628d3fdeffe4498e6109dedc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,22 +2,35 @@ language: python python: "2.7" dist: trusty -sudo: false +sudo: True group: beta services: [docker] +env: + - platform: openbsd + driver: vagrant + - platform: xenial + driver: vagrant + - platform: trusty + driver: vagrant + - platform: jessie + 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 3eaaae8941e5820a708043b2e68facc006fec52e..7fd9b38e27a1e7f5bd95bad50f30a5cb9328716c 100644 --- a/molecule.yml +++ b/molecule.yml @@ -13,20 +13,30 @@ vagrant: providers: - name: virtualbox type: virtualbox + options: + cpus: 1 platforms: - name: openbsd - box: kaorimatz/openbsd-6.0-amd64 - - name: debian - box: debian/jessie64 + box: fnichol/openbsd-6.0-i386 + - name: jessie + box: nogajun/jessie32 + - name: xenial + box: ubuntu/xenial32 + - name: trusty + box: ubuntu/trusty32 instances: - name: collectd 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/tests/playbook.yml b/tests/playbook.yml index f3b2396b59b47c334e3447ce2cee3d4f98904a69..136a18255891cf79d341a35acf9e0fc90c1cfcb2 100644 --- a/tests/playbook.yml +++ b/tests/playbook.yml @@ -8,5 +8,5 @@ roles: [debian-bootstrap] - hosts: all - strategy: free - roles: [collectd] + roles: + - role: collectd diff --git a/tests/requirements.txt b/tests/requirements.txt index 2e455727c40eeac3b9f47877c6804f18f894852d..f222e79fb237292bf6403d90bcf0a54a1709f450 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,6 +1,6 @@ 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 piprot==0.9.7