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

Commit c50ee85

Browse files
author
Christian Berendt
committedJul 23, 2020
molecule: check all types
Signed-off-by: Christian Berendt <berendt@betacloud-solutions.de>
1 parent 2a443c5 commit c50ee85

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed
 

‎molecule/default/converge.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

+4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
register: hosts_tempfile
77
delegate_to: localhost
88
run_once: true
9+
tags: molecule-idempotence-notest
910

1011
- name: Generate temporary /etc/hosts file
1112
template:
1213
src: "hosts-template.j2"
1314
dest: "{{ hosts_tempfile.path }}"
1415
delegate_to: localhost
1516
run_once: true
17+
tags: molecule-idempotence-notest
1618

1719
- name: Copy /etc/hosts file
1820
copy:
@@ -23,10 +25,12 @@
2325
mode: 0644
2426
backup: "{{ hosts_file_backup }}"
2527
become: true
28+
tags: molecule-idempotence-notest
2629

2730
- name: Delete temporary file
2831
file:
2932
path: "{{ hosts_tempfile.path }}"
3033
state: absent
3134
delegate_to: localhost
3235
run_once: true
36+
tags: molecule-idempotence-notest

0 commit comments

Comments
 (0)
This repository has been archived.