diff --git a/.travis.yml b/.travis.yml index abc583a44f62a169059b177cabed55bfe3ab9183..6d0871ade1fcce1799fb043b0bd0b05235e5be44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,48 @@ --- 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 + - &openbsd59 platform=openbsd59 driver=vagrant + - &openbsd56 platform=openbsd56 driver=vagrant + - platform: xenial + driver: vagrant + - platform: trusty + driver: vagrant + - &jessie platform=jessie driver=vagrant + - &wheezy platform=wheezy driver=vagrant + - driver: docker + platform: all +matrix: + fast_finish: True + allow_failures: + - python: "3.5" + - env: *openbsd59 + - env: *openbsd56 + - env: *jessie + - env: *wheezy 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/ansible.cfg b/ansible.cfg index 905e3c64897217cd1b88acde10920ae04c7c6011..a33a906b7db5fa209df2b129eff0b36c42f661d9 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -2,7 +2,7 @@ library = library host_key_checking = False retry_files_enabled = False -roles_path = .molecule/roles:.molecule/../roles:../:../../ +roles_path = ../:.molecule/roles:.molecule/../roles:../../ command_warnings = True deprecation_warnings = True callback_whitelist = profile_tasks diff --git a/molecule.yml b/molecule.yml index a2af594dd3d13e531648d35338d0dc367765f2f1..b1668715282687959265344aa060e5696d3eeba0 100644 --- a/molecule.yml +++ b/molecule.yml @@ -13,30 +13,38 @@ vagrant: providers: - name: virtualbox type: virtualbox + options: + cpus: 1 platforms: - name: openbsd56 box: tmatilai/openbsd-5.6 - name: openbsd60 - box: kaorimatz/openbsd-6.0-amd64 - - name: precise - box: hashicorp/precise64 - - name: trusty - box: ubuntu/trusty64 + box: fnichol/openbsd-6.0-i386 + - name: openbsd59 + box: fnichol/openbsd-5.9-i386 - name: xenial - box: ubuntu/xenial64 - - name: wheezy - box: debian/wheezy64 + box: ubuntu/xenial32 + - name: trusty + box: ubuntu/trusty32 - name: jessie - box: debian/jessie64 + box: debian/jessie32 + - name: wheezy + box: debian/wheezy32 + - name: precise + box: hashicorp/precise32 instances: - name: python27 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 24742f699c992b5511d0ebc0cb78eacbd95390f8..3996704310ebcb11507be3538fc521c86a389c23 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,6 @@ --- # tasks file for python27 + - name: Assertions assert: that: diff --git a/tests/playbook.yml b/tests/playbook.yml index 74e9206244d054dd2ddc98e9998feba2bb52ad6c..af0ea5725a8a79182b3a87e8e80778237e4cb79b 100644 --- a/tests/playbook.yml +++ b/tests/playbook.yml @@ -1,13 +1,12 @@ --- - hosts: python27-openbsd* gather_facts: False - roles: [adarnimrod.openbsd-bootstrap] + roles: [openbsd-bootstrap] - hosts: python27-xenial gather_facts: False - roles: [adarnimrod.debian-bootstrap] + roles: [debian-bootstrap] - hosts: all - strategy: free roles: - role: python27 diff --git a/tests/requirements.txt b/tests/requirements.txt index 70cb7661036d9bd7cc73bfb2f4f8978edce7ea4c..1c8ea361c0af0ec637c22c71f1acdb9cd22295a0 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,8 +1,11 @@ ansible==2.2.0.0 -testinfra==1.4.5 -molecule==1.16.1 -ansible-lint==3.4.8 -pre-commit==0.9.4 +testinfra==1.5.1 +molecule==1.17.3 +ansible-lint==3.4.9 +pre-commit==0.10.1 piprot==0.9.7 python-vagrant==0.5.14 docker-py==1.10.6 +netaddr==0.7.18 +passlib==1.7.0 +bcrypt==3.1.2 diff --git a/tests/requirements.yml b/tests/requirements.yml index cdc294cd67e8c5b70eed5178580e6edde25e10bb..70716f60b9e624bc5a09442517a08667363949f4 100644 --- a/tests/requirements.yml +++ b/tests/requirements.yml @@ -1,3 +1,5 @@ --- - src: adarnimrod.openbsd-bootstrap + name: openbsd-bootstrap - src: adarnimrod.debian-bootstrap + name: debian-bootstrap