Skip to content
This repository was archived by the owner on Nov 12, 2020. It is now read-only.

Commit a530f51

Browse files
author
Christian Berendt
committed
molecule: check all types
1 parent 882d57e commit a530f51

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

molecule/default/playbook.yml

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,39 @@
11
---
2-
- name: Playbook for role testing
2+
- name: Playbook for role testing (hosts_type = block)
33
hosts: all
44

55
vars:
66
hosts_group_name: ungrouped
77
hosts_additional_entries:
88
testing.osism.xyz: 127.0.1.1
99
foobar.osism.xyz: 127.0.1.2
10+
hosts_type: block
11+
12+
roles:
13+
- role: ansible-hosts
14+
15+
- name: Playbook for role testing (hosts_type = local)
16+
hosts: all
17+
18+
vars:
19+
hosts_group_name: ungrouped
20+
hosts_additional_entries:
21+
testing.osism.xyz: 127.0.1.1
22+
foobar.osism.xyz: 127.0.1.2
23+
hosts_type: local
24+
25+
roles:
26+
- role: ansible-hosts
27+
28+
- name: Playbook for role testing (hosts_type = template)
29+
hosts: all
30+
31+
vars:
32+
hosts_group_name: ungrouped
33+
hosts_additional_entries:
34+
testing.osism.xyz: 127.0.1.1
35+
foobar.osism.xyz: 127.0.1.2
36+
hosts_type: template
1037

1138
roles:
1239
- role: ansible-hosts

tasks/type-local.yml

+8
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
register: hosts_tempfile
77
delegate_to: localhost
88
run_once: true
9+
tags:
10+
- molecule-idempotence-notest
911

1012
- name: Generate temporary /etc/hosts file
1113
template:
1214
src: "hosts-template.j2"
1315
dest: "{{ hosts_tempfile.path }}"
1416
delegate_to: localhost
1517
run_once: true
18+
tags:
19+
- molecule-idempotence-notest
1620

1721
- name: Copy /etc/hosts file
1822
copy:
@@ -23,10 +27,14 @@
2327
mode: 0644
2428
backup: "{{ hosts_file_backup }}"
2529
become: true
30+
tags:
31+
- molecule-idempotence-notest
2632

2733
- name: Delete temporary file
2834
file:
2935
path: "{{ hosts_tempfile.path }}"
3036
state: absent
3137
delegate_to: localhost
3238
run_once: true
39+
tags:
40+
- molecule-idempotence-notest

0 commit comments

Comments
 (0)