Init Commit

This commit is contained in:
2023-03-27 18:39:51 -04:00
parent 1c0bb08c9f
commit c6e5a56ba6
13 changed files with 805 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
{{ template_disclaimer }}
exclude_paths:
- ./ansible_collections
- ./roles
+13
View File
@@ -0,0 +1,13 @@
{{ template_disclaimer }}
[defaults]
# Installs collections into ./ansible_collections/namespace/collection_name
collections_paths = ./
# Installs roles into ./roles/namespace.rolename
roles_path = ./roles
# Use the YAML callback plugin.
stdout_callback = yaml
# Use the stdout_callback when running ad-hoc commands.
bin_ansible_callbacks = True
+35
View File
@@ -0,0 +1,35 @@
---
{{ template_disclaimer }}
# Based on ansible-lint config
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
new-line-at-end-of-file: disable
new-lines:
type: unix
{# TODO Add a way to add ignore files. #}
{# Maybe we want to add roles all the time? #}
{# ignore: | #}
{# roles/** #}
+33
View File
@@ -0,0 +1,33 @@
To run the tests simply run `make test`.
Some of the tests require certain environment variables to be set. `make` will
set the variables for you. In addition you can set the variables in your local
environment by running:
```shell
eval $(make -s env-vars)
```
This role uses molecule for testing. Each molecule test is called a scenario. To
list the scenarios defined for this role run `make list-scenarios`. You can run
a single scenario by running `make test-<scenario name>`.
Some tests rely on an environment variable, `MOLECULE_DOCKER_IMAGES`, to define
the platforms for the test. `MOLECULE_DOCKER_IMAGES` will get set automatically
by `make`, but can also be overridden by the user. `MOLECULE_DOCKER_IMAGES`
should be defined as a space separated list of docker images. The test will be
run all the images defined in `MOLECULE_DOCKER_IMAGES` in parallel. You can
control the parallelism of the test by setting `CONCURRENT_MOLECULE_PLATFORMS`
to the number of platforms you want to test at once. If
`CONCURRENT_MOLECULE_PLATFORMS` is less than the total number of
`MOLECULE_DOCKER_IMAGES` then the test will keep iterating over
`MOLECULE_DOCKER_IMAGES` `CONCURRENT_MOLECULE_PLATFORMS`-at-a-time until all
platforms have been tested.
### Vagrant Tests
All of the vagrant scenarios (tests) in this collection uses libvirt (KVM/QEMU)
for the hypervisor. We are unable to setup a KVM hypervisor in AWS for a
reasonable price. Therefore, if you want to run the vagrant scenarios you must
have access to a KVM hypervisor. In addition, for some of the tests you will
also need access to GitLab and Artifactory which may require the hypervisor be
connected to the AWS VPN.
+9
View File
@@ -0,0 +1,9 @@
# This file was auto-generated by make. Do not edit this file directly!
#
# The following templates were used when creating this file:
{% for template_file in template_files %}
# - {{ template_file }}
{% endfor %}
#
# TODO REM add docs on what file to change for overriding make target or just
# adding new repo specific ones.