Skip to content
Snippets Groups Projects
Commit 70e3e1a5 authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

Remove usage of external host name.

The name "www.ansible.com" was used as a host, but this required
that DNS forwarding is enabled and configured to test serivces
for hosts that have an IP address but are not host objects in IPA. 
This change set a a host name that lies in the testing domain, and has 
an IP address defined, buth is not added as a host object,
so the forwarding DNS configuration is not needed for this test.
parent 8852fa6e
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# To test against earlier versions, use test_without_skip_host_check.yml. # To test against earlier versions, use test_without_skip_host_check.yml.
# #
# This test define 6 hosts: # This test define 6 hosts:
# - www.ansible.com: a host with a DNS setup (external), not present in IPA # - nohost_fqdn: a host with a DNS setup, not enrolled as a host in IPA.
# - no.idontexist.info: a host without DNS and not present in IPA. # - no.idontexist.info: a host without DNS and not present in IPA.
# - svc.ihavenodns.inf: a host without DNS, but present in IPA. # - svc.ihavenodns.inf: a host without DNS, but present in IPA.
# - svc_fqdn: a host with DNS and present in IPA. # - svc_fqdn: a host with DNS and present in IPA.
...@@ -27,12 +27,21 @@ ...@@ -27,12 +27,21 @@
host1_fqdn: "{{ 'host1.' + ipaserver_domain }}" host1_fqdn: "{{ 'host1.' + ipaserver_domain }}"
host2_fqdn: "{{ 'host2.' + ipaserver_domain }}" host2_fqdn: "{{ 'host2.' + ipaserver_domain }}"
svc_fqdn: "{{ 'svc.' + ipaserver_domain }}" svc_fqdn: "{{ 'svc.' + ipaserver_domain }}"
nohost_fqdn: "{{ 'nohost.' + ipaserver_domain }}"
- name: Remove IP address for "nohost" host.
ipadnsrecord:
ipaadmin_password: SomeADMINpassword
zone_name: "{{ ipaserver_domain }}"
name: nohost
del_all: yes
state: absent
- name: Host absent - name: Host absent
ipahost: ipahost:
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
name: name:
- www.ansible.com - "{{ nohost_fqdn }}"
- no.idontexist.info - no.idontexist.info
- svc.ihavenodns.info - svc.ihavenodns.info
- "{{ host1_fqdn }}" - "{{ host1_fqdn }}"
...@@ -46,6 +55,13 @@ ...@@ -46,6 +55,13 @@
ipv4_prefix: "{{ ansible_default_ipv4.address.split('.')[:-1] | ipv4_prefix: "{{ ansible_default_ipv4.address.split('.')[:-1] |
join('.') }}" join('.') }}"
- name: Add IP address for "nohost" host.
ipadnsrecord:
ipaadmin_password: SomeADMINpassword
zone_name: "{{ ipaserver_domain }}"
name: nohost
a_ip_address: "{{ ipv4_prefix + '.100' }}"
- name: Add hosts for tests. - name: Add hosts for tests.
ipahost: ipahost:
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
...@@ -100,7 +116,7 @@ ...@@ -100,7 +116,7 @@
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
name: name:
- "HTTP/{{ svc_fqdn }}" - "HTTP/{{ svc_fqdn }}"
- HTTP/www.ansible.com - "HTTP/{{ nohost_fqdn }}"
- HTTP/svc.ihavenodns.info - HTTP/svc.ihavenodns.info
- HTTP/no.idontexist.info - HTTP/no.idontexist.info
state: absent state: absent
...@@ -161,7 +177,7 @@ ...@@ -161,7 +177,7 @@
- name: Ensure service is present, without host object. - name: Ensure service is present, without host object.
ipaservice: ipaservice:
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
name: HTTP/www.ansible.com name: "HTTP/{{ nohost_fqdn }}"
skip_host_check: yes skip_host_check: yes
register: result register: result
failed_when: not result.changed failed_when: not result.changed
...@@ -169,7 +185,7 @@ ...@@ -169,7 +185,7 @@
- name: Ensure service is present, without host object, again. - name: Ensure service is present, without host object, again.
ipaservice: ipaservice:
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
name: HTTP/www.ansible.com name: "HTTP/{{ nohost_fqdn }}"
skip_host_check: yes skip_host_check: yes
register: result register: result
failed_when: result.changed failed_when: result.changed
...@@ -522,7 +538,7 @@ ...@@ -522,7 +538,7 @@
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
name: name:
- "HTTP/{{ svc_fqdn }}" - "HTTP/{{ svc_fqdn }}"
- HTTP/www.ansible.com - "HTTP/{{ nohost_fqdn }}"
- HTTP/svc.ihavenodns.info - HTTP/svc.ihavenodns.info
- HTTP/no.idontexist.local - HTTP/no.idontexist.local
continue: yes continue: yes
...@@ -535,7 +551,7 @@ ...@@ -535,7 +551,7 @@
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
name: name:
- "HTTP/{{ svc_fqdn }}" - "HTTP/{{ svc_fqdn }}"
- HTTP/www.ansible.com - "HTTP/{{ nohost_fqdn }}"
- HTTP/svc.ihavenodns.info - HTTP/svc.ihavenodns.info
- HTTP/no.idontexist.local - HTTP/no.idontexist.local
continue: yes continue: yes
...@@ -584,7 +600,7 @@ ...@@ -584,7 +600,7 @@
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
name: name:
- "HTTP/{{ svc_fqdn }}" - "HTTP/{{ svc_fqdn }}"
- HTTP/www.ansible.com - "HTTP/{{ nohost_fqdn }}"
- HTTP/svc.ihavenodns.info - HTTP/svc.ihavenodns.info
- HTTP/no.idontexist.local - HTTP/no.idontexist.local
- "cifs/{{ host1_fqdn }}" - "cifs/{{ host1_fqdn }}"
...@@ -603,7 +619,7 @@ ...@@ -603,7 +619,7 @@
name: name:
- "{{ host1_fqdn }}" - "{{ host1_fqdn }}"
- "{{ host2_fqdn }}" - "{{ host2_fqdn }}"
- www.ansible.com - "{{ nohost_fqdn }}"
- svc.ihavenodns.info - svc.ihavenodns.info
update_dns: no update_dns: no
state: absent state: absent
...@@ -637,3 +653,11 @@ ...@@ -637,3 +653,11 @@
name: name:
- hostgroup02 - hostgroup02
state: absent state: absent
- name: Remove IP address for "nohost" host.
ipadnsrecord:
ipaadmin_password: SomeADMINpassword
zone_name: "{{ ipaserver_domain }}"
name: nohost
del_all: yes
state: absent
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment