Compare commits

...

1 Commits

Author SHA1 Message Date
Corbin Bartsch
12005e69e9
Add molecule testing 2022-10-09 21:27:10 -04:00
5 changed files with 42 additions and 17 deletions

View File

@ -1,2 +0,0 @@
test:
ansible-playbook test.yaml

View File

@ -0,0 +1,15 @@
---
- name: Converge
hosts: all
tasks:
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
when: ansible_os_family == 'Debian'
- name: Include role
ansible.builtin.include_role:
name: ansible-role-openssh
tasks_from: main

View File

@ -0,0 +1,22 @@
---
dependency:
name: galaxy
enabled: false
driver:
name: docker
lint: |
set -e
yamllint .
ansible-lint
platforms:
- name: instance
image: geerlingguy/docker-debian11-ansible:latest
command: ""
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
priveleged: true
pre_build_image: true
provisioner:
name: ansible
verifier:
name: ansible

View File

@ -0,0 +1,5 @@
---
- name: Verify
hosts: all
tasks:

View File

@ -1,15 +0,0 @@
---
- hosts: 127.0.0.1
vars_files:
- defaults/main.yaml
tasks:
- name: Test Jinja2 templates
check_mode: true
diff: true
ansible.builtin.template:
src: "{{ item }}"
dest: "/tmp/{{ item }}"
with_items:
- templates/sshd_config.j2
- templates/issue.net.j2