diff --git a/makefile b/makefile deleted file mode 100644 index 83d8b8e..0000000 --- a/makefile +++ /dev/null @@ -1,2 +0,0 @@ -test: - ansible-playbook test.yaml diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml new file mode 100644 index 0000000..b1907c4 --- /dev/null +++ b/molecule/default/converge.yml @@ -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 diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml new file mode 100644 index 0000000..f4a5036 --- /dev/null +++ b/molecule/default/molecule.yml @@ -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 diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml new file mode 100644 index 0000000..3da3081 --- /dev/null +++ b/molecule/default/verify.yml @@ -0,0 +1,5 @@ +--- +- name: Verify + hosts: all + + tasks: diff --git a/test.yaml b/test.yaml deleted file mode 100644 index ef7f5f7..0000000 --- a/test.yaml +++ /dev/null @@ -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