Examples about how to use lint

86 views
Skip to first unread message

cmou...@redhat.com

unread,
Jun 19, 2020, 12:20:01 PM6/19/20
to molecule-users
Hi,

The doc is not really helpful & verbose to explain how `lint` can be used and should be configured with molecule 3.
If I use this syntax within the molecule.yml file

---
dependency
:
  name
: galaxy
driver
:
  name
: docker
platforms
:
 
- name: instance
    image
: docker.io/pycontribs/centos:7
    pre_build_image
: true
provisioner
:
  name
: ansible
lint
: "ansible-lint verify-apache.yml"
verifier
:
  name
: ansible


I go this error 

molecule lint
--> Test matrix
   
└── default
   
├── dependency
   
└── lint
   
--> Scenario: 'default'
--> Action: 'dependency'
Skipping, missing the requirements file.
Skipping, missing the requirements file.
--> Scenario: 'default'
--> Action: 'lint'
--> Executing: ansible-lint verify-apache.yml
WARNING
: Couldn't open verify-apache.yml - No such file or directory

Where can we find real and working examples ?

Best 

Charles

Juanje Ojeda Croissier

unread,
Jun 19, 2020, 12:32:36 PM6/19/20
to molecule-users
Hi,

This is the typical config for having the linting working:

lint: |
 
set -e
  yamllint
.
  ansible
-lint

Here you have a working example:

I hope it helps.

Cheers.
Reply all
Reply to author
Forward
0 new messages