Browse Source

Update molecule configuration to work with 3.0.

pull/195/head
Jeff Geerling 3 years ago
parent
commit
762500858b
  1. 2
      .travis.yml
  2. 13
      molecule/default/molecule.yml
  3. 19
      molecule/default/playbook.yml
  4. 6
      molecule/default/yaml-lint.yml

2
.travis.yml

@ -13,7 +13,7 @@ env:
install:
# Install test dependencies.
- pip install molecule docker
- pip install molecule yamllint ansible-lint docker
before_script:
# Use actual Ansible Galaxy role name for the project directory.

13
molecule/default/molecule.yml

@ -4,9 +4,8 @@ dependency:
driver:
name: docker
lint:
name: yamllint
options:
config-file: molecule/default/yaml-lint.yml
yamllint .
ansible-lint
platforms:
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
@ -17,13 +16,7 @@ platforms:
pre_build_image: true
provisioner:
name: ansible
lint:
name: ansible-lint
playbooks:
converge: ${MOLECULE_PLAYBOOK:-playbook.yml}
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
scenario:
name: default
verifier:
name: testinfra
lint:
name: flake8

19
molecule/default/playbook.yml

@ -1,19 +0,0 @@
---
- name: Converge
hosts: all
vars:
nginx_use_ppa: true
nginx_remove_default_vhost: true
nginx_vhosts:
- server_name: "test.dev"
root: "/var/www/test"
pre_tasks:
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == 'Debian'
changed_when: false
roles:
- role: geerlingguy.nginx

6
molecule/default/yaml-lint.yml

@ -1,6 +0,0 @@
---
extends: default
rules:
line-length:
max: 120
level: warning