mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.0 KiB
YAML
85 lines
2.0 KiB
YAML
- name: cleanup the parent object
|
|
nios_zone:
|
|
name: ansible.com
|
|
state: absent
|
|
provider: "{{ nios_provider }}"
|
|
|
|
- name: create the parent object
|
|
nios_zone:
|
|
name: ansible.com
|
|
state: present
|
|
provider: "{{ nios_provider }}"
|
|
|
|
- name: cleanup mx record
|
|
nios_mx_record:
|
|
name: ansible.com
|
|
mx: mailhost.ansible.com
|
|
preference: 0
|
|
state: absent
|
|
provider: "{{ nios_provider }}"
|
|
|
|
- name: create an mx record
|
|
nios_mx_record:
|
|
name: ansible.com
|
|
mx: mailhost.ansible.com
|
|
preference: 0
|
|
state: present
|
|
provider: "{{ nios_provider }}"
|
|
register: mx_record_create1
|
|
|
|
- name: recreate an mx record
|
|
nios_mx_record:
|
|
name: ansible.com
|
|
mx: mailhost.ansible.com
|
|
preference: 0
|
|
state: present
|
|
provider: "{{ nios_provider }}"
|
|
register: mx_record_create2
|
|
|
|
- name: add a comment to an existing mx record
|
|
nios_mx_record:
|
|
name: ansible.com
|
|
mx: mailhost.ansible.com
|
|
preference: 0
|
|
comment: this is a test comment
|
|
state: present
|
|
provider: "{{ nios_provider }}"
|
|
register: mx_record_update1
|
|
|
|
- name: add a comment to an existing mx record
|
|
nios_mx_record:
|
|
name: ansible.com
|
|
mx: mailhost.ansible.com
|
|
preference: 0
|
|
comment: this is a test comment
|
|
state: present
|
|
provider: "{{ nios_provider }}"
|
|
register: mx_record_update2
|
|
|
|
- name: remove a mx record from the system
|
|
nios_mx_record:
|
|
name: ansible.com
|
|
mx: mailhost.ansible.com
|
|
preference: 0
|
|
state: absent
|
|
provider: "{{ nios_provider }}"
|
|
register: mx_record_delete1
|
|
|
|
- name: remove a mx record from the system
|
|
nios_mx_record:
|
|
name: ansible.com
|
|
mx: mailhost.ansible.com
|
|
preference: 0
|
|
state: absent
|
|
provider: "{{ nios_provider }}"
|
|
register: mx_record_delete2
|
|
|
|
- assert:
|
|
that:
|
|
- "mx_record_create1.changed"
|
|
- "not mx_record_create2.changed"
|
|
- "mx_record_update1.changed"
|
|
- "not mx_record_update2.changed"
|
|
- "mx_record_delete1.changed"
|
|
- "not mx_record_delete2.changed"
|