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

Commit ceb703d

Browse files
committed
tests: fix hostname domain
Don't add 'example.com' domain if already present. This situation occurs when running again a test without destroying the molecule containers.
1 parent d42084a commit ceb703d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

molecule/_resources/prepare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
hostname:
1111
name: "{{ ansible_nodename }}.example.com"
1212
# using the `hostname` instantiation parameter for Docker, as /etc/hostname cannot be modified
13-
when: ansible_virtualization_type != 'docker'
13+
when: ansible_virtualization_type != 'docker' and 'example.com' not in ansible_fqdn
1414
# may cause TLS issues when downloading packages later
1515
- name: Ensure ca-certificates is up-to-date
1616
package:

0 commit comments

Comments
 (0)