mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-08 06:13:21 +00:00
Fix ansible-lint E502 for test playbooks.
This patch adds 'name' to all test playbook tasks that did not have it, fixing ansible-lint's error 'unnamed-task'.
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||
register: previousconfig
|
||||
|
||||
- debug:
|
||||
- name: Display current configuration.
|
||||
debug:
|
||||
var: previousconfig
|
||||
|
||||
# setup environment.
|
||||
@@ -478,7 +479,8 @@
|
||||
ca_renewal_master_server: '{{ previousconfig.config.ca_renewal_master_server | default(omit) }}'
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- name: "CA-Renewal server warning."
|
||||
debug:
|
||||
msg: "Due to a test failure, IPA CA-Renewal Server might not be correctly be set. Check your configuration."
|
||||
|
||||
always:
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
register: ipahost
|
||||
failed_when: not ipahost.changed or ipahost.failed
|
||||
|
||||
- assert:
|
||||
- name: Assert ipahost.host.randompassword is defined.
|
||||
assert:
|
||||
that:
|
||||
- ipahost.host.randompassword is defined
|
||||
|
||||
@@ -62,7 +63,8 @@
|
||||
register: ipahost
|
||||
failed_when: not ipahost.changed or ipahost.failed
|
||||
|
||||
- assert:
|
||||
- name: Assert randompassword is defined for host1 and host2.
|
||||
assert:
|
||||
that:
|
||||
- ipahost.host["{{ host1_fqdn }}"].randompassword is
|
||||
defined
|
||||
@@ -87,7 +89,8 @@
|
||||
register: ipahost
|
||||
failed_when: ipahost.changed or not ipahost.failed
|
||||
|
||||
- assert:
|
||||
- name: Assert randompassword is not defined for 'ansible_fqdn'.
|
||||
assert:
|
||||
that:
|
||||
- ipahost.host["{{ ansible_facts['fqdn'] }}"].randompassword is
|
||||
not defined
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
- name: Ensure DNS zone is present with multiple forwarders
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 04testzone.test
|
||||
forwarders:
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
- name: Ensure DNS zone is present without forwarders
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 01testzone.test
|
||||
forwarders: []
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
- name: Ensure multiple DNS are absent
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: delzone1.com,delzone2.com,delzone3.com
|
||||
state: absent
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
- name: Ensure DNS zone is disabled
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 26testzone.test
|
||||
state: disabled
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
- name: Ensure DNS zone is enabled
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 26testzone.test
|
||||
state: enabled
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
- name: Test adding a DNS zone with an invalid forwarder
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: invalidzone.test
|
||||
forwarders:
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
- name: Test adding a DNS zone with an invalid serial
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: invalidserialzone.test
|
||||
serial: 429496729599
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
- name: Ensure a reverse DNS Zone with name inferred form an IP address
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name_from_ip: 192.8.2.0/22
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
- name: Ensure DNS Zone is present with forward policy `only`
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 26testzone.test
|
||||
forward_policy: only
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
- name: Include users.json
|
||||
include_vars:
|
||||
file: users.json
|
||||
- debug:
|
||||
- name: Size of users slice.
|
||||
debug:
|
||||
msg: "{{ users | length }}"
|
||||
- name: Users present
|
||||
ipauser:
|
||||
|
||||
Reference in New Issue
Block a user