mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 11:38:47 +00:00
Add more role tests
This commit is contained in:
parent
4bf13d78fe
commit
10b69f33f0
44 changed files with 586 additions and 0 deletions
6
roles/cloudcmd/molecule/default/molecule.yml
Normal file
6
roles/cloudcmd/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
cloudcmd_enabled: true
|
10
roles/cloudcmd/molecule/default/side_effect.yml
Normal file
10
roles/cloudcmd/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
cloudcmd_enabled: false
|
18
roles/cloudcmd/molecule/default/verify.yml
Normal file
18
roles/cloudcmd/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ cloudcmd_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Cloudcmd is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/cloudcmd/molecule/default/verify_stopped.yml
Normal file
18
roles/cloudcmd/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Cloudcmd
|
||||||
|
docker_container:
|
||||||
|
name: "{{ cloudcmd_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Cloudcmd is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/cloudflare_ddns/molecule/default/molecule.yml
Normal file
6
roles/cloudflare_ddns/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
cloudflare_ddns_enabled: true
|
10
roles/cloudflare_ddns/molecule/default/side_effect.yml
Normal file
10
roles/cloudflare_ddns/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
cloudflare_ddns_enabled: false
|
18
roles/cloudflare_ddns/molecule/default/verify.yml
Normal file
18
roles/cloudflare_ddns/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ cloudflare_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Cloudflare DDNS is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/cloudflare_ddns/molecule/default/verify_stopped.yml
Normal file
18
roles/cloudflare_ddns/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Cloudflare DDNS
|
||||||
|
docker_container:
|
||||||
|
name: "{{ cloudflare_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Cloudflare DDNS is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/code-server/molecule/default/molecule.yml
Normal file
6
roles/code-server/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
code_server_enabled: true
|
10
roles/code-server/molecule/default/side_effect.yml
Normal file
10
roles/code-server/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
code_server_enabled: false
|
18
roles/code-server/molecule/default/verify.yml
Normal file
18
roles/code-server/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ code_server_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Code Server is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/code-server/molecule/default/verify_stopped.yml
Normal file
18
roles/code-server/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Code Server
|
||||||
|
docker_container:
|
||||||
|
name: "{{ code_server_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Code Server is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/couchpotato/molecule/default/molecule.yml
Normal file
6
roles/couchpotato/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
couchpotato_enabled: true
|
10
roles/couchpotato/molecule/default/side_effect.yml
Normal file
10
roles/couchpotato/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
couchpotato_enabled: false
|
18
roles/couchpotato/molecule/default/verify.yml
Normal file
18
roles/couchpotato/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ couchpotato_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Couchpotato is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/couchpotato/molecule/default/verify_stopped.yml
Normal file
18
roles/couchpotato/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Couchpotato
|
||||||
|
docker_container:
|
||||||
|
name: "{{ couchpotato_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Couchpotato is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/dashy/molecule/default/molecule.yml
Normal file
6
roles/dashy/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
dashy_enabled: true
|
10
roles/dashy/molecule/default/side_effect.yml
Normal file
10
roles/dashy/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
dashy_enabled: false
|
18
roles/dashy/molecule/default/verify.yml
Normal file
18
roles/dashy/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ dashy_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Dashy is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/dashy/molecule/default/verify_stopped.yml
Normal file
18
roles/dashy/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Dashy
|
||||||
|
docker_container:
|
||||||
|
name: "{{ dashy_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Dashy is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/deluge/molecule/default/molecule.yml
Normal file
6
roles/deluge/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
deluge_enabled: true
|
10
roles/deluge/molecule/default/side_effect.yml
Normal file
10
roles/deluge/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
deluge_enabled: false
|
18
roles/deluge/molecule/default/verify.yml
Normal file
18
roles/deluge/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ deluge_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Deluge is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/deluge/molecule/default/verify_stopped.yml
Normal file
18
roles/deluge/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Deluge
|
||||||
|
docker_container:
|
||||||
|
name: "{{ deluge_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Deluge is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/dokuwiki/molecule/default/molecule.yml
Normal file
6
roles/dokuwiki/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
dokuwiki_enabled: true
|
10
roles/dokuwiki/molecule/default/side_effect.yml
Normal file
10
roles/dokuwiki/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
dokuwiki_enabled: false
|
18
roles/dokuwiki/molecule/default/verify.yml
Normal file
18
roles/dokuwiki/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ dokuwiki_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Dokuwiki is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/dokuwiki/molecule/default/verify_stopped.yml
Normal file
18
roles/dokuwiki/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Dokuwiki
|
||||||
|
docker_container:
|
||||||
|
name: "{{ dokuwiki_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Dokuwiki is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/duplicacy/molecule/default/molecule.yml
Normal file
6
roles/duplicacy/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
duplicacy_enabled: true
|
10
roles/duplicacy/molecule/default/side_effect.yml
Normal file
10
roles/duplicacy/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
duplicacy_enabled: false
|
18
roles/duplicacy/molecule/default/verify.yml
Normal file
18
roles/duplicacy/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ duplicacy_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Duplicacy is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/duplicacy/molecule/default/verify_stopped.yml
Normal file
18
roles/duplicacy/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Duplicacy
|
||||||
|
docker_container:
|
||||||
|
name: "{{ duplicacy_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Duplicacy is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/emby/molecule/default/molecule.yml
Normal file
6
roles/emby/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
emby_enabled: true
|
10
roles/emby/molecule/default/side_effect.yml
Normal file
10
roles/emby/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
emby_enabled: false
|
18
roles/emby/molecule/default/verify.yml
Normal file
18
roles/emby/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ emby_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Emby is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/emby/molecule/default/verify_stopped.yml
Normal file
18
roles/emby/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Emby
|
||||||
|
docker_container:
|
||||||
|
name: "{{ emby_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check Emby is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/esphome/molecule/default/molecule.yml
Normal file
6
roles/esphome/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
esphome_enabled: true
|
10
roles/esphome/molecule/default/side_effect.yml
Normal file
10
roles/esphome/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
esphome_enabled: false
|
18
roles/esphome/molecule/default/verify.yml
Normal file
18
roles/esphome/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ esphome_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check EspHome is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
18
roles/esphome/molecule/default/verify_stopped.yml
Normal file
18
roles/esphome/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove EspHome
|
||||||
|
docker_container:
|
||||||
|
name: "{{ esphome_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Check EspHome is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
6
roles/firefly/molecule/default/molecule.yml
Normal file
6
roles/firefly/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
firefly_enabled: true
|
10
roles/firefly/molecule/default/side_effect.yml
Normal file
10
roles/firefly/molecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Stop
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||||
|
include_role:
|
||||||
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||||
|
vars:
|
||||||
|
firefly_enabled: false
|
25
roles/firefly/molecule/default/verify.yml
Normal file
25
roles/firefly/molecule/default/verify.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ firefly_container_name }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Get container state
|
||||||
|
docker_container_info:
|
||||||
|
name: "{{ firefly_mysql_container_name }}"
|
||||||
|
register: result_mysql
|
||||||
|
|
||||||
|
- name: Check Firefly is running
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.container['State']['Status'] == "running"
|
||||||
|
- result.container['State']['Restarting'] == false
|
||||||
|
- result_mysql.container['State']['Status'] == "running"
|
||||||
|
- result_mysql.container['State']['Restarting'] == false
|
25
roles/firefly/molecule/default/verify_stopped.yml
Normal file
25
roles/firefly/molecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- include_vars:
|
||||||
|
file: ../../defaults/main.yml
|
||||||
|
|
||||||
|
- name: Try and stop and remove Firefly
|
||||||
|
docker_container:
|
||||||
|
name: "{{ firefly_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Try and stop and remove Firefly MySql
|
||||||
|
docker_container:
|
||||||
|
name: "{{ firefly_mysql_container_name }}"
|
||||||
|
state: absent
|
||||||
|
register: result_mysql
|
||||||
|
|
||||||
|
- name: Check Firefly is stopped
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not result.changed
|
||||||
|
- not result_mysql.changed
|
Loading…
Reference in a new issue