Added linting to molecule.
This commit is contained in:
+9
-18
@@ -1,4 +1,6 @@
|
||||
---
|
||||
galaxy_info:
|
||||
|
||||
author: shnee
|
||||
namespace: shnee
|
||||
description: Retrieves the contents of /etc/os-release
|
||||
@@ -6,24 +8,13 @@ galaxy_info:
|
||||
license: GPL-3.0-only
|
||||
min_ansible_version: 2.1
|
||||
|
||||
#
|
||||
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
#
|
||||
# platforms:
|
||||
# - name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 25
|
||||
# - name: SomePlatform
|
||||
# versions:
|
||||
# - all
|
||||
# - 1.0
|
||||
# - 7
|
||||
# - 99.99
|
||||
platforms:
|
||||
- name: EL
|
||||
versions:
|
||||
- 8
|
||||
|
||||
galaxy_tags: []
|
||||
galaxy_tags:
|
||||
- distro
|
||||
- system
|
||||
|
||||
dependencies: []
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: "Include shnee.os_release"
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: "shnee.os_release"
|
||||
|
||||
@@ -3,6 +3,10 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint
|
||||
platforms:
|
||||
- name: centos-8-stream
|
||||
image: quay.io/centos/centos:stream8
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
tasks:
|
||||
|
||||
- name: Is the OS in exp_vals?
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that: exp_vals[ansible_hostname] is defined
|
||||
- name: Verify that os-release matches our expected values.
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that: os_release[item.key] == item.value
|
||||
loop: "{{ exp_vals[ansible_hostname] | dict2items }}"
|
||||
|
||||
@@ -7,4 +7,3 @@
|
||||
os: linux
|
||||
command: cat os-release
|
||||
set_fact: os_release
|
||||
|
||||
|
||||
Reference in New Issue
Block a user