Skip to content

Commit

Permalink
Assert new values.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Jan 31, 2021
1 parent 209b104 commit e0a1b86
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ This example is taken from `molecule/resources/converge.yml` and is tested on ea
documentroot: /var/www/html/www1.example.com
- name: backend_http
servername: www2.example.com
serveralias:
- example.com
- special.com
backend_url: "http://www.example.com/"
serveralias:
- example.com
Expand Down
3 changes: 3 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
- name: backend_http
servername: www2.example.com
backend_url: "http://www.example.com/"
serveralias:
- example.com
- www.example.com
- name: remote
servername: www3.example.com
remote: "http://localhost:3128/"
Expand Down
12 changes: 12 additions & 0 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,15 @@
label: "{{ item.name }}"
when:
- httpd_vhosts is defined

- name: test if item.serveralias in httpd_vhosts is set correctly
assert:
that:
- item.serveralias is iterable
quiet: yes
loop: "{{ httpd_vhosts }}"
loop_control:
label: "{{ item.name }}"
when:
- httpd_vhosts is defined
- item.serveralias is defined

0 comments on commit e0a1b86

Please sign in to comment.