Browse Source

fix: fix formatting

master
Robert Kaussow 1 year ago
parent
commit
cfd0598068
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
  1. 4
      {{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/requirements.yml
  2. 6
      {{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/create.yml
  3. 6
      {{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/destroy.yml
  4. 2
      {{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/molecule.yml
  5. 6
      {{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/tests/test_default.py

4
{{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/requirements.yml

@ -1,4 +1,6 @@
---
collections:
- name: https://gitea.rknet.org/ansible/xoxys.general/releases/download/v1.2.0/xoxys-general-1.2.0.tar.gz
- name: https://gitea.rknet.org/ansible/xoxys.general/releases/download/v2.1.1/xoxys-general-2.1.1.tar.gz
- name: community.general
roles: []

6
{{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/create.yml

@ -1,4 +1,4 @@
{% raw %}
{%- raw -%}
---
- name: Create
hosts: localhost
@ -104,7 +104,7 @@
content: |
# Molecule managed
{{ instance_conf | to_json | from_json | to_yaml }}
{{ instance_conf | to_nice_yaml(indent=2) }}
dest: "{{ molecule_instance_config }}"
when: server.changed | bool
@ -119,4 +119,4 @@
- name: Wait for VM to settle down
pause:
seconds: 30
{% endraw %}
{%- endraw -%}

6
{{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/destroy.yml

@ -1,4 +1,4 @@
{% raw %}
{%- raw -%}
---
- name: Destroy
hosts: localhost
@ -74,7 +74,7 @@
content: |
# Molecule managed
{{ instance_conf | to_json | from_json | to_yaml }}
{{ instance_conf | to_nice_yaml(indent=2) }}
dest: "{{ molecule_instance_config }}"
when: server.changed | bool
{% endraw %}
{%- endraw -%}

2
{{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/molecule.yml

@ -3,6 +3,7 @@ dependency:
name: galaxy
options:
role-file: molecule/requirements.yml
requirements-file: molecule/requirements.yml
env:
ANSIBLE_GALAXY_DISPLAY_PROGRESS: "false"
driver:
@ -18,5 +19,6 @@ provisioner:
env:
ANSIBLE_FILTER_PLUGINS: ${ANSIBLE_FILTER_PLUGINS:-./plugins/filter}
ANSIBLE_LIBRARY: ${ANSIBLE_LIBRARY:-./library}
log: False
verifier:
name: testinfra

6
{{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/tests/test_default.py

@ -1,11 +1,9 @@
import os
import warnings
import testinfra.utils.ansible_runner
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
os.environ["MOLECULE_INVENTORY_FILE"]).get_hosts("all")

Loading…
Cancel
Save