diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d65499c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,35 @@ +--- +language: python +services: docker + +env: + global: + - ROLE_NAME: restic + matrix: + - MOLECULE_DISTRO: centos7 + - MOLECULE_DISTRO: centos6 + - MOLECULE_DISTRO: ubuntu1804 + - MOLECULE_DISTRO: debian9 + - MOLECULE_DISTRO: debian10 + +install: + - pip install molecule docker + + - git clone https://github.com/arillso/tests molecule/default/lint + +before_script: + - cd ../ + - mv ansible.$ROLE_NAME projectgroup.$ROLE_NAME + - cd projectgroup.$ROLE_NAME + +script: + - molecule test + +notifications: + webhooks: + urls: + - https://galaxy.ansible.com/api/v1/notifications/ + on_success: always + email: + on_success: never + on_failure: always diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml new file mode 100644 index 0000000..c80c5c6 --- /dev/null +++ b/molecule/default/molecule.yml @@ -0,0 +1,27 @@ +--- +dependency: + name: galaxy +driver: + name: docker +lint: + name: yamllint +platforms: + - name: instance + image: 'geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest' + command: ${MOLECULE_DOCKER_COMMAND:-""} + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro + privileged: true + pre_build_image: true +provisioner: + name: ansible + lint: + name: ansible-lint + playbooks: + converge: ${MOLECULE_PLAYBOOK:-playbook.yml} +scenario: + name: default +verifier: + name: testinfra + lint: + name: flake8 diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml new file mode 100644 index 0000000..d5a32c4 --- /dev/null +++ b/molecule/default/playbook.yml @@ -0,0 +1,5 @@ +--- +- name: Converge + hosts: all + roles: + - role: arillso.restic