mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Normalize bools in tests (#5996)
* Normalize bools in tests. * Fix typo.
This commit is contained in:
parent
4c4ef80ca9
commit
24efe9ee9a
182 changed files with 770 additions and 770 deletions
|
@ -47,13 +47,13 @@
|
||||||
- name: Put vscsi1 and children devices in Defined state.
|
- name: Put vscsi1 and children devices in Defined state.
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: vscsi1
|
device: vscsi1
|
||||||
recursive: yes
|
recursive: true
|
||||||
state: defined
|
state: defined
|
||||||
|
|
||||||
- name: Removes vscsi1 and children devices.
|
- name: Removes vscsi1 and children devices.
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: vscsi1
|
device: vscsi1
|
||||||
recursive: yes
|
recursive: true
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Changes en1 mtu to 9000 and disables arp.
|
- name: Changes en1 mtu to 9000 and disables arp.
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
- name: Remove NFS filesystem /home/ftp
|
- name: Remove NFS filesystem /home/ftp
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /home/ftp
|
filesystem: /home/ftp
|
||||||
rm_mount_point: yes
|
rm_mount_point: true
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Mount filesystem /newfs
|
- name: Mount filesystem /newfs
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
- name: Remove mounted /newfs
|
- name: Remove mounted /newfs
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /newfs
|
filesystem: /newfs
|
||||||
rm_mount_point: yes
|
rm_mount_point: true
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Umount /newfs
|
- name: Umount /newfs
|
||||||
|
@ -126,5 +126,5 @@
|
||||||
- name: Remove /newfs
|
- name: Remove /newfs
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /newfs
|
filesystem: /newfs
|
||||||
rm_mount_point: yes
|
rm_mount_point: true
|
||||||
state: absent
|
state: absent
|
||||||
|
|
|
@ -78,8 +78,8 @@
|
||||||
homebrew:
|
homebrew:
|
||||||
name: xz
|
name: xz
|
||||||
state: present
|
state: present
|
||||||
update_homebrew: no
|
update_homebrew: false
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
# Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a
|
# Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a
|
||||||
# proper solution can be found
|
# proper solution can be found
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
src: /nowhere
|
src: /nowhere
|
||||||
dest: "{{ remote_tmp_dir }}/nowhere.txt"
|
dest: "{{ remote_tmp_dir }}/nowhere.txt"
|
||||||
state: link
|
state: link
|
||||||
force: yes
|
force: true
|
||||||
|
|
||||||
- name: Archive - broken link ({{ format }})
|
- name: Archive - broken link ({{ format }})
|
||||||
archive:
|
archive:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
path: "{{ remote_tmp_dir }}/*.txt"
|
path: "{{ remote_tmp_dir }}/*.txt"
|
||||||
dest: "{{ remote_tmp_dir }}/archive_remove_source_files.{{ format }}"
|
dest: "{{ remote_tmp_dir }}/archive_remove_source_files.{{ format }}"
|
||||||
format: "{{ format }}"
|
format: "{{ format }}"
|
||||||
remove: yes
|
remove: true
|
||||||
register: archive_remove_source_files
|
register: archive_remove_source_files
|
||||||
|
|
||||||
- name: Verify archive exists - remove source files ({{ format }})
|
- name: Verify archive exists - remove source files ({{ format }})
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
path: "{{ remote_tmp_dir }}/tmpdir"
|
path: "{{ remote_tmp_dir }}/tmpdir"
|
||||||
dest: "{{ remote_tmp_dir }}/archive_remove_source_directory.{{ format }}"
|
dest: "{{ remote_tmp_dir }}/archive_remove_source_directory.{{ format }}"
|
||||||
format: "{{ format }}"
|
format: "{{ format }}"
|
||||||
remove: yes
|
remove: true
|
||||||
register: archive_remove_source_directory
|
register: archive_remove_source_directory
|
||||||
|
|
||||||
- name: Verify archive exists - remove source directory ({{ format }})
|
- name: Verify archive exists - remove source directory ({{ format }})
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
path: "{{ remote_tmp_dir }}/tmpdir/*"
|
path: "{{ remote_tmp_dir }}/tmpdir/*"
|
||||||
dest: "{{ remote_tmp_dir }}/archive_remove_source_excluding_path.{{ format }}"
|
dest: "{{ remote_tmp_dir }}/archive_remove_source_excluding_path.{{ format }}"
|
||||||
format: "{{ format }}"
|
format: "{{ format }}"
|
||||||
remove: yes
|
remove: true
|
||||||
exclude_path: "{{ remote_tmp_dir }}/tmpdir/empty.txt"
|
exclude_path: "{{ remote_tmp_dir }}/tmpdir/empty.txt"
|
||||||
register: archive_remove_source_excluding_path
|
register: archive_remove_source_excluding_path
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
- "{{ remote_tmp_dir }}/tmpdir/sub/*"
|
- "{{ remote_tmp_dir }}/tmpdir/sub/*"
|
||||||
dest: "{{ remote_tmp_dir }}/archive_remove_source_excluding_sub_path.{{ format }}"
|
dest: "{{ remote_tmp_dir }}/archive_remove_source_excluding_sub_path.{{ format }}"
|
||||||
format: "{{ format }}"
|
format: "{{ format }}"
|
||||||
remove: yes
|
remove: true
|
||||||
exclude_path: "{{ remote_tmp_dir }}/tmpdir/sub/subfile.txt"
|
exclude_path: "{{ remote_tmp_dir }}/tmpdir/sub/subfile.txt"
|
||||||
register: archive_remove_source_excluding_sub_path
|
register: archive_remove_source_excluding_sub_path
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
path: "{{ remote_tmp_dir }}/tmpdir/"
|
path: "{{ remote_tmp_dir }}/tmpdir/"
|
||||||
dest: "{{ remote_tmp_dir }}/archive_remove_source_nested_paths.{{ format }}"
|
dest: "{{ remote_tmp_dir }}/archive_remove_source_nested_paths.{{ format }}"
|
||||||
format: "{{ format }}"
|
format: "{{ format }}"
|
||||||
remove: yes
|
remove: true
|
||||||
register: archive_remove_nested_paths
|
register: archive_remove_nested_paths
|
||||||
|
|
||||||
- name: Verify archive exists - remove source with nested paths ({{ format }})
|
- name: Verify archive exists - remove source with nested paths ({{ format }})
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
community.general.cargo:
|
community.general.cargo:
|
||||||
name: helloworld
|
name: helloworld
|
||||||
register: install_present_helloworld
|
register: install_present_helloworld
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Uninstall application helloworld
|
- name: Uninstall application helloworld
|
||||||
community.general.cargo:
|
community.general.cargo:
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
- name: test gather cloud-init facts in check mode
|
- name: test gather cloud-init facts in check mode
|
||||||
cloud_init_data_facts:
|
cloud_init_data_facts:
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify test gather cloud-init facts in check mode
|
- name: verify test gather cloud-init facts in check mode
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- hosts: "{{ target_hosts }}"
|
- hosts: "{{ target_hosts }}"
|
||||||
gather_facts: no
|
gather_facts: false
|
||||||
serial: 1
|
serial: 1
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
- result.info == 'Please note that this repository is not part of the main distribution'
|
- result.info == 'Please note that this repository is not part of the main distribution'
|
||||||
|
|
||||||
- name: enable copr project
|
- name: enable copr project
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
copr:
|
copr:
|
||||||
state: enabled
|
state: enabled
|
||||||
name: '{{ copr_fullname }}'
|
name: '{{ copr_fullname }}'
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
- perl-devel
|
- perl-devel
|
||||||
- perl-App-cpanminus
|
- perl-App-cpanminus
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: true
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- name: install perl development package for Debian family
|
- name: install perl development package for Debian family
|
||||||
|
@ -23,13 +23,13 @@
|
||||||
name:
|
name:
|
||||||
- cpanminus
|
- cpanminus
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: true
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
- name: install a Perl package
|
- name: install a Perl package
|
||||||
cpanm:
|
cpanm:
|
||||||
name: JSON
|
name: JSON
|
||||||
notest: yes
|
notest: true
|
||||||
register: install_perl_package_result
|
register: install_perl_package_result
|
||||||
|
|
||||||
- name: assert package is installed
|
- name: assert package is installed
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
- name: install same Perl package
|
- name: install same Perl package
|
||||||
cpanm:
|
cpanm:
|
||||||
name: JSON
|
name: JSON
|
||||||
notest: yes
|
notest: true
|
||||||
register: install_same_perl_package_result
|
register: install_same_perl_package_result
|
||||||
|
|
||||||
- name: assert same package is installed
|
- name: assert same package is installed
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
cpanm:
|
cpanm:
|
||||||
name: JSON
|
name: JSON
|
||||||
version: "@4.01"
|
version: "@4.01"
|
||||||
notest: yes
|
notest: true
|
||||||
mode: new
|
mode: new
|
||||||
register: install_perl_package_with_version_op_result
|
register: install_perl_package_with_version_op_result
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
dnf:
|
dnf:
|
||||||
name: "{{ _packages }}"
|
name: "{{ _packages }}"
|
||||||
state: latest
|
state: latest
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: update_packages
|
register: update_packages
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
state: absent
|
state: absent
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: "remove test files"
|
- name: "remove test files"
|
||||||
file:
|
file:
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
- "{{ foobarrc_distrib }}"
|
- "{{ foobarrc_distrib }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: dpkg_divert_item
|
loop_var: dpkg_divert_item
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
@ -39,5 +39,5 @@
|
||||||
|
|
||||||
- name: "include tasks to perform other tests (rename)"
|
- name: "include tasks to perform other tests (rename)"
|
||||||
include_tasks: tests/02-rename.yml
|
include_tasks: tests/02-rename.yml
|
||||||
become: yes
|
become: true
|
||||||
diff: yes
|
diff: true
|
||||||
|
|
|
@ -46,14 +46,14 @@
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
state: present
|
state: present
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_4
|
register: diversion_4
|
||||||
|
|
||||||
- name: "divert foobarrc (check mode, rename, must NOT report a change, idempotency)"
|
- name: "divert foobarrc (check mode, rename, must NOT report a change, idempotency)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
state: present
|
state: present
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_5
|
register: diversion_5
|
||||||
check_mode: true
|
check_mode: true
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
- diversion_0.commands == diversion_1.commands
|
- diversion_0.commands == diversion_1.commands
|
||||||
- diversion_2.commands == diversion_3.commands
|
- diversion_2.commands == diversion_3.commands
|
||||||
- diversion_4.commands == diversion_5.commands
|
- diversion_4.commands == diversion_5.commands
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
- diversion_2.diversion == diversion_3.diversion
|
- diversion_2.diversion == diversion_3.diversion
|
||||||
- diversion_0.commands == diversion_1.commands
|
- diversion_0.commands == diversion_1.commands
|
||||||
- diversion_2.commands == diversion_3.commands
|
- diversion_2.commands == diversion_3.commands
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
holder: "ansible"
|
holder: "ansible"
|
||||||
register: diversion_0
|
register: diversion_0
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "update foobarrc diversion holder (must report a change)"
|
- name: "update foobarrc diversion holder (must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
|
@ -184,7 +184,7 @@
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
holder: "ansible"
|
holder: "ansible"
|
||||||
register: diversion_3
|
register: diversion_3
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
# Check results
|
# Check results
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
- diversion_2.diversion == diversion_3.diversion
|
- diversion_2.diversion == diversion_3.diversion
|
||||||
- diversion_0.commands == diversion_1.commands
|
- diversion_0.commands == diversion_1.commands
|
||||||
- diversion_2.commands == diversion_3.commands
|
- diversion_2.commands == diversion_3.commands
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
- name: "remove foobarrc diversion"
|
- name: "remove foobarrc diversion"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
|
@ -234,7 +234,7 @@
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
divert: "{{ foobarrc_ansible }}"
|
divert: "{{ foobarrc_ansible }}"
|
||||||
register: diversion_0
|
register: diversion_0
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "update foobarrc divert path (must report a change)"
|
- name: "update foobarrc divert path (must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
divert: "{{ foobarrc_ansible }}"
|
divert: "{{ foobarrc_ansible }}"
|
||||||
register: diversion_3
|
register: diversion_3
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
# Check results
|
# Check results
|
||||||
|
@ -283,7 +283,7 @@
|
||||||
- diversion_2.diversion == diversion_3.diversion
|
- diversion_2.diversion == diversion_3.diversion
|
||||||
- diversion_0.commands == diversion_1.commands
|
- diversion_0.commands == diversion_1.commands
|
||||||
- diversion_2.commands == diversion_3.commands
|
- diversion_2.commands == diversion_3.commands
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
- name: "remove foobarrc diversion"
|
- name: "remove foobarrc diversion"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
|
|
|
@ -9,29 +9,29 @@
|
||||||
- name: "create diversion for foobarrc (check mode, rename, must report a change)"
|
- name: "create diversion for foobarrc (check mode, rename, must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_0
|
register: diversion_0
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "create diversion for foobarrc (rename, must report a change)"
|
- name: "create diversion for foobarrc (rename, must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_1
|
register: diversion_1
|
||||||
|
|
||||||
|
|
||||||
- name: "create diversion for foobarrc (rename, must NOT report a change, idempotency)"
|
- name: "create diversion for foobarrc (rename, must NOT report a change, idempotency)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_2
|
register: diversion_2
|
||||||
|
|
||||||
- name: "create diversion for foobarrc (check mode, rename, must NOT report a change, idempotency)"
|
- name: "create diversion for foobarrc (check mode, rename, must NOT report a change, idempotency)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_3
|
register: diversion_3
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
# Get results
|
# Get results
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
- diversion_2.diversion == diversion_3.diversion
|
- diversion_2.diversion == diversion_3.diversion
|
||||||
- diversion_0.commands == diversion_1.commands
|
- diversion_0.commands == diversion_1.commands
|
||||||
- diversion_2.commands == diversion_3.commands
|
- diversion_2.commands == diversion_3.commands
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -69,15 +69,15 @@
|
||||||
- name: "remove diversion for foobarrc (check mode, rename, must report a change)"
|
- name: "remove diversion for foobarrc (check mode, rename, must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
state: absent
|
state: absent
|
||||||
register: diversion_0
|
register: diversion_0
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "remove diversion for foobarrc (rename, must report a change)"
|
- name: "remove diversion for foobarrc (rename, must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
state: absent
|
state: absent
|
||||||
register: diversion_1
|
register: diversion_1
|
||||||
|
|
||||||
|
@ -85,17 +85,17 @@
|
||||||
- name: "remove diversion for foobarrc (rename, must NOT report a change, idempotency)"
|
- name: "remove diversion for foobarrc (rename, must NOT report a change, idempotency)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
state: absent
|
state: absent
|
||||||
register: diversion_2
|
register: diversion_2
|
||||||
|
|
||||||
- name: "remove diversion for foobarrc (check mode, rename, must NOT report a change, idempotency)"
|
- name: "remove diversion for foobarrc (check mode, rename, must NOT report a change, idempotency)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
state: absent
|
state: absent
|
||||||
register: diversion_3
|
register: diversion_3
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
# Check results
|
# Check results
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
- diversion_2.diversion == diversion_3.diversion
|
- diversion_2.diversion == diversion_3.diversion
|
||||||
- diversion_0.commands == diversion_1.commands
|
- diversion_0.commands == diversion_1.commands
|
||||||
- diversion_2.commands == diversion_3.commands
|
- diversion_2.commands == diversion_3.commands
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -139,49 +139,49 @@
|
||||||
- name: "create diversion for foobarrc (check mode, rename, must fail)"
|
- name: "create diversion for foobarrc (check mode, rename, must fail)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_0
|
register: diversion_0
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "create diversion for foobarrc (rename, must fail)"
|
- name: "create diversion for foobarrc (rename, must fail)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_1
|
register: diversion_1
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: "create diversion for foobarrc (check mode, force rename, must report a change)"
|
- name: "create diversion for foobarrc (check mode, force rename, must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
force: yes
|
force: true
|
||||||
register: diversion_2
|
register: diversion_2
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "create diversion for foobarrc (force rename, must report a change)"
|
- name: "create diversion for foobarrc (force rename, must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
force: yes
|
force: true
|
||||||
register: diversion_3
|
register: diversion_3
|
||||||
|
|
||||||
|
|
||||||
- name: "create diversion for foobarrc (force rename, must NOT report a change, idempotency)"
|
- name: "create diversion for foobarrc (force rename, must NOT report a change, idempotency)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
force: yes
|
force: true
|
||||||
register: diversion_4
|
register: diversion_4
|
||||||
|
|
||||||
- name: "create diversion for foobarrc (check mode, force rename, must NOT report a change, idempotency)"
|
- name: "create diversion for foobarrc (check mode, force rename, must NOT report a change, idempotency)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
rename: yes
|
rename: true
|
||||||
force: yes
|
force: true
|
||||||
register: diversion_5
|
register: diversion_5
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
# Check results
|
# Check results
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
- diversion_4.diversion == diversion_5.diversion
|
- diversion_4.diversion == diversion_5.diversion
|
||||||
- diversion_2.commands == diversion_3.commands
|
- diversion_2.commands == diversion_3.commands
|
||||||
- diversion_4.commands == diversion_5.commands
|
- diversion_4.commands == diversion_5.commands
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -230,7 +230,7 @@
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
divert: "{{ foobarrc_ansible }}"
|
divert: "{{ foobarrc_ansible }}"
|
||||||
register: diversion_0
|
register: diversion_0
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "create diversion for foobarrc (update divert path, must report a change)"
|
- name: "create diversion for foobarrc (update divert path, must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
divert: "{{ foobarrc_ansible }}"
|
divert: "{{ foobarrc_ansible }}"
|
||||||
register: diversion_3
|
register: diversion_3
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
# Check results
|
# Check results
|
||||||
|
@ -286,7 +286,7 @@
|
||||||
- diversion_2.diversion == diversion_3.diversion
|
- diversion_2.diversion == diversion_3.diversion
|
||||||
- diversion_0.commands == diversion_1.commands
|
- diversion_0.commands == diversion_1.commands
|
||||||
- diversion_2.commands == diversion_3.commands
|
- diversion_2.commands == diversion_3.commands
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -296,35 +296,35 @@
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
state: absent
|
state: absent
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_0
|
register: diversion_0
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "remove diversion for foobarrc (rename, must fail)"
|
- name: "remove diversion for foobarrc (rename, must fail)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
state: absent
|
state: absent
|
||||||
rename: yes
|
rename: true
|
||||||
register: diversion_1
|
register: diversion_1
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: "remove diversion for foobarrc (check mode, force rename, must report a change)"
|
- name: "remove diversion for foobarrc (check mode, force rename, must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
state: absent
|
state: absent
|
||||||
rename: yes
|
rename: true
|
||||||
force: yes
|
force: true
|
||||||
register: diversion_2
|
register: diversion_2
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "remove diversion for foobarrc (force rename, must report a change)"
|
- name: "remove diversion for foobarrc (force rename, must report a change)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
state: absent
|
state: absent
|
||||||
rename: yes
|
rename: true
|
||||||
force: yes
|
force: true
|
||||||
register: diversion_3
|
register: diversion_3
|
||||||
|
|
||||||
|
|
||||||
|
@ -332,18 +332,18 @@
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
state: absent
|
state: absent
|
||||||
rename: yes
|
rename: true
|
||||||
force: yes
|
force: true
|
||||||
register: diversion_4
|
register: diversion_4
|
||||||
|
|
||||||
- name: "remove diversion for foobarrc (check mode, force rename, must NOT report a change, idempotency)"
|
- name: "remove diversion for foobarrc (check mode, force rename, must NOT report a change, idempotency)"
|
||||||
dpkg_divert:
|
dpkg_divert:
|
||||||
path: "{{ foobarrc }}"
|
path: "{{ foobarrc }}"
|
||||||
state: absent
|
state: absent
|
||||||
rename: yes
|
rename: true
|
||||||
force: yes
|
force: true
|
||||||
register: diversion_5
|
register: diversion_5
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
# Check results
|
# Check results
|
||||||
|
@ -381,4 +381,4 @@
|
||||||
- diversion_4.diversion == diversion_5.diversion
|
- diversion_4.diversion == diversion_5.diversion
|
||||||
- diversion_2.commands == diversion_3.commands
|
- diversion_2.commands == diversion_3.commands
|
||||||
- diversion_4.commands == diversion_5.commands
|
- diversion_4.commands == diversion_5.commands
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 0
|
size: 0
|
||||||
register: filesize_test_basic_01
|
register: filesize_test_basic_01
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file (should not exist)
|
- name: Stat the file (should not exist)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 0G
|
size: 0G
|
||||||
register: filesize_test_basic_03
|
register: filesize_test_basic_03
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Create an empty file (idempotency)
|
- name: Create an empty file (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
size: 57kB
|
size: 57kB
|
||||||
source: /dev/urandom
|
source: /dev/urandom
|
||||||
register: filesize_test_basic_11
|
register: filesize_test_basic_11
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file (should still be unchanged)
|
- name: Stat the file (should still be unchanged)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
size: 57000B
|
size: 57000B
|
||||||
source: /dev/urandom
|
source: /dev/urandom
|
||||||
register: filesize_test_basic_13
|
register: filesize_test_basic_13
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Fill the file up to 57000B (57kB) with random data (idempotency)
|
- name: Fill the file up to 57000B (57kB) with random data (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
@ -183,7 +183,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 57001B
|
size: 57001B
|
||||||
register: filesize_test_basic_21
|
register: filesize_test_basic_21
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file again (should remain the same)
|
- name: Stat the file again (should remain the same)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
@ -208,7 +208,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 57.001 kB
|
size: 57.001 kB
|
||||||
register: filesize_test_basic_23
|
register: filesize_test_basic_23
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Expand the file with 1 byte (57.001 kB) (idempotency)
|
- name: Expand the file with 1 byte (57.001 kB) (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 2 MiB
|
size: 2 MiB
|
||||||
register: filesize_test_basic_31
|
register: filesize_test_basic_31
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file again (should remain the same)
|
- name: Stat the file again (should remain the same)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
size: 2
|
size: 2
|
||||||
blocksize: 1M
|
blocksize: 1M
|
||||||
register: filesize_test_basic_33
|
register: filesize_test_basic_33
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Expand the file up to 2×1M (2*1024*1024 bytes) (idempotency)
|
- name: Expand the file up to 2×1M (2*1024*1024 bytes) (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
@ -333,7 +333,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 57kB
|
size: 57kB
|
||||||
register: filesize_test_basic_41
|
register: filesize_test_basic_41
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the resulting file (should be unchanged)
|
- name: Stat the resulting file (should be unchanged)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
@ -358,7 +358,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 57000 B
|
size: 57000 B
|
||||||
register: filesize_test_basic_43
|
register: filesize_test_basic_43
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Truncate the file to 57000 B (57kB) (idempotency)
|
- name: Truncate the file to 57000 B (57kB) (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
|
|
@ -11,24 +11,24 @@
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
size: 1kB
|
size: 1kB
|
||||||
register: filesize_test_error_01
|
register: filesize_test_error_01
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to missing parameter (size)
|
- name: Trigger an error due to missing parameter (size)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
register: filesize_test_error_02
|
register: filesize_test_error_02
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to conflicting parameters (force|sparse)
|
- name: Trigger an error due to conflicting parameters (force|sparse)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 1MB
|
size: 1MB
|
||||||
force: yes
|
force: true
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_error_03
|
register: filesize_test_error_03
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to invalid file path (not a file)
|
- name: Trigger an error due to invalid file path (not a file)
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
path: "{{ filesize_testdir }}"
|
path: "{{ filesize_testdir }}"
|
||||||
size: 4096B
|
size: 4096B
|
||||||
register: filesize_test_error_04
|
register: filesize_test_error_04
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to invalid file path (unexisting parent dir)
|
- name: Trigger an error due to invalid file path (unexisting parent dir)
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
path: "/unexistent/{{ filesize_testfile }}"
|
path: "/unexistent/{{ filesize_testfile }}"
|
||||||
size: 4096B
|
size: 4096B
|
||||||
register: filesize_test_error_05
|
register: filesize_test_error_05
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to invalid size unit (b)"
|
- name: Trigger an error due to invalid size unit (b)"
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4096b
|
size: 4096b
|
||||||
register: filesize_test_error_06
|
register: filesize_test_error_06
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to invalid size value (bytes require integer)
|
- name: Trigger an error due to invalid size value (bytes require integer)
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 1000.5B
|
size: 1000.5B
|
||||||
register: filesize_test_error_07
|
register: filesize_test_error_07
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to invalid blocksize value (not an integer)
|
- name: Trigger an error due to invalid blocksize value (not an integer)
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
size: 1M
|
size: 1M
|
||||||
blocksize: "12.5"
|
blocksize: "12.5"
|
||||||
register: filesize_test_error_08
|
register: filesize_test_error_08
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to invalid blocksize value type (dict)
|
- name: Trigger an error due to invalid blocksize value type (dict)
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
blocksize:
|
blocksize:
|
||||||
bytes: 512
|
bytes: 512
|
||||||
register: filesize_test_error_09
|
register: filesize_test_error_09
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to invalid source device (/dev/unexistent)
|
- name: Trigger an error due to invalid source device (/dev/unexistent)
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
size: 1M
|
size: 1M
|
||||||
source: /dev/unexistent
|
source: /dev/unexistent
|
||||||
register: filesize_test_error_10
|
register: filesize_test_error_10
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger an error due to invalid source device (/dev/null)
|
- name: Trigger an error due to invalid source device (/dev/null)
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
size: 1M
|
size: 1M
|
||||||
source: /dev/null
|
source: /dev/null
|
||||||
register: filesize_test_error_11
|
register: filesize_test_error_11
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
- name: Assert that expected errors have been triggered
|
- name: Assert that expected errors have been triggered
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 512.512kB
|
size: 512.512kB
|
||||||
register: filesize_test_float_01
|
register: filesize_test_float_01
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file (should not exist)
|
- name: Stat the file (should not exist)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 0.512512MB
|
size: 0.512512MB
|
||||||
register: filesize_test_float_03
|
register: filesize_test_float_03
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Create a file with a size of 0.512512MB (idempotency)
|
- name: Create a file with a size of 0.512512MB (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 512.513kB
|
size: 512.513kB
|
||||||
register: filesize_test_float_11
|
register: filesize_test_float_11
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file again (should remain the same)
|
- name: Stat the file again (should remain the same)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 0.512513MB
|
size: 0.512513MB
|
||||||
register: filesize_test_float_13
|
register: filesize_test_float_13
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Create a file with a size of 0.512513MB (idempotency)
|
- name: Create a file with a size of 0.512513MB (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4.004MB
|
size: 4.004MB
|
||||||
register: filesize_test_float_21
|
register: filesize_test_float_21
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file again (should remain the same)
|
- name: Stat the file again (should remain the same)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4.004MB
|
size: 4.004MB
|
||||||
register: filesize_test_float_23
|
register: filesize_test_float_23
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Create a file with a size of 4.004MB (idempotency)
|
- name: Create a file with a size of 4.004MB (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4TB
|
size: 4TB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_01
|
register: filesize_test_sparse_01
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file (should not exist)
|
- name: Stat the file (should not exist)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
register: filesize_stat_sparse_01
|
register: filesize_stat_sparse_01
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,13 +24,13 @@
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4TB
|
size: 4TB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_02
|
register: filesize_test_sparse_02
|
||||||
|
|
||||||
- name: Stat the resulting file (should exist now)
|
- name: Stat the resulting file (should exist now)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
register: filesize_stat_sparse_02
|
register: filesize_stat_sparse_02
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,15 +38,15 @@
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4000GB
|
size: 4000GB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_03
|
register: filesize_test_sparse_03
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Create a huge sparse file of 4TB (4000GB) (idempotency)
|
- name: Create a huge sparse file of 4TB (4000GB) (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4000GB
|
size: 4000GB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_04
|
register: filesize_test_sparse_04
|
||||||
|
|
||||||
- name: Create a huge sparse file of 4TB (4000000 × 1MB) (check mode, idempotency)
|
- name: Create a huge sparse file of 4TB (4000000 × 1MB) (check mode, idempotency)
|
||||||
|
@ -54,22 +54,22 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4000000
|
size: 4000000
|
||||||
blocksize: 1MB
|
blocksize: 1MB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_05
|
register: filesize_test_sparse_05
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Create a huge sparse file of 4TB (4000000 × 1MB) (idempotency)
|
- name: Create a huge sparse file of 4TB (4000000 × 1MB) (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4000000
|
size: 4000000
|
||||||
blocksize: 1MB
|
blocksize: 1MB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_06
|
register: filesize_test_sparse_06
|
||||||
|
|
||||||
- name: Stat the file again (should remain the same)
|
- name: Stat the file again (should remain the same)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
register: filesize_stat_sparse_06
|
register: filesize_stat_sparse_06
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,14 +124,14 @@
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4TiB
|
size: 4TiB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_11
|
register: filesize_test_sparse_11
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file again (should remain the same)
|
- name: Stat the file again (should remain the same)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
register: filesize_stat_sparse_11
|
register: filesize_stat_sparse_11
|
||||||
|
|
||||||
|
|
||||||
|
@ -139,13 +139,13 @@
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4TiB
|
size: 4TiB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_12
|
register: filesize_test_sparse_12
|
||||||
|
|
||||||
- name: Stat the file again (should have grown)
|
- name: Stat the file again (should have grown)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
register: filesize_stat_sparse_12
|
register: filesize_stat_sparse_12
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,21 +153,21 @@
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4096GiB
|
size: 4096GiB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_13
|
register: filesize_test_sparse_13
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Change sparse file size to 4TiB (4096GiB) (idempotency)
|
- name: Change sparse file size to 4TiB (4096GiB) (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4096GiB
|
size: 4096GiB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_14
|
register: filesize_test_sparse_14
|
||||||
|
|
||||||
- name: Stat the file again (should remain the same)
|
- name: Stat the file again (should remain the same)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
register: filesize_stat_sparse_14
|
register: filesize_stat_sparse_14
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,14 +203,14 @@
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4.321TB
|
size: 4.321TB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_21
|
register: filesize_test_sparse_21
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Stat the file again (should remain the same)
|
- name: Stat the file again (should remain the same)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
register: filesize_stat_sparse_21
|
register: filesize_stat_sparse_21
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,13 +218,13 @@
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4.321TB
|
size: 4.321TB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_22
|
register: filesize_test_sparse_22
|
||||||
|
|
||||||
- name: Stat the file again (should have been reduced)
|
- name: Stat the file again (should have been reduced)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
register: filesize_stat_sparse_22
|
register: filesize_stat_sparse_22
|
||||||
|
|
||||||
|
|
||||||
|
@ -233,22 +233,22 @@
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4321
|
size: 4321
|
||||||
blocksize: 1GB
|
blocksize: 1GB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_23
|
register: filesize_test_sparse_23
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Change sparse file size to 4321×1GB (idempotency)
|
- name: Change sparse file size to 4321×1GB (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
size: 4321
|
size: 4321
|
||||||
blocksize: 1GB
|
blocksize: 1GB
|
||||||
sparse: yes
|
sparse: true
|
||||||
register: filesize_test_sparse_24
|
register: filesize_test_sparse_24
|
||||||
|
|
||||||
- name: Stat the file again (should remain the same)
|
- name: Stat the file again (should remain the same)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
register: filesize_stat_sparse_24
|
register: filesize_stat_sparse_24
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
src: "{{ filesize_testfile | basename }}"
|
src: "{{ filesize_testfile | basename }}"
|
||||||
dest: "{{ filesize_testlink }}"
|
dest: "{{ filesize_testlink }}"
|
||||||
state: link
|
state: link
|
||||||
force: yes
|
force: true
|
||||||
follow: no
|
follow: false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
path: "{{ filesize_testlink }}"
|
path: "{{ filesize_testlink }}"
|
||||||
size: "512 kB"
|
size: "512 kB"
|
||||||
register: filesize_test_symlink_01
|
register: filesize_test_symlink_01
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Create a file with a size of 512 kB (512000 bytes)
|
- name: Create a file with a size of 512 kB (512000 bytes)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
path: "{{ filesize_testlink }}"
|
path: "{{ filesize_testlink }}"
|
||||||
size: "500 KiB"
|
size: "500 KiB"
|
||||||
register: filesize_test_symlink_03
|
register: filesize_test_symlink_03
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Create a file with a size of 500 KiB (512000 bytes) (idempotency)
|
- name: Create a file with a size of 500 KiB (512000 bytes) (idempotency)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
community.general.filesystem:
|
community.general.filesystem:
|
||||||
dev: '{{ dev }}'
|
dev: '{{ dev }}'
|
||||||
fstype: '{{ fstype }}'
|
fstype: '{{ fstype }}'
|
||||||
force: yes
|
force: true
|
||||||
register: fs3_result
|
register: fs3_result
|
||||||
|
|
||||||
- name: "Get UUID of the new filesystem"
|
- name: "Get UUID of the new filesystem"
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
community.general.filesystem:
|
community.general.filesystem:
|
||||||
dev: '{{ dev }}'
|
dev: '{{ dev }}'
|
||||||
fstype: '{{ fstype }}'
|
fstype: '{{ fstype }}'
|
||||||
resizefs: yes
|
resizefs: true
|
||||||
register: fs4_result
|
register: fs4_result
|
||||||
|
|
||||||
- name: "Get UUID of the filesystem"
|
- name: "Get UUID of the filesystem"
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
community.general.filesystem:
|
community.general.filesystem:
|
||||||
dev: '{{ dev }}'
|
dev: '{{ dev }}'
|
||||||
fstype: '{{ fstype }}'
|
fstype: '{{ fstype }}'
|
||||||
resizefs: yes
|
resizefs: true
|
||||||
register: fs5_result
|
register: fs5_result
|
||||||
|
|
||||||
- name: "Assert that the state did not change"
|
- name: "Assert that the state did not change"
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
community.general.filesystem:
|
community.general.filesystem:
|
||||||
dev: '{{ dev }}'
|
dev: '{{ dev }}'
|
||||||
fstype: '{{ fstype }}'
|
fstype: '{{ fstype }}'
|
||||||
force: yes
|
force: true
|
||||||
register: fs_result2
|
register: fs_result2
|
||||||
|
|
||||||
- name: 'Get UUID of the new filesystem'
|
- name: 'Get UUID of the new filesystem'
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
dev: '{{ dev }}'
|
dev: '{{ dev }}'
|
||||||
state: absent
|
state: absent
|
||||||
register: wipefs
|
register: wipefs
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "Get filesystem UUID with 'blkid' (should remain the same)"
|
- name: "Get filesystem UUID with 'blkid' (should remain the same)"
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
dev: '{{ dev }}'
|
dev: '{{ dev }}'
|
||||||
state: absent
|
state: absent
|
||||||
register: wipefs
|
register: wipefs
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "Assert that the state did not change"
|
- name: "Assert that the state did not change"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
- name: test fail argument not a sequence
|
- name: test fail argument not a sequence
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ {'a': 'b'} | community.general.counter }}"
|
msg: "{{ {'a': 'b'} | community.general.counter }}"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: res
|
register: res
|
||||||
|
|
||||||
- name: verify test fail argument not a sequence
|
- name: verify test fail argument not a sequence
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
- name: test fail element not hashable
|
- name: test fail element not hashable
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ [{'a': 'b'}] | community.general.counter }}"
|
msg: "{{ [{'a': 'b'}] | community.general.counter }}"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: res
|
register: res
|
||||||
|
|
||||||
- name: verify test fail element not hashable
|
- name: verify test fail element not hashable
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
debug:
|
debug:
|
||||||
var: "0 | community.general.random_mac"
|
var: "0 | community.general.random_mac"
|
||||||
register: _bad_random_mac_filter
|
register: _bad_random_mac_filter
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Verify random_mac filter showed a bad argument type error message
|
- name: Verify random_mac filter showed a bad argument type error message
|
||||||
assert:
|
assert:
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
debug:
|
debug:
|
||||||
var: "'dummy' | community.general.random_mac"
|
var: "'dummy' | community.general.random_mac"
|
||||||
register: _bad_random_mac_filter
|
register: _bad_random_mac_filter
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Verify random_mac filter showed a bad argument value error message
|
- name: Verify random_mac filter showed a bad argument value error message
|
||||||
assert:
|
assert:
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
debug:
|
debug:
|
||||||
var: "'00:00:00:00:00:00' | community.general.random_mac"
|
var: "'00:00:00:00:00:00' | community.general.random_mac"
|
||||||
register: _bad_random_mac_filter
|
register: _bad_random_mac_filter
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Verify random_mac filter showed a prefix too big error message
|
- name: Verify random_mac filter showed a prefix too big error message
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
- name: test fail unknown unit
|
- name: test fail unknown unit
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ '1s' | community.general.to_time_unit('lightyears') }}"
|
msg: "{{ '1s' | community.general.to_time_unit('lightyears') }}"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: res
|
register: res
|
||||||
|
|
||||||
- name: verify test fail unknown unit
|
- name: verify test fail unknown unit
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
- name: test fail unknown string
|
- name: test fail unknown string
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ '1 s' | community.general.to_time_unit('s') }}"
|
msg: "{{ '1 s' | community.general.to_time_unit('s') }}"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: res
|
register: res
|
||||||
|
|
||||||
- name: test fail unknown string
|
- name: test fail unknown string
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
- name: test fail unknown kwarg
|
- name: test fail unknown kwarg
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ '1s' | community.general.to_time_unit('s', second=23) }}"
|
msg: "{{ '1s' | community.general.to_time_unit('s', second=23) }}"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: res
|
register: res
|
||||||
|
|
||||||
- name: test fail unknown kwarg
|
- name: test fail unknown kwarg
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
values: "{{ item['values'] }}"
|
values: "{{ item['values'] }}"
|
||||||
ttl: "{{ item.ttl }}"
|
ttl: "{{ item.ttl }}"
|
||||||
type: "{{ item.type }}"
|
type: "{{ item.type }}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify test create a dns record in check mode
|
- name: verify test create a dns record in check mode
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
values: "{{ item.update_values | default(item['values']) }}"
|
values: "{{ item.update_values | default(item['values']) }}"
|
||||||
type: "{{ item.type }}"
|
type: "{{ item.type }}"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify test remove a dns record in check mode
|
- name: verify test remove a dns record in check mode
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
values: "{{ item.update_values | default(item['values']) }}"
|
values: "{{ item.update_values | default(item['values']) }}"
|
||||||
ttl: "{{ item.update_ttl | default(item.ttl) }}"
|
ttl: "{{ item.update_ttl | default(item.ttl) }}"
|
||||||
type: "{{ item.type }}"
|
type: "{{ item.type }}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify test update in check mode
|
- name: verify test update in check mode
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
name: gist
|
name: gist
|
||||||
state: present
|
state: present
|
||||||
register: install_gem_result
|
register: install_gem_result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
# when running as root on Fedora, '--install-dir' is set in the os defaults which is
|
# when running as root on Fedora, '--install-dir' is set in the os defaults which is
|
||||||
# incompatible with '--user-install', we ignore this error for this case only
|
# incompatible with '--user-install', we ignore this error for this case only
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
gem:
|
gem:
|
||||||
name: gist
|
name: gist
|
||||||
state: present
|
state: present
|
||||||
user_install: no
|
user_install: false
|
||||||
register: install_gem_result
|
register: install_gem_result
|
||||||
|
|
||||||
- name: List gems
|
- name: List gems
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
name: gist
|
name: gist
|
||||||
state: present
|
state: present
|
||||||
install_dir: "{{ remote_tmp_dir }}/gems"
|
install_dir: "{{ remote_tmp_dir }}/gems"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: install_gem_fail_result
|
register: install_gem_fail_result
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
gem:
|
gem:
|
||||||
name: gist
|
name: gist
|
||||||
state: present
|
state: present
|
||||||
user_install: no
|
user_install: false
|
||||||
install_dir: "{{ remote_tmp_dir }}/gems"
|
install_dir: "{{ remote_tmp_dir }}/gems"
|
||||||
register: install_gem_result
|
register: install_gem_result
|
||||||
|
|
||||||
|
@ -148,13 +148,13 @@
|
||||||
that:
|
that:
|
||||||
- install_gem_result is changed
|
- install_gem_result is changed
|
||||||
- gem_search.files[0].path is search('gist-[0-9.]+')
|
- gem_search.files[0].path is search('gist-[0-9.]+')
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Remove a gem in a custom directory
|
- name: Remove a gem in a custom directory
|
||||||
gem:
|
gem:
|
||||||
name: gist
|
name: gist
|
||||||
state: absent
|
state: absent
|
||||||
user_install: no
|
user_install: false
|
||||||
install_dir: "{{ remote_tmp_dir }}/gems"
|
install_dir: "{{ remote_tmp_dir }}/gems"
|
||||||
register: install_gem_result
|
register: install_gem_result
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@
|
||||||
name: gist
|
name: gist
|
||||||
state: present
|
state: present
|
||||||
bindir: "{{ remote_tmp_dir }}/custom_bindir"
|
bindir: "{{ remote_tmp_dir }}/custom_bindir"
|
||||||
norc: yes
|
norc: true
|
||||||
user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL
|
user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL
|
||||||
register: install_gem_result
|
register: install_gem_result
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
name: gist
|
name: gist
|
||||||
state: absent
|
state: absent
|
||||||
bindir: "{{ remote_tmp_dir }}/custom_bindir"
|
bindir: "{{ remote_tmp_dir }}/custom_bindir"
|
||||||
norc: yes
|
norc: true
|
||||||
user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL
|
user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL
|
||||||
register: install_gem_result
|
register: install_gem_result
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
list_all: true
|
list_all: true
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: assert git_config failed
|
- name: assert git_config failed
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
- name: verify that git is installed so this test can continue
|
- name: verify that git is installed so this test can continue
|
||||||
command: which git
|
command: which git
|
||||||
register: git_installed
|
register: git_installed
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: get git version, only newer than {{git_version_supporting_includes}} has includes option
|
- name: get git version, only newer than {{git_version_supporting_includes}} has includes option
|
||||||
shell: "git --version | grep 'git version' | sed 's/git version //'"
|
shell: "git --version | grep 'git version' | sed 's/git version //'"
|
||||||
register: git_version
|
register: git_version
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
...
|
...
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
name: "{{ option_name }}"
|
name: "{{ option_name }}"
|
||||||
scope: "{{ option_scope }}"
|
scope: "{{ option_scope }}"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: unset_result
|
register: unset_result
|
||||||
|
|
||||||
- name: getting value
|
- name: getting value
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
group: "{{ gitlab_group_name }}"
|
group: "{{ gitlab_group_name }}"
|
||||||
vars:
|
vars:
|
||||||
ACCESS_KEY_ID: checkmode
|
ACCESS_KEY_ID: checkmode
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: gitlab_group_variable_state
|
register: gitlab_group_variable_state
|
||||||
|
|
||||||
- name: check_mode state must be changed
|
- name: check_mode state must be changed
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
group: "{{ gitlab_group_name }}"
|
group: "{{ gitlab_group_name }}"
|
||||||
vars:
|
vars:
|
||||||
ACCESS_KEY_ID: checkmode
|
ACCESS_KEY_ID: checkmode
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: gitlab_group_variable_state
|
register: gitlab_group_variable_state
|
||||||
|
|
||||||
- name: check_mode state must not be changed
|
- name: check_mode state must not be changed
|
||||||
|
@ -665,7 +665,7 @@
|
||||||
variables:
|
variables:
|
||||||
- name: delete_me
|
- name: delete_me
|
||||||
register: gitlab_group_variable_state
|
register: gitlab_group_variable_state
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: verify fail
|
- name: verify fail
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Create Badge (check)
|
- name: Create Badge (check)
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
gitlab_project_badge:
|
gitlab_project_badge:
|
||||||
api_url: "{{ gitlab_api_url }}"
|
api_url: "{{ gitlab_api_url }}"
|
||||||
validate_certs: False
|
validate_certs: False
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
- not gitlab_badge_create_confirmation_task.failed
|
- not gitlab_badge_create_confirmation_task.failed
|
||||||
|
|
||||||
- name: Update Badge (check)
|
- name: Update Badge (check)
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
gitlab_project_badge:
|
gitlab_project_badge:
|
||||||
api_url: "{{ gitlab_api_url }}"
|
api_url: "{{ gitlab_api_url }}"
|
||||||
validate_certs: False
|
validate_certs: False
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
- not gitlab_badge_update_confirmation_task.failed
|
- not gitlab_badge_update_confirmation_task.failed
|
||||||
|
|
||||||
- name: Delete Badge (check)
|
- name: Delete Badge (check)
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
gitlab_project_badge:
|
gitlab_project_badge:
|
||||||
api_url: "{{ gitlab_api_url }}"
|
api_url: "{{ gitlab_api_url }}"
|
||||||
validate_certs: False
|
validate_certs: False
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
project: "{{ gitlab_project_name }}"
|
project: "{{ gitlab_project_name }}"
|
||||||
vars:
|
vars:
|
||||||
ACCESS_KEY_ID: checkmode
|
ACCESS_KEY_ID: checkmode
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: gitlab_project_variable_state
|
register: gitlab_project_variable_state
|
||||||
|
|
||||||
- name: check_mode state must be changed
|
- name: check_mode state must be changed
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
project: "{{ gitlab_project_name }}"
|
project: "{{ gitlab_project_name }}"
|
||||||
vars:
|
vars:
|
||||||
ACCESS_KEY_ID: checkmode
|
ACCESS_KEY_ID: checkmode
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: gitlab_project_variable_state
|
register: gitlab_project_variable_state
|
||||||
|
|
||||||
- name: check_mode state must not be changed
|
- name: check_mode state must not be changed
|
||||||
|
@ -660,7 +660,7 @@
|
||||||
variables:
|
variables:
|
||||||
- name: delete_me
|
- name: delete_me
|
||||||
register: gitlab_project_variable_state
|
register: gitlab_project_variable_state
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: verify fail
|
- name: verify fail
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
- name: determine if mercurial is already installed
|
- name: determine if mercurial is already installed
|
||||||
command: which hg
|
command: which hg
|
||||||
register: has_hg
|
register: has_hg
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: warn if the underlying system is not capable of running these tests
|
- name: warn if the underlying system is not capable of running these tests
|
||||||
debug:
|
debug:
|
||||||
|
|
|
@ -72,8 +72,8 @@
|
||||||
- name: Checkout non-existent repo clone
|
- name: Checkout non-existent repo clone
|
||||||
hg:
|
hg:
|
||||||
repo: "http://hg.pf.osdn.net/view/a/ak/akasurde/hg_project_test_1"
|
repo: "http://hg.pf.osdn.net/view/a/ak/akasurde/hg_project_test_1"
|
||||||
clone: no
|
clone: false
|
||||||
update: no
|
update: false
|
||||||
register: hg_result3
|
register: hg_result3
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
dnf:
|
dnf:
|
||||||
name: mercurial
|
name: mercurial
|
||||||
state: absent
|
state: absent
|
||||||
autoremove: yes
|
autoremove: true
|
||||||
when: ansible_facts.pkg_mgr == 'dnf'
|
when: ansible_facts.pkg_mgr == 'dnf'
|
||||||
|
|
||||||
# the yum module does not have an autoremove parameter
|
# the yum module does not have an autoremove parameter
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
package:
|
package:
|
||||||
name: mercurial
|
name: mercurial
|
||||||
state: absent
|
state: absent
|
||||||
autoremove: yes
|
autoremove: true
|
||||||
when: ansible_facts.pkg_mgr in ['pkgng', 'community.general.pkgng']
|
when: ansible_facts.pkg_mgr in ['pkgng', 'community.general.pkgng']
|
||||||
|
|
||||||
- name: uninstall packages which were not originally installed (zypper)
|
- name: uninstall packages which were not originally installed (zypper)
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
|
|
||||||
#- name: Use ignored-pinned option while upgrading all
|
#- name: Use ignored-pinned option while upgrading all
|
||||||
# homebrew:
|
# homebrew:
|
||||||
# upgrade_all: yes
|
# upgrade_all: true
|
||||||
# upgrade_options: ignore-pinned
|
# upgrade_options: ignore-pinned
|
||||||
# become: yes
|
# become: true
|
||||||
# become_user: "{{ brew_stat.stat.pw_name }}"
|
# become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
# register: upgrade_option_result
|
# register: upgrade_option_result
|
||||||
# environment:
|
# environment:
|
||||||
|
@ -42,16 +42,16 @@
|
||||||
homebrew:
|
homebrew:
|
||||||
name: "{{ package_name }}"
|
name: "{{ package_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
update_homebrew: no
|
update_homebrew: false
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
|
|
||||||
- name: Install {{ package_name }} package using homebrew
|
- name: Install {{ package_name }} package using homebrew
|
||||||
homebrew:
|
homebrew:
|
||||||
name: "{{ package_name }}"
|
name: "{{ package_name }}"
|
||||||
state: present
|
state: present
|
||||||
update_homebrew: no
|
update_homebrew: false
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
register: package_result
|
register: package_result
|
||||||
|
|
||||||
|
@ -63,8 +63,8 @@
|
||||||
homebrew:
|
homebrew:
|
||||||
name: "{{ package_name }}"
|
name: "{{ package_name }}"
|
||||||
state: present
|
state: present
|
||||||
update_homebrew: no
|
update_homebrew: false
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
register: package_result
|
register: package_result
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@
|
||||||
homebrew:
|
homebrew:
|
||||||
name: "{{ package_name }}"
|
name: "{{ package_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
update_homebrew: no
|
update_homebrew: false
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
register: package_result
|
register: package_result
|
||||||
|
|
||||||
|
@ -89,8 +89,8 @@
|
||||||
homebrew:
|
homebrew:
|
||||||
name: "{{ package_name }}"
|
name: "{{ package_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
update_homebrew: no
|
update_homebrew: false
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
register: package_result
|
register: package_result
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
homebrew_cask:
|
homebrew_cask:
|
||||||
name: "{{ cask }}"
|
name: "{{ cask }}"
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
register: cask_install_result
|
register: cask_install_result
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
homebrew_cask:
|
homebrew_cask:
|
||||||
name: "{{ cask }}"
|
name: "{{ cask }}"
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
register: cask_install_result
|
register: cask_install_result
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
name: "{{ cask }}"
|
name: "{{ cask }}"
|
||||||
state: present
|
state: present
|
||||||
install_options: force
|
install_options: force
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
register: cask_install_result
|
register: cask_install_result
|
||||||
|
|
||||||
|
@ -68,6 +68,6 @@
|
||||||
name: "{{ cask }}"
|
name: "{{ cask }}"
|
||||||
state: absent
|
state: absent
|
||||||
install_options: force
|
install_options: force
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
|
@ -7,19 +7,19 @@
|
||||||
- name: check systemd version
|
- name: check systemd version
|
||||||
command: "systemctl --version"
|
command: "systemctl --version"
|
||||||
register: systemd_version
|
register: systemd_version
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: check homectl version
|
- name: check homectl version
|
||||||
command: homectl --version
|
command: homectl --version
|
||||||
register: homectl_version
|
register: homectl_version
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Check and start systemd-homed service
|
- name: Check and start systemd-homed service
|
||||||
service:
|
service:
|
||||||
name: systemd-homed.service
|
name: systemd-homed.service
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
|
|
||||||
- name: Add a user 'james'
|
- name: Add a user 'james'
|
||||||
community.general.homectl:
|
community.general.homectl:
|
||||||
|
@ -55,9 +55,9 @@
|
||||||
name: foo
|
name: foo
|
||||||
password: uq4895738!@#$%dfd
|
password: uq4895738!@#$%dfd
|
||||||
state: present
|
state: present
|
||||||
resize: yes
|
resize: true
|
||||||
register: resize_out
|
register: resize_out
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Use option 'disksize=1G' without option resize (allowed)
|
- name: Use option 'disksize=1G' without option resize (allowed)
|
||||||
community.general.homectl:
|
community.general.homectl:
|
||||||
|
@ -66,13 +66,13 @@
|
||||||
state: present
|
state: present
|
||||||
disksize: 1G
|
disksize: 1G
|
||||||
register: disk_out
|
register: disk_out
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Try to Create user without giving password
|
- name: Try to Create user without giving password
|
||||||
community.general.homectl:
|
community.general.homectl:
|
||||||
name: danielle
|
name: danielle
|
||||||
register: danielle_out
|
register: danielle_out
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: remove user 'foobar' without requiring password
|
- name: remove user 'foobar' without requiring password
|
||||||
community.general.homectl:
|
community.general.homectl:
|
||||||
|
@ -102,20 +102,20 @@
|
||||||
name: janet
|
name: janet
|
||||||
state: absent
|
state: absent
|
||||||
register: user_not_exist
|
register: user_not_exist
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Use check_mode to try and create user 'diana'
|
- name: Use check_mode to try and create user 'diana'
|
||||||
community.general.homectl:
|
community.general.homectl:
|
||||||
name: diana
|
name: diana
|
||||||
password: helloworld123!@
|
password: helloworld123!@
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: diana_create_checkmode_out
|
register: diana_create_checkmode_out
|
||||||
|
|
||||||
- name: Verify user 'diana' was not created with check_mode
|
- name: Verify user 'diana' was not created with check_mode
|
||||||
command: homectl inspect diana
|
command: homectl inspect diana
|
||||||
register: user_diana_exists
|
register: user_diana_exists
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Try to modify user 'jake' with only noexec mount option in check_mode
|
- name: Try to modify user 'jake' with only noexec mount option in check_mode
|
||||||
community.general.homectl:
|
community.general.homectl:
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
password: myreallysecurepassword12!
|
password: myreallysecurepassword12!
|
||||||
state: present
|
state: present
|
||||||
mountopts: noexec
|
mountopts: noexec
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: jake_checkmode_out
|
register: jake_checkmode_out
|
||||||
|
|
||||||
- name: Verify user 'jake' was not modified and still has all mount options
|
- name: Verify user 'jake' was not modified and still has all mount options
|
||||||
|
@ -152,8 +152,8 @@
|
||||||
password: incorrectPassword!
|
password: incorrectPassword!
|
||||||
state: present
|
state: present
|
||||||
mountopts: noexec
|
mountopts: noexec
|
||||||
locked: yes
|
locked: true
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: jake_incorrect_pass_out
|
register: jake_incorrect_pass_out
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
root_volume:
|
root_volume:
|
||||||
volume_type: "SAS"
|
volume_type: "SAS"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
root_volume:
|
root_volume:
|
||||||
volume_type: "SAS"
|
volume_type: "SAS"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
@ -195,7 +195,7 @@
|
||||||
root_volume:
|
root_volume:
|
||||||
volume_type: "SAS"
|
volume_type: "SAS"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
volume_type: "SATA"
|
volume_type: "SATA"
|
||||||
size: 10
|
size: 10
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
volume_type: "SATA"
|
volume_type: "SATA"
|
||||||
size: 10
|
size: 10
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is false
|
- name: assert changed is false
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
size: 1
|
size: 1
|
||||||
port_id: "{{ port.id }}"
|
port_id: "{{ port.id }}"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
size: 1
|
size: 1
|
||||||
port_id: "{{ port.id }}"
|
port_id: "{{ port.id }}"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
size: 1
|
size: 1
|
||||||
port_id: "{{ port.id }}"
|
port_id: "{{ port.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
size: 1
|
size: 1
|
||||||
port_id: "{{ port.id }}"
|
port_id: "{{ port.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
peering_vpc:
|
peering_vpc:
|
||||||
vpc_id: "{{ vpc2.id }}"
|
vpc_id: "{{ vpc2.id }}"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
peering_vpc:
|
peering_vpc:
|
||||||
vpc_id: "{{ vpc2.id }}"
|
vpc_id: "{{ vpc2.id }}"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
peering_vpc:
|
peering_vpc:
|
||||||
vpc_id: "{{ vpc2.id }}"
|
vpc_id: "{{ vpc2.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
peering_vpc:
|
peering_vpc:
|
||||||
vpc_id: "{{ vpc2.id }}"
|
vpc_id: "{{ vpc2.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is false
|
- name: assert changed is false
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
ip_address: "192.168.100.33"
|
ip_address: "192.168.100.33"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
ip_address: "192.168.100.33"
|
ip_address: "192.168.100.33"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
ip_address: "192.168.100.33"
|
ip_address: "192.168.100.33"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
ip_address: "192.168.100.33"
|
ip_address: "192.168.100.33"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
ip_address: "192.168.100.33"
|
ip_address: "192.168.100.33"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
ip_address: "192.168.100.33"
|
ip_address: "192.168.100.33"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
ip_address: "192.168.100.33"
|
ip_address: "192.168.100.33"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
vpc_id: "{{ vpc1.id }}"
|
vpc_id: "{{ vpc1.id }}"
|
||||||
destination: "192.168.0.0/16"
|
destination: "192.168.0.0/16"
|
||||||
next_hop: "{{ connect.id }}"
|
next_hop: "{{ connect.id }}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
destination: "192.168.0.0/16"
|
destination: "192.168.0.0/16"
|
||||||
next_hop: "{{ connect.id }}"
|
next_hop: "{{ connect.id }}"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
destination: "192.168.0.0/16"
|
destination: "192.168.0.0/16"
|
||||||
next_hop: "{{ connect.id }}"
|
next_hop: "{{ connect.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
- name: delete a route
|
- name: delete a route
|
||||||
hwc_vpc_route:
|
hwc_vpc_route:
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
destination: "192.168.0.0/16"
|
destination: "192.168.0.0/16"
|
||||||
next_hop: "{{ connect.id }}"
|
next_hop: "{{ connect.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: not changed
|
- name: not changed
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
name: "ansible_network_security_group_test"
|
name: "ansible_network_security_group_test"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
name: "ansible_network_security_group_test"
|
name: "ansible_network_security_group_test"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: idemponent
|
register: idemponent
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
name: "ansible_network_security_group_test"
|
name: "ansible_network_security_group_test"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
port_range_min: 22
|
port_range_min: 22
|
||||||
remote_ip_prefix: "0.0.0.0/0"
|
remote_ip_prefix: "0.0.0.0/0"
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
port_range_min: 22
|
port_range_min: 22
|
||||||
remote_ip_prefix: "0.0.0.0/0"
|
remote_ip_prefix: "0.0.0.0/0"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
name: "ansible_network_subnet_test"
|
name: "ansible_network_subnet_test"
|
||||||
dhcp_enable: True
|
dhcp_enable: True
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
name: "ansible_network_subnet_test"
|
name: "ansible_network_subnet_test"
|
||||||
dhcp_enable: True
|
dhcp_enable: True
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
name: "ansible_network_subnet_test"
|
name: "ansible_network_subnet_test"
|
||||||
dhcp_enable: True
|
dhcp_enable: True
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: assert changed is true
|
- name: assert changed is true
|
||||||
assert:
|
assert:
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
name: "ansible_network_subnet_test"
|
name: "ansible_network_subnet_test"
|
||||||
dhcp_enable: True
|
dhcp_enable: True
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
- name: idemponent
|
- name: idemponent
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -174,7 +174,7 @@
|
||||||
path: "{{ output_file }}"
|
path: "{{ output_file }}"
|
||||||
section: mysqld
|
section: mysqld
|
||||||
option: skip-name
|
option: skip-name
|
||||||
allow_no_value: yes
|
allow_no_value: true
|
||||||
register: result8
|
register: result8
|
||||||
|
|
||||||
- name: test-value 8 - read content from output file
|
- name: test-value 8 - read content from output file
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
path: "{{ output_file }}"
|
path: "{{ output_file }}"
|
||||||
section: mysqld
|
section: mysqld
|
||||||
option: skip-name
|
option: skip-name
|
||||||
allow_no_value: yes
|
allow_no_value: true
|
||||||
register: result9
|
register: result9
|
||||||
|
|
||||||
- name: test-value 9 - assert 'changed' is false
|
- name: test-value 9 - assert 'changed' is false
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
ini_file:
|
ini_file:
|
||||||
path: "{{ output_file }}"
|
path: "{{ output_file }}"
|
||||||
section: new_empty_section
|
section: new_empty_section
|
||||||
allow_no_value: yes
|
allow_no_value: true
|
||||||
register: result10
|
register: result10
|
||||||
|
|
||||||
- name: test-value 10 - assert 'changed' is true and section added
|
- name: test-value 10 - assert 'changed' is true and section added
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
ini_file:
|
ini_file:
|
||||||
path: "{{ output_file }}"
|
path: "{{ output_file }}"
|
||||||
section: new_empty_section
|
section: new_empty_section
|
||||||
allow_no_value: yes
|
allow_no_value: true
|
||||||
register: result11
|
register: result11
|
||||||
|
|
||||||
- name: test-value 11 - assert 'changed' is false
|
- name: test-value 11 - assert 'changed' is false
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
state: absent
|
state: absent
|
||||||
path: "{{ output_file }}"
|
path: "{{ output_file }}"
|
||||||
section: new_empty_section
|
section: new_empty_section
|
||||||
allow_no_value: yes
|
allow_no_value: true
|
||||||
|
|
||||||
- name: test-value 12 - test allow_no_value with loop
|
- name: test-value 12 - test allow_no_value with loop
|
||||||
ini_file:
|
ini_file:
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
section: mysqld
|
section: mysqld
|
||||||
option: "{{ item.o }}"
|
option: "{{ item.o }}"
|
||||||
value: "{{ item.v | d(omit) }}"
|
value: "{{ item.v | d(omit) }}"
|
||||||
allow_no_value: yes
|
allow_no_value: true
|
||||||
loop:
|
loop:
|
||||||
- { o: "skip-name-resolve" }
|
- { o: "skip-name-resolve" }
|
||||||
- { o: "max_connections", v: "500" }
|
- { o: "max_connections", v: "500" }
|
||||||
|
@ -316,7 +316,7 @@
|
||||||
path: "{{ output_file }}"
|
path: "{{ output_file }}"
|
||||||
section: mysqld
|
section: mysqld
|
||||||
option: skip-name
|
option: skip-name
|
||||||
allow_no_value: yes
|
allow_no_value: true
|
||||||
register: result14
|
register: result14
|
||||||
|
|
||||||
- name: test-value 14 - read content from output file
|
- name: test-value 14 - read content from output file
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
copy:
|
copy:
|
||||||
content: ""
|
content: ""
|
||||||
dest: "{{ output_file }}"
|
dest: "{{ output_file }}"
|
||||||
force: yes
|
force: true
|
||||||
|
|
||||||
- name: test-value 16 - Ensure "beverage=coke" is created within no section
|
- name: test-value 16 - Ensure "beverage=coke" is created within no section
|
||||||
ini_file:
|
ini_file:
|
||||||
|
|
|
@ -722,7 +722,7 @@
|
||||||
copy:
|
copy:
|
||||||
content: ""
|
content: ""
|
||||||
dest: "{{ output_file }}"
|
dest: "{{ output_file }}"
|
||||||
force: yes
|
force: true
|
||||||
|
|
||||||
- name: "test-values 25 - Ensure 'beverage=[coke, pepsi]' is created within no section"
|
- name: "test-values 25 - Ensure 'beverage=[coke, pepsi]' is created within no section"
|
||||||
ini_file:
|
ini_file:
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- iptables
|
- iptables
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
|
|
||||||
- name: include tasks
|
- name: include tasks
|
||||||
|
@ -35,4 +35,4 @@
|
||||||
- xtables_lock is undefined
|
- xtables_lock is undefined
|
||||||
- ansible_connection in ['ssh', 'paramiko', 'smart']
|
- ansible_connection in ['ssh', 'paramiko', 'smart']
|
||||||
|
|
||||||
become: yes
|
become: true
|
||||||
|
|
|
@ -22,14 +22,14 @@
|
||||||
iptables_state:
|
iptables_state:
|
||||||
name: foobar
|
name: foobar
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.msg is match("Invalid options")
|
- iptables_state.msg is match("Invalid options")
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,14 +37,14 @@
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: foobar
|
path: foobar
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.msg is match("missing required arguments")
|
- iptables_state.msg is match("missing required arguments")
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,14 +52,14 @@
|
||||||
iptables_state:
|
iptables_state:
|
||||||
state: saved
|
state: saved
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.msg is match("missing required arguments")
|
- iptables_state.msg is match("missing required arguments")
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,14 +68,14 @@
|
||||||
path: foobar
|
path: foobar
|
||||||
state: present
|
state: present
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.msg is match("value of state must be one of")
|
- iptables_state.msg is match("value of state must be one of")
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -89,14 +89,14 @@
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
state: saved
|
state: saved
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- iptables_state is changed
|
- iptables_state is changed
|
||||||
- iptables_state.initial_state == iptables_state.saved
|
- iptables_state.initial_state == iptables_state.saved
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is changed
|
- iptables_state is changed
|
||||||
- iptables_state.initial_state == iptables_state.saved
|
- iptables_state.initial_state == iptables_state.saved
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
- iptables_state.initial_state == iptables_state.saved
|
- iptables_state.initial_state == iptables_state.saved
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,14 +135,14 @@
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
state: saved
|
state: saved
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
- iptables_state.initial_state == iptables_state.saved
|
- iptables_state.initial_state == iptables_state.saved
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,14 +157,14 @@
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
state: restored
|
state: restored
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
- iptables_state.initial_state == iptables_state.restored
|
- iptables_state.initial_state == iptables_state.restored
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.stderr is search('xtables lock')
|
- iptables_state.stderr is search('xtables lock')
|
||||||
quiet: yes
|
quiet: true
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
- iptables_state.initial_state == iptables_state.restored
|
- iptables_state.initial_state == iptables_state.restored
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.stderr is search('xtables lock')
|
- iptables_state.stderr is search('xtables lock')
|
||||||
quiet: yes
|
quiet: true
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
@ -217,14 +217,14 @@
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
state: restored
|
state: restored
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- iptables_state is changed
|
- iptables_state is changed
|
||||||
- iptables_state.initial_state != iptables_state.restored
|
- iptables_state.initial_state != iptables_state.restored
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.stderr is search('xtables lock')
|
- iptables_state.stderr is search('xtables lock')
|
||||||
quiet: yes
|
quiet: true
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
- iptables_state is changed
|
- iptables_state is changed
|
||||||
- iptables_state.initial_state != iptables_state.restored
|
- iptables_state.initial_state != iptables_state.restored
|
||||||
- iptables_state.applied
|
- iptables_state.applied
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
||||||
|
@ -261,7 +261,7 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.stderr is search('xtables lock')
|
- iptables_state.stderr is search('xtables lock')
|
||||||
quiet: yes
|
quiet: true
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
- iptables_state.initial_state == iptables_state.restored
|
- iptables_state.initial_state == iptables_state.restored
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
||||||
|
@ -289,7 +289,7 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.stderr is search('xtables lock')
|
- iptables_state.stderr is search('xtables lock')
|
||||||
quiet: yes
|
quiet: true
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
@ -301,14 +301,14 @@
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
state: restored
|
state: restored
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
- iptables_state.initial_state == iptables_state.restored
|
- iptables_state.initial_state == iptables_state.restored
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
- name: "assert that results are not as expected for only one reason (xtables lock)"
|
||||||
|
@ -316,5 +316,5 @@
|
||||||
that:
|
that:
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
- iptables_state.stderr is search('xtables lock')
|
- iptables_state.stderr is search('xtables lock')
|
||||||
quiet: yes
|
quiet: true
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
changed_when: false
|
changed_when: false
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
- "'*filter' in iptables_state.initial_state"
|
- "'*filter' in iptables_state.initial_state"
|
||||||
- iptables_state.tables.filter is defined
|
- iptables_state.tables.filter is defined
|
||||||
- iptables_state.tables.nat is undefined
|
- iptables_state.tables.nat is undefined
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
changed_when: false
|
changed_when: false
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
- "'*filter' in iptables_state.initial_state"
|
- "'*filter' in iptables_state.initial_state"
|
||||||
- iptables_state.tables.nat is defined
|
- iptables_state.tables.nat is defined
|
||||||
- iptables_state.tables.filter is undefined
|
- iptables_state.tables.filter is undefined
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
- "'*nat' not in iptables_state.saved"
|
- "'*nat' not in iptables_state.saved"
|
||||||
- iptables_state.tables.filter is defined
|
- iptables_state.tables.filter is defined
|
||||||
- iptables_state.tables.nat is undefined
|
- iptables_state.tables.nat is undefined
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
- "'*filter' not in iptables_state.saved"
|
- "'*filter' not in iptables_state.saved"
|
||||||
- iptables_state.tables.nat is defined
|
- iptables_state.tables.nat is defined
|
||||||
- iptables_state.tables.filter is undefined
|
- iptables_state.tables.filter is undefined
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
- "'*nat' in iptables_state.saved"
|
- "'*nat' in iptables_state.saved"
|
||||||
- iptables_state.tables.filter is defined
|
- iptables_state.tables.filter is defined
|
||||||
- iptables_state.tables.nat is defined
|
- iptables_state.tables.nat is defined
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
- iptables_state.tables.nat is defined
|
- iptables_state.tables.nat is defined
|
||||||
- iptables_state.tables.filter is undefined
|
- iptables_state.tables.filter is undefined
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
- "'-A INPUT -j ACCEPT' not in iptables_state.restored"
|
- "'-A INPUT -j ACCEPT' not in iptables_state.restored"
|
||||||
- iptables_state.tables.filter is undefined
|
- iptables_state.tables.filter is undefined
|
||||||
- iptables_state is changed
|
- iptables_state is changed
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
- raw
|
- raw
|
||||||
- mangle
|
- mangle
|
||||||
changed_when: false
|
changed_when: false
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
- "'*nat' in iptables_state.saved"
|
- "'*nat' in iptables_state.saved"
|
||||||
- "'raw' in iptables_state.tables"
|
- "'raw' in iptables_state.tables"
|
||||||
- "'*raw' in iptables_state.saved"
|
- "'*raw' in iptables_state.saved"
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
- "'*nat' not in iptables_state.restored"
|
- "'*nat' not in iptables_state.restored"
|
||||||
- "'*raw' not in iptables_state.restored"
|
- "'*raw' not in iptables_state.restored"
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
- "'*nat' in iptables_state.restored"
|
- "'*nat' in iptables_state.restored"
|
||||||
- "'*raw' in iptables_state.restored"
|
- "'*raw' in iptables_state.restored"
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
quiet: yes
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
async: "{{ ansible_timeout }}"
|
async: "{{ ansible_timeout }}"
|
||||||
poll: 0
|
poll: 0
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: "explain expected failure"
|
- name: "explain expected failure"
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
path: "{{ iptables_tests }}"
|
path: "{{ iptables_tests }}"
|
||||||
state: restored
|
state: restored
|
||||||
register: iptables_state
|
register: iptables_state
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "assert that results are as expected"
|
- name: "assert that results are as expected"
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
username: '{{ username }}'
|
username: '{{ username }}'
|
||||||
password: '{{ password }}'
|
password: '{{ password }}'
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: assert the failure of the new SRV record
|
- name: assert the failure of the new SRV record
|
||||||
assert:
|
assert:
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
flags: S
|
flags: S
|
||||||
username: '{{ username }}'
|
username: '{{ username }}'
|
||||||
password: '{{ password }}'
|
password: '{{ password }}'
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: assert the NAPTR check_mode
|
- name: assert the NAPTR check_mode
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
dest_iso: "{{ output_test_dir }}/test.iso"
|
dest_iso: "{{ output_test_dir }}/test.iso"
|
||||||
interchange_level: 3
|
interchange_level: 3
|
||||||
register: iso_result
|
register: iso_result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- debug: var=iso_result
|
- debug: var=iso_result
|
||||||
|
|
||||||
- name: Check if iso file created
|
- name: Check if iso file created
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
- name: Gather facts
|
- name: Gather facts
|
||||||
setup:
|
setup:
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Include distribution specific variables
|
- name: Include distribution specific variables
|
||||||
include_vars: "{{ lookup('first_found', params) }}"
|
include_vars: "{{ lookup('first_found', params) }}"
|
||||||
|
@ -45,8 +45,8 @@
|
||||||
homebrew:
|
homebrew:
|
||||||
name: p7zip
|
name: p7zip
|
||||||
state: present
|
state: present
|
||||||
update_homebrew: no
|
update_homebrew: false
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
# Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a
|
# Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a
|
||||||
# proper solution can be found
|
# proper solution can be found
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
- name: Test in normal mode
|
- name: Test in normal mode
|
||||||
import_tasks: tests.yml
|
import_tasks: tests.yml
|
||||||
vars:
|
vars:
|
||||||
in_check_mode: no
|
in_check_mode: false
|
||||||
|
|
||||||
- name: Prepare environment
|
- name: Prepare environment
|
||||||
import_tasks: prepare.yml
|
import_tasks: prepare.yml
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
- name: Test in check-mode
|
- name: Test in check-mode
|
||||||
import_tasks: tests.yml
|
import_tasks: tests.yml
|
||||||
vars:
|
vars:
|
||||||
in_check_mode: yes
|
in_check_mode: true
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
# FIXME - fill this in after figuring out how to allow mounts
|
# FIXME - fill this in after figuring out how to allow mounts
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
cert_alias: default
|
cert_alias: default
|
||||||
keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}"
|
keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}"
|
||||||
keystore_pass: changeme_keystore
|
keystore_pass: changeme_keystore
|
||||||
keystore_create: yes
|
keystore_create: true
|
||||||
state: present
|
state: present
|
||||||
register: result_success
|
register: result_success
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
cert_alias: default_new
|
cert_alias: default_new
|
||||||
keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}"
|
keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}"
|
||||||
keystore_pass: changeme_keystore
|
keystore_pass: changeme_keystore
|
||||||
keystore_create: yes
|
keystore_create: true
|
||||||
state: present
|
state: present
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: result_wrong_pass
|
register: result_wrong_pass
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
cert_alias: default
|
cert_alias: default
|
||||||
keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}"
|
keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}"
|
||||||
keystore_pass: changeme_keystore
|
keystore_pass: changeme_keystore
|
||||||
keystore_create: yes
|
keystore_create: true
|
||||||
state: present
|
state: present
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: result_excl_params
|
register: result_excl_params
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
pkcs12_password: "{{ test_keystore2_password }}"
|
pkcs12_password: "{{ test_keystore2_password }}"
|
||||||
keystore_path: "{{ test_keystore2_path }}"
|
keystore_path: "{{ test_keystore2_path }}"
|
||||||
keystore_pass: "{{ test_keystore2_password }}"
|
keystore_pass: "{{ test_keystore2_password }}"
|
||||||
keystore_create: yes
|
keystore_create: true
|
||||||
|
|
||||||
- name: List newly created keystore content
|
- name: List newly created keystore content
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
|
@ -138,8 +138,8 @@
|
||||||
pkcs12_password: "{{ test_keystore2_password }}"
|
pkcs12_password: "{{ test_keystore2_password }}"
|
||||||
keystore_path: "{{ test_keystore2_path }}"
|
keystore_path: "{{ test_keystore2_path }}"
|
||||||
keystore_pass: "{{ test_keystore2_password }}"
|
keystore_pass: "{{ test_keystore2_password }}"
|
||||||
keystore_create: yes
|
keystore_create: true
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result_x509_changed
|
register: result_x509_changed
|
||||||
|
|
||||||
- name: Verify the x509 status is failed
|
- name: Verify the x509 status is failed
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
cert_path: "{{ test_cert_path }}"
|
cert_path: "{{ test_cert_path }}"
|
||||||
keystore_path: "{{ test_keystore2_path }}"
|
keystore_path: "{{ test_keystore2_path }}"
|
||||||
keystore_pass: "{{ test_keystore2_password }}"
|
keystore_pass: "{{ test_keystore2_password }}"
|
||||||
keystore_create: yes
|
keystore_create: true
|
||||||
state: present
|
state: present
|
||||||
register: result_x509_changed
|
register: result_x509_changed
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
loop: "{{ java_keystore_certs }}"
|
loop: "{{ java_keystore_certs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: loop_index
|
index_var: loop_index
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result_check
|
register: result_check
|
||||||
|
|
||||||
- name: Create a Java keystore for the given certificates
|
- name: Create a Java keystore for the given certificates
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
loop: "{{ java_keystore_certs }}"
|
loop: "{{ java_keystore_certs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: loop_index
|
index_var: loop_index
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result_idem_check
|
register: result_idem_check
|
||||||
|
|
||||||
- name: Create a Java keystore for the given certificates (idempotency)
|
- name: Create a Java keystore for the given certificates (idempotency)
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
loop: "{{ java_keystore_new_certs }}"
|
loop: "{{ java_keystore_new_certs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: loop_index
|
index_var: loop_index
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result_change_check
|
register: result_change_check
|
||||||
|
|
||||||
- name: Create a Java keystore for the given certificates (certificate changed)
|
- name: Create a Java keystore for the given certificates (certificate changed)
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
loop: "{{ java_keystore_new_certs }}"
|
loop: "{{ java_keystore_new_certs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: loop_index
|
index_var: loop_index
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result_alias_change_check
|
register: result_alias_change_check
|
||||||
|
|
||||||
- name: Create a Java keystore for the given certificates (alias changed)
|
- name: Create a Java keystore for the given certificates (alias changed)
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
loop: "{{ java_keystore_new_certs }}"
|
loop: "{{ java_keystore_new_certs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: loop_index
|
index_var: loop_index
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result_pw_change_check
|
register: result_pw_change_check
|
||||||
|
|
||||||
- name: Create a Java keystore for the given certificates (password changed)
|
- name: Create a Java keystore for the given certificates (password changed)
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
loop: "{{ java_keystore_new_certs }}"
|
loop: "{{ java_keystore_new_certs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: loop_index
|
index_var: loop_index
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result_type_pkcs12_check
|
register: result_type_pkcs12_check
|
||||||
|
|
||||||
- name: Create a Java keystore for the given certificates (force keystore type jks, check mode)
|
- name: Create a Java keystore for the given certificates (force keystore type jks, check mode)
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
loop: "{{ java_keystore_new_certs }}"
|
loop: "{{ java_keystore_new_certs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: loop_index
|
index_var: loop_index
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result_type_jks_check
|
register: result_type_jks_check
|
||||||
|
|
||||||
- name: Create a Java keystore for the given certificates (force keystore type jks)
|
- name: Create a Java keystore for the given certificates (force keystore type jks)
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
loop: "{{ java_keystore_new_certs }}"
|
loop: "{{ java_keystore_new_certs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: loop_index
|
index_var: loop_index
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result_type_change_check
|
register: result_type_change_check
|
||||||
|
|
||||||
- name: Create a Java keystore for the given certificates (keystore type changed)
|
- name: Create a Java keystore for the given certificates (keystore type changed)
|
||||||
|
@ -248,7 +248,7 @@
|
||||||
loop: "{{ java_keystore_new_certs }}"
|
loop: "{{ java_keystore_new_certs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: loop_index
|
index_var: loop_index
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result_type_omit_check
|
register: result_type_omit_check
|
||||||
|
|
||||||
- name: Create a Java keystore for the given certificates (omit keystore type)
|
- name: Create a Java keystore for the given certificates (omit keystore type)
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
test_deployment: helloworld-1.war
|
test_deployment: helloworld-1.war
|
||||||
task_parameters: &task_parameters
|
task_parameters: &task_parameters
|
||||||
become_user: '{{ wf_user }}'
|
become_user: '{{ wf_user }}'
|
||||||
become: yes
|
become: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
block:
|
block:
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
jboss:
|
jboss:
|
||||||
deployment: '{{ war_file_1 }}'
|
deployment: '{{ war_file_1 }}'
|
||||||
src: '{{ war_file_1_path }}'
|
src: '{{ war_file_1_path }}'
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
<<: *task_parameters
|
<<: *task_parameters
|
||||||
file:
|
file:
|
||||||
path: '{{ deploy_dir }}/{{ war_file_1 }}.deployed'
|
path: '{{ deploy_dir }}/{{ war_file_1 }}.deployed'
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
deployment: '{{ war_file_1 }}'
|
deployment: '{{ war_file_1 }}'
|
||||||
src: '{{ war_file_1_path }}'
|
src: '{{ war_file_1_path }}'
|
||||||
deploy_path: '{{ deploy_dir }}'
|
deploy_path: '{{ deploy_dir }}'
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
deployment: '{{ war_file_1 }}'
|
deployment: '{{ war_file_1 }}'
|
||||||
deploy_path: '{{ deploy_dir }}'
|
deploy_path: '{{ deploy_dir }}'
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
deployment: '{{ war_file_1 }}'
|
deployment: '{{ war_file_1 }}'
|
||||||
deploy_path: '{{ deploy_dir }}'
|
deploy_path: '{{ deploy_dir }}'
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
deploy_path: '{{ deploy_dir }}'
|
deploy_path: '{{ deploy_dir }}'
|
||||||
src: '{{ fake_src_path }}'
|
src: '{{ fake_src_path }}'
|
||||||
state: present
|
state: present
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
@ -230,7 +230,7 @@
|
||||||
jboss:
|
jboss:
|
||||||
deployment: '{{ war_file_1 }}'
|
deployment: '{{ war_file_1 }}'
|
||||||
state: present
|
state: present
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
- name: Check client again with same props
|
- name: Check client again with same props
|
||||||
community.general.keycloak_client: "{{ auth_args | combine(call_args) }}"
|
community.general.keycloak_client: "{{ auth_args | combine(call_args) }}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
vars:
|
vars:
|
||||||
call_args:
|
call_args:
|
||||||
realm: "{{ realm }}"
|
realm: "{{ realm }}"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
template:
|
template:
|
||||||
src: "{{ launchd_service_name }}.plist.j2"
|
src: "{{ launchd_service_name }}.plist.j2"
|
||||||
dest: "{{ launchd_plist_location }}"
|
dest: "{{ launchd_plist_location }}"
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: install the test daemon script
|
- name: install the test daemon script
|
||||||
copy:
|
copy:
|
||||||
|
@ -20,4 +20,4 @@
|
||||||
path: /usr/local/sbin/ansible_test_service
|
path: /usr/local/sbin/ansible_test_service
|
||||||
line: "#!{{ ansible_python_interpreter | realpath }}"
|
line: "#!{{ ansible_python_interpreter | realpath }}"
|
||||||
insertbefore: BOF
|
insertbefore: BOF
|
||||||
firstmatch: yes
|
firstmatch: true
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: unloaded
|
state: unloaded
|
||||||
become: yes
|
become: true
|
||||||
register: launchd_unloaded_result
|
register: launchd_unloaded_result
|
||||||
|
|
||||||
- name: "[{{ item }}] Validation"
|
- name: "[{{ item }}] Validation"
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ launchd_plist_location }}"
|
path: "{{ launchd_plist_location }}"
|
||||||
state: absent
|
state: absent
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: "[{{ item }}] Remove test service server"
|
- name: "[{{ item }}] Remove test service server"
|
||||||
file:
|
file:
|
||||||
path: "/usr/local/sbin/ansible_test_service"
|
path: "/usr/local/sbin/ansible_test_service"
|
||||||
state: absent
|
state: absent
|
||||||
become: yes
|
become: true
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_start_result_check_mode"
|
register: "test_1_launchd_start_result_check_mode"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "[{{ item }}] Assert that everything work in check mode"
|
- name: "[{{ item }}] Assert that everything work in check mode"
|
||||||
assert:
|
assert:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_start_result"
|
register: "test_1_launchd_start_result"
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,13 +37,13 @@
|
||||||
template:
|
template:
|
||||||
src: "modified.{{ launchd_service_name }}.plist.j2"
|
src: "modified.{{ launchd_service_name }}.plist.j2"
|
||||||
dest: "{{ launchd_plist_location }}"
|
dest: "{{ launchd_plist_location }}"
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: "[{{ item }}] When reloading the service..."
|
- name: "[{{ item }}] When reloading the service..."
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: reloaded
|
state: reloaded
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_reload_result"
|
register: "test_1_launchd_reload_result"
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service was reloaded"
|
- name: "[{{ item }}] Validate that service was reloaded"
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_start_result"
|
register: "test_1_launchd_start_result"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_start_result"
|
register: "test_1_launchd_start_result"
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_restart_result_check_mode"
|
register: "test_1_launchd_restart_result_check_mode"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service was restarted in check mode"
|
- name: "[{{ item }}] Validate that service was restarted in check mode"
|
||||||
assert:
|
assert:
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_restart_result"
|
register: "test_1_launchd_restart_result"
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service was restarted"
|
- name: "[{{ item }}] Validate that service was restarted"
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
become: yes
|
become: true
|
||||||
register: test_1_launchd_start_result
|
register: test_1_launchd_start_result
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service was started"
|
- name: "[{{ item }}] Validate that service was started"
|
||||||
|
@ -31,6 +31,6 @@
|
||||||
\s+<key>RunAtLoad</key>
|
\s+<key>RunAtLoad</key>
|
||||||
\s+<true/>
|
\s+<true/>
|
||||||
replace: found_run_at_load
|
replace: found_run_at_load
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: contents_would_have
|
register: contents_would_have
|
||||||
failed_when: not contents_would_have is changed
|
failed_when: not contents_would_have is changed
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_start_result_check_mode"
|
register: "test_1_launchd_start_result_check_mode"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service was started in check mode"
|
- name: "[{{ item }}] Validate that service was started in check mode"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_start_result"
|
register: "test_1_launchd_start_result"
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
become: yes
|
become: true
|
||||||
register: "test_2_launchd_stop_result"
|
register: "test_2_launchd_stop_result"
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service was stopped after it was started"
|
- name: "[{{ item }}] Validate that service was stopped after it was started"
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
become: yes
|
become: true
|
||||||
register: "test_3_launchd_stop_result"
|
register: "test_3_launchd_stop_result"
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service can be stopped after being already stopped"
|
- name: "[{{ item }}] Validate that service can be stopped after being already stopped"
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: true
|
||||||
register: "test_4_launchd_start_result"
|
register: "test_4_launchd_start_result"
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service was started..."
|
- name: "[{{ item }}] Validate that service was started..."
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: true
|
||||||
register: "test_5_launchd_start_result"
|
register: "test_5_launchd_start_result"
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service is still in the same state as before"
|
- name: "[{{ item }}] Validate that service is still in the same state as before"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_start_result"
|
register: "test_1_launchd_start_result"
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: unloaded
|
state: unloaded
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_unloaded_result_check_mode"
|
register: "test_1_launchd_unloaded_result_check_mode"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service was unloaded in check mode"
|
- name: "[{{ item }}] Validate that service was unloaded in check mode"
|
||||||
assert:
|
assert:
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: unloaded
|
state: unloaded
|
||||||
become: yes
|
become: true
|
||||||
register: "test_1_launchd_unloaded_result"
|
register: "test_1_launchd_unloaded_result"
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service was unloaded"
|
- name: "[{{ item }}] Validate that service was unloaded"
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
launchd:
|
launchd:
|
||||||
name: "{{ launchd_service_name }}"
|
name: "{{ launchd_service_name }}"
|
||||||
state: unloaded
|
state: unloaded
|
||||||
become: yes
|
become: true
|
||||||
register: "test_2_launchd_unloaded_result"
|
register: "test_2_launchd_unloaded_result"
|
||||||
|
|
||||||
- name: "[{{ item }}] Validate that service did not change and is still unloaded"
|
- name: "[{{ item }}] Validate that service did not change and is still unloaded"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
dn: "ou=users,dc=example,dc=com"
|
dn: "ou=users,dc=example,dc=com"
|
||||||
scope: "onelevel"
|
scope: "onelevel"
|
||||||
filter: "(uid=ldaptest)"
|
filter: "(uid=ldaptest)"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
- name: assert that test LDAP user can be found
|
- name: assert that test LDAP user can be found
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
- name: Test dig lookup with non-existing domain and fail_on_error=yes
|
- name: Test dig lookup with non-existing domain and fail_on_error=yes
|
||||||
set_fact:
|
set_fact:
|
||||||
dig_nonexisting_fail_yes: "{{ lookup('community.general.dig', 'non-existing.domain.', 'fail_on_error=yes') }}"
|
dig_nonexisting_fail_yes: "{{ lookup('community.general.dig', 'non-existing.domain.', 'fail_on_error=yes') }}"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: dig_nonexisting_fail_yes_result
|
register: dig_nonexisting_fail_yes_result
|
||||||
|
|
||||||
- name: Verify that the task failed
|
- name: Verify that the task failed
|
||||||
|
|
|
@ -32,14 +32,14 @@
|
||||||
package:
|
package:
|
||||||
name: password-store
|
name: password-store
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
disable_gpg_check: yes
|
disable_gpg_check: true
|
||||||
when: ansible_facts.pkg_mgr in ['zypper', 'community.general.zypper']
|
when: ansible_facts.pkg_mgr in ['zypper', 'community.general.zypper']
|
||||||
|
|
||||||
# See https://github.com/gopasspw/gopass/issues/1849#issuecomment-802789285
|
# See https://github.com/gopasspw/gopass/issues/1849#issuecomment-802789285
|
||||||
- name: Install gopass on Debian
|
- name: Install gopass on Debian
|
||||||
when: ansible_facts.os_family == 'Debian'
|
when: ansible_facts.os_family == 'Debian'
|
||||||
become: yes
|
become: true
|
||||||
block:
|
block:
|
||||||
- name: Fetch gopass repo keyring
|
- name: Fetch gopass repo keyring
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
- name: Update apt-cache and install gopass package
|
- name: Update apt-cache and install gopass package
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: gopass
|
name: gopass
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
|
|
||||||
- name: Install on macOS
|
- name: Install on macOS
|
||||||
when: ansible_facts.distribution == 'MacOSX'
|
when: ansible_facts.distribution == 'MacOSX'
|
||||||
|
@ -75,8 +75,8 @@
|
||||||
- pass
|
- pass
|
||||||
- gopass
|
- gopass
|
||||||
state: present
|
state: present
|
||||||
update_homebrew: no
|
update_homebrew: false
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||||
# Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a
|
# Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a
|
||||||
# proper solution can be found
|
# proper solution can be found
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
- name: Stop gpg-agent so we can remove any locks on the GnuPG dir
|
- name: Stop gpg-agent so we can remove any locks on the GnuPG dir
|
||||||
command: gpgconf --kill gpg-agent
|
command: gpgconf --kill gpg-agent
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Remove previous password files and directory
|
- name: Remove previous password files and directory
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
gather_facts: no
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Call plugin
|
- name: Call plugin
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
gather_facts: no
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Call plugin
|
- name: Call plugin
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
- name: Raise error when impossible constraints are provided
|
- name: Raise error when impossible constraints are provided
|
||||||
set_fact:
|
set_fact:
|
||||||
impossible: "{{ query('community.general.random_string', upper=false, lower=false, special=false, numbers=false) }}"
|
impossible: "{{ query('community.general.random_string', upper=false, lower=false, special=false, numbers=false) }}"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: impossible_result
|
register: impossible_result
|
||||||
|
|
||||||
- name: Check results
|
- name: Check results
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
lvg:
|
lvg:
|
||||||
vg: testvg
|
vg: testvg
|
||||||
pvs: "{{ loop_device1 }}"
|
pvs: "{{ loop_device1 }}"
|
||||||
pvresize: no
|
pvresize: false
|
||||||
register: cmd_result
|
register: cmd_result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -47,8 +47,8 @@
|
||||||
lvg:
|
lvg:
|
||||||
vg: testvg
|
vg: testvg
|
||||||
pvs: "{{ loop_device1 }}"
|
pvs: "{{ loop_device1 }}"
|
||||||
pvresize: yes
|
pvresize: true
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: cmd_result
|
register: cmd_result
|
||||||
|
|
||||||
- name: Assert that the module returned the state was changed
|
- name: Assert that the module returned the state was changed
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
lvg:
|
lvg:
|
||||||
vg: testvg
|
vg: testvg
|
||||||
pvs: "{{ loop_device1 }}"
|
pvs: "{{ loop_device1 }}"
|
||||||
pvresize: yes
|
pvresize: true
|
||||||
|
|
||||||
- name: Gets current vg size
|
- name: Gets current vg size
|
||||||
shell: vgs -v testvg -o pv_size --noheading --units b | xargs
|
shell: vgs -v testvg -o pv_size --noheading --units b | xargs
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
pip:
|
pip:
|
||||||
name: smtpd-tls
|
name: smtpd-tls
|
||||||
state: present
|
state: present
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: smtpd_tls
|
register: smtpd_tls
|
||||||
|
|
||||||
- name: Install test smtpserver
|
- name: Install test smtpserver
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
body: Test body 4
|
body: Test body 4
|
||||||
attach: /etc/group
|
attach: /etc/group
|
||||||
secure: starttls
|
secure: starttls
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: starttls_support
|
register: starttls_support
|
||||||
|
|
||||||
# NOTE: This might fail if smtpd-tls is missing or python 2.7.8 or older is used
|
# NOTE: This might fail if smtpd-tls is missing or python 2.7.8 or older is used
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
body: Test body 5
|
body: Test body 5
|
||||||
attach: /etc/group
|
attach: /etc/group
|
||||||
secure: always
|
secure: always
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: tls_support
|
register: tls_support
|
||||||
|
|
||||||
- fail:
|
- fail:
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
mas:
|
mas:
|
||||||
id: 421879749
|
id: 421879749
|
||||||
state: absent
|
state: absent
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Determine whether the app is installed
|
- name: Determine whether the app is installed
|
||||||
stat:
|
stat:
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
id: 421879749
|
id: 421879749
|
||||||
state: present
|
state: present
|
||||||
register: install_check
|
register: install_check
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Ensure that the status would have changed
|
- name: Ensure that the status would have changed
|
||||||
assert:
|
assert:
|
||||||
|
@ -98,8 +98,8 @@
|
||||||
id: 421879749
|
id: 421879749
|
||||||
state: absent
|
state: absent
|
||||||
register: uninstall_check
|
register: uninstall_check
|
||||||
become: yes
|
become: true
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Ensure that the status would have changed
|
- name: Ensure that the status would have changed
|
||||||
assert:
|
assert:
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
id: 421879749
|
id: 421879749
|
||||||
state: absent
|
state: absent
|
||||||
register: uninstall
|
register: uninstall
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Ensure that the status changed
|
- name: Ensure that the status changed
|
||||||
assert:
|
assert:
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
id: 421879749
|
id: 421879749
|
||||||
state: absent
|
state: absent
|
||||||
register: uninstall_again
|
register: uninstall_again
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Ensure that the status is unchanged (already uninstalled)
|
- name: Ensure that the status is unchanged (already uninstalled)
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -18,7 +18,7 @@ options:
|
||||||
a:
|
a:
|
||||||
description: aaaa
|
description: aaaa
|
||||||
type: int
|
type: int
|
||||||
required: yes
|
required: true
|
||||||
b:
|
b:
|
||||||
description: bbbb
|
description: bbbb
|
||||||
type: str
|
type: str
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
- name: test failing dependency
|
- name: test failing dependency
|
||||||
mdepfail:
|
mdepfail:
|
||||||
a: 123
|
a: 123
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: assert failing dependency
|
- name: assert failing dependency
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
- name: test msimple 2
|
- name: test msimple 2
|
||||||
msimple:
|
msimple:
|
||||||
a: 101
|
a: 101
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: simple2
|
register: simple2
|
||||||
|
|
||||||
- name: assert simple2
|
- name: assert simple2
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
msimple:
|
msimple:
|
||||||
a: 101
|
a: 101
|
||||||
m: a message in a bottle
|
m: a message in a bottle
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: simple3
|
register: simple3
|
||||||
|
|
||||||
- name: assert simple3
|
- name: assert simple3
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
- ansible_distribution_major_version is version('9', '<')
|
- ansible_distribution_major_version is version('9', '<')
|
||||||
|
|
||||||
- name: create required directories
|
- name: create required directories
|
||||||
become: yes
|
become: true
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
- "{{ process_root }}"
|
- "{{ process_root }}"
|
||||||
|
|
||||||
- name: install monit
|
- name: install monit
|
||||||
become: yes
|
become: true
|
||||||
package:
|
package:
|
||||||
name: monit
|
name: monit
|
||||||
state: present
|
state: present
|
||||||
|
@ -40,13 +40,13 @@
|
||||||
- 'defaults.yml'
|
- 'defaults.yml'
|
||||||
|
|
||||||
- name: monit config
|
- name: monit config
|
||||||
become: yes
|
become: true
|
||||||
template:
|
template:
|
||||||
src: "monitrc.j2"
|
src: "monitrc.j2"
|
||||||
dest: "{{ monitrc }}"
|
dest: "{{ monitrc }}"
|
||||||
|
|
||||||
- name: copy process file
|
- name: copy process file
|
||||||
become: yes
|
become: true
|
||||||
copy:
|
copy:
|
||||||
src: httpd_echo.py
|
src: httpd_echo.py
|
||||||
dest: "{{ process_file }}"
|
dest: "{{ process_file }}"
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
- python-daemon
|
- python-daemon
|
||||||
|
|
||||||
- name: restart monit
|
- name: restart monit
|
||||||
become: yes
|
become: true
|
||||||
service:
|
service:
|
||||||
name: monit
|
name: monit
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@ -82,13 +82,13 @@
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: stop monit
|
- name: stop monit
|
||||||
become: yes
|
become: true
|
||||||
service:
|
service:
|
||||||
name: monit
|
name: monit
|
||||||
state: stopped
|
state: stopped
|
||||||
|
|
||||||
- name: uninstall monit
|
- name: uninstall monit
|
||||||
become: yes
|
become: true
|
||||||
package:
|
package:
|
||||||
name: monit
|
name: monit
|
||||||
state: absent
|
state: absent
|
||||||
|
|
|
@ -169,7 +169,7 @@
|
||||||
login_host: "{{ mssql_host }}"
|
login_host: "{{ mssql_host }}"
|
||||||
login_port: "{{ mssql_port }}"
|
login_port: "{{ mssql_port }}"
|
||||||
script: SELECT Invalid_Column FROM Does_Not_Exist WITH Invalid Syntax
|
script: SELECT Invalid_Column FROM Does_Not_Exist WITH Invalid Syntax
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: check_mode
|
register: check_mode
|
||||||
- assert:
|
- assert:
|
||||||
that: check_mode.query_results is undefined
|
that: check_mode.query_results is undefined
|
||||||
|
|
|
@ -7,5 +7,5 @@
|
||||||
unarchive:
|
unarchive:
|
||||||
src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/npm/{{ nodejs_path }}.tar.gz'
|
src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/npm/{{ nodejs_path }}.tar.gz'
|
||||||
dest: '{{ remote_tmp_dir }}'
|
dest: '{{ remote_tmp_dir }}'
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
creates: '{{ remote_tmp_dir }}/{{ nodejs_path }}.tar.gz'
|
creates: '{{ remote_tmp_dir }}/{{ nodejs_path }}.tar.gz'
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
type: string
|
type: string
|
||||||
state: present
|
state: present
|
||||||
register: missing_value
|
register: missing_value
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Test if state and value are required together
|
- name: Test if state and value are required together
|
||||||
assert:
|
assert:
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
value: Centimeter
|
value: Centimeter
|
||||||
state: present
|
state: present
|
||||||
register: measure_task_check_mode
|
register: measure_task_check_mode
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: Test if AppleMeasurementUnits value is changed to Centimeters in check_mode
|
- name: Test if AppleMeasurementUnits value is changed to Centimeters in check_mode
|
||||||
assert:
|
assert:
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
key: ExampleKeyToRemove
|
key: ExampleKeyToRemove
|
||||||
state: absent
|
state: absent
|
||||||
register: absent_check_mode_task
|
register: absent_check_mode_task
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
msg: "{{ absent_check_mode_task }}"
|
msg: "{{ absent_check_mode_task }}"
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
value:
|
value:
|
||||||
- 'Value with spaces'
|
- 'Value with spaces'
|
||||||
type: array
|
type: array
|
||||||
array_add: yes
|
array_add: true
|
||||||
register: test_array_add
|
register: test_array_add
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -238,7 +238,7 @@
|
||||||
value:
|
value:
|
||||||
- 'Value with spaces'
|
- 'Value with spaces'
|
||||||
type: array
|
type: array
|
||||||
array_add: yes
|
array_add: true
|
||||||
register: test_array_add
|
register: test_array_add
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
- name: Remove {{ package_name }} - nosave
|
- name: Remove {{ package_name }} - nosave
|
||||||
pacman:
|
pacman:
|
||||||
name: '{{ package_name }}'
|
name: '{{ package_name }}'
|
||||||
remove_nosave: yes
|
remove_nosave: true
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Make sure {{config_file}}.pacsave does not exist
|
- name: Make sure {{config_file}}.pacsave does not exist
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
limit_item: nofile
|
limit_item: nofile
|
||||||
value: '64000'
|
value: '64000'
|
||||||
dest: "{{ test_limit_file }}"
|
dest: "{{ test_limit_file }}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: check_mode_test
|
register: check_mode_test
|
||||||
|
|
||||||
- name: Test that check mode is working
|
- name: Test that check mode is working
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
- name: install application tox again force
|
- name: install application tox again force
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
name: tox
|
name: tox
|
||||||
force: yes
|
force: true
|
||||||
register: install_tox_again_force
|
register: install_tox_again_force
|
||||||
|
|
||||||
- name: uninstall application tox
|
- name: uninstall application tox
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
state: reinstall
|
state: reinstall
|
||||||
register: reinstall_noname
|
register: reinstall_noname
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: upgrade tox from 3.24.0
|
- name: upgrade tox from 3.24.0
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
|
@ -80,13 +80,13 @@
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
state: upgrade
|
state: upgrade
|
||||||
register: upgrade_noname
|
register: upgrade_noname
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: downgrade tox 3.24.0
|
- name: downgrade tox 3.24.0
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
name: tox
|
name: tox
|
||||||
source: tox==3.24.0
|
source: tox==3.24.0
|
||||||
force: yes
|
force: true
|
||||||
register: downgrade_tox_324
|
register: downgrade_tox_324
|
||||||
|
|
||||||
- name: cleanup tox 3.24.0
|
- name: cleanup tox 3.24.0
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
- name: Find created package file
|
- name: Find created package file
|
||||||
find:
|
find:
|
||||||
path: '{{ pkgng_test_outofdate_pkg_tempdir.path }}'
|
path: '{{ pkgng_test_outofdate_pkg_tempdir.path }}'
|
||||||
use_regex: yes
|
use_regex: true
|
||||||
pattern: '.*\.(pkg|tzst|t[xbg]z|tar)'
|
pattern: '.*\.(pkg|tzst|t[xbg]z|tar)'
|
||||||
register: pkgng_test_outofdate_pkg_tempfile
|
register: pkgng_test_outofdate_pkg_tempfile
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
- name: Copy the created package file to the expected location
|
- name: Copy the created package file to the expected location
|
||||||
copy:
|
copy:
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
src: '{{ pkgng_test_outofdate_pkg_tempfile.files[0].path }}'
|
src: '{{ pkgng_test_outofdate_pkg_tempfile.files[0].path }}'
|
||||||
dest: '{{ pkgng_test_outofdate_pkg_path }}'
|
dest: '{{ pkgng_test_outofdate_pkg_path }}'
|
||||||
|
|
||||||
|
|
|
@ -37,15 +37,15 @@
|
||||||
- name: Verify package sentinel file is present
|
- name: Verify package sentinel file is present
|
||||||
stat:
|
stat:
|
||||||
path: '{{ pkgng_test_pkg_sentinelfile_path }}'
|
path: '{{ pkgng_test_pkg_sentinelfile_path }}'
|
||||||
get_attributes: no
|
get_attributes: false
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
get_mime: no
|
get_mime: false
|
||||||
register: pkgng_example3_stat_before
|
register: pkgng_example3_stat_before
|
||||||
|
|
||||||
- name: Install package (checkmode)
|
- name: Install package (checkmode)
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: pkgng_example3_checkmode
|
register: pkgng_example3_checkmode
|
||||||
|
|
||||||
- name: Remove package
|
- name: Remove package
|
||||||
|
@ -63,9 +63,9 @@
|
||||||
- name: Verify package sentinel file is not present
|
- name: Verify package sentinel file is not present
|
||||||
stat:
|
stat:
|
||||||
path: '{{ pkgng_test_pkg_sentinelfile_path }}'
|
path: '{{ pkgng_test_pkg_sentinelfile_path }}'
|
||||||
get_attributes: no
|
get_attributes: false
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
get_mime: no
|
get_mime: false
|
||||||
register: pkgng_example3_stat_after
|
register: pkgng_example3_stat_after
|
||||||
|
|
||||||
- name: Ensure pkgng installs package correctly
|
- name: Ensure pkgng installs package correctly
|
||||||
|
@ -104,14 +104,14 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '*'
|
name: '*'
|
||||||
state: latest
|
state: latest
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: pkgng_example4_wildcard_checkmode
|
register: pkgng_example4_wildcard_checkmode
|
||||||
|
|
||||||
- name: Check for available package upgrade (checkmode)
|
- name: Check for available package upgrade (checkmode)
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
state: latest
|
state: latest
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: pkgng_example4_checkmode
|
register: pkgng_example4_checkmode
|
||||||
|
|
||||||
- name: Upgrade out-of-date package
|
- name: Upgrade out-of-date package
|
||||||
|
@ -183,7 +183,7 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: pkgng_example5_prepare
|
register: pkgng_example5_prepare
|
||||||
|
|
||||||
- name: Install three packages
|
- name: Install three packages
|
||||||
|
@ -219,7 +219,7 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: pkgng_example6_check
|
register: pkgng_example6_check
|
||||||
|
|
||||||
- name: Create out-of-date test package
|
- name: Create out-of-date test package
|
||||||
|
@ -279,7 +279,7 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
name: autotools
|
name: autotools
|
||||||
state: absent
|
state: absent
|
||||||
autoremove: yes
|
autoremove: true
|
||||||
register: pkgng_example7
|
register: pkgng_example7
|
||||||
|
|
||||||
- name: Check if autoremove uninstalled known autotools dependencies
|
- name: Check if autoremove uninstalled known autotools dependencies
|
||||||
|
@ -290,7 +290,7 @@
|
||||||
- libtool
|
- libtool
|
||||||
- m4
|
- m4
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: pkgng_example7_cleanup
|
register: pkgng_example7_cleanup
|
||||||
|
|
||||||
- name: Ensure pkgng autoremove works correctly
|
- name: Ensure pkgng autoremove works correctly
|
||||||
|
@ -313,7 +313,7 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
annotation: '+ansibletest_example8=duplicate'
|
annotation: '+ansibletest_example8=duplicate'
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: pkgng_example8_add_annotation_failure
|
register: pkgng_example8_add_annotation_failure
|
||||||
|
|
||||||
- name: Verify annotation is actually there
|
- name: Verify annotation is actually there
|
||||||
|
@ -324,14 +324,14 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
annotation: '+ansibletest_example8=added'
|
annotation: '+ansibletest_example8=added'
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: pkgng_example8_add_annotation_checkmode_nochange
|
register: pkgng_example8_add_annotation_checkmode_nochange
|
||||||
|
|
||||||
- name: Install and annotate single package (checkmode, changed)
|
- name: Install and annotate single package (checkmode, changed)
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
annotation: '+ansibletest_example8_checkmode=added'
|
annotation: '+ansibletest_example8_checkmode=added'
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: pkgng_example8_add_annotation_checkmode_change
|
register: pkgng_example8_add_annotation_checkmode_change
|
||||||
|
|
||||||
- name: Verify check_mode did not add an annotation
|
- name: Verify check_mode did not add an annotation
|
||||||
|
@ -348,7 +348,7 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
annotation: ':ansiblemissing=modified'
|
annotation: ':ansiblemissing=modified'
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: pkgng_example8_modify_annotation_failure
|
register: pkgng_example8_modify_annotation_failure
|
||||||
|
|
||||||
- name: Verify annotation has been modified
|
- name: Verify annotation has been modified
|
||||||
|
@ -451,7 +451,7 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
annotation: '{{ item }}'
|
annotation: '{{ item }}'
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: pkgng_example8_invalid_annotation_failure
|
register: pkgng_example8_invalid_annotation_failure
|
||||||
loop:
|
loop:
|
||||||
- 'naked_string'
|
- 'naked_string'
|
||||||
|
@ -484,7 +484,7 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
name: '{{ pkgng_test_pkg_name }}'
|
name: '{{ pkgng_test_pkg_name }}'
|
||||||
pkgsite: DoesNotExist
|
pkgsite: DoesNotExist
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: pkgng_example10_invalid_pkgsite_failure
|
register: pkgng_example10_invalid_pkgsite_failure
|
||||||
|
|
||||||
- name: Ensure invalid pkgsite fails as expected
|
- name: Ensure invalid pkgsite fails as expected
|
||||||
|
@ -524,21 +524,21 @@
|
||||||
vars:
|
vars:
|
||||||
pkgng_test_rootdir: /usr/jails/testjail
|
pkgng_test_rootdir: /usr/jails/testjail
|
||||||
pkgng_test_install_prefix: /usr/jails/testjail
|
pkgng_test_install_prefix: /usr/jails/testjail
|
||||||
pkgng_test_install_cleanup: yes
|
pkgng_test_install_cleanup: true
|
||||||
|
|
||||||
- name: Install package in jail
|
- name: Install package in jail
|
||||||
include_tasks: install_single_package.yml
|
include_tasks: install_single_package.yml
|
||||||
vars:
|
vars:
|
||||||
pkgng_test_jail: testjail
|
pkgng_test_jail: testjail
|
||||||
pkgng_test_install_prefix: /usr/jails/testjail
|
pkgng_test_install_prefix: /usr/jails/testjail
|
||||||
pkgng_test_install_cleanup: yes
|
pkgng_test_install_cleanup: true
|
||||||
|
|
||||||
- name: Install package in jail as chroot
|
- name: Install package in jail as chroot
|
||||||
include_tasks: install_single_package.yml
|
include_tasks: install_single_package.yml
|
||||||
vars:
|
vars:
|
||||||
pkgng_test_chroot: /usr/jails/testjail
|
pkgng_test_chroot: /usr/jails/testjail
|
||||||
pkgng_test_install_prefix: /usr/jails/testjail
|
pkgng_test_install_prefix: /usr/jails/testjail
|
||||||
pkgng_test_install_cleanup: yes
|
pkgng_test_install_cleanup: true
|
||||||
always:
|
always:
|
||||||
- name: Stop and remove testjail
|
- name: Stop and remove testjail
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
- name: Verify package sentinel file is not present
|
- name: Verify package sentinel file is not present
|
||||||
stat:
|
stat:
|
||||||
path: '{{ pkgng_test_install_prefix | default("") }}{{ pkgng_test_pkg_sentinelfile_path }}'
|
path: '{{ pkgng_test_install_prefix | default("") }}{{ pkgng_test_pkg_sentinelfile_path }}'
|
||||||
get_attributes: no
|
get_attributes: false
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
get_mime: no
|
get_mime: false
|
||||||
register: pkgng_install_stat_before
|
register: pkgng_install_stat_before
|
||||||
|
|
||||||
- name: Install package
|
- name: Install package
|
||||||
|
@ -23,21 +23,21 @@
|
||||||
pkgng:
|
pkgng:
|
||||||
<<: *pkgng_install_params
|
<<: *pkgng_install_params
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: pkgng_install_checkmode
|
register: pkgng_install_checkmode
|
||||||
|
|
||||||
- name: Install package (idempotent, cached)
|
- name: Install package (idempotent, cached)
|
||||||
pkgng:
|
pkgng:
|
||||||
<<: *pkgng_install_params
|
<<: *pkgng_install_params
|
||||||
cached: yes
|
cached: true
|
||||||
register: pkgng_install_idempotent_cached
|
register: pkgng_install_idempotent_cached
|
||||||
|
|
||||||
- name: Verify package sentinel file is present
|
- name: Verify package sentinel file is present
|
||||||
stat:
|
stat:
|
||||||
path: '{{ pkgng_test_install_prefix | default("") }}{{ pkgng_test_pkg_sentinelfile_path }}'
|
path: '{{ pkgng_test_install_prefix | default("") }}{{ pkgng_test_pkg_sentinelfile_path }}'
|
||||||
get_attributes: no
|
get_attributes: false
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
get_mime: no
|
get_mime: false
|
||||||
register: pkgng_install_stat_after
|
register: pkgng_install_stat_after
|
||||||
|
|
||||||
- name: Remove test package (if requested)
|
- name: Remove test package (if requested)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
service:
|
service:
|
||||||
name: pf
|
name: pf
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
|
|
||||||
- name: Install ezjail
|
- name: Install ezjail
|
||||||
pkgng:
|
pkgng:
|
||||||
|
@ -49,11 +49,11 @@
|
||||||
line: ezjail_ftphost=http://ftp-archive.freebsd.org
|
line: ezjail_ftphost=http://ftp-archive.freebsd.org
|
||||||
|
|
||||||
- name: Start ezjail
|
- name: Start ezjail
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
service:
|
service:
|
||||||
name: ezjail
|
name: ezjail
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
|
|
||||||
- name: Redirect logs depending on verbosity
|
- name: Redirect logs depending on verbosity
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
dest: /usr/jails/testjail/etc/resolv.conf
|
dest: /usr/jails/testjail/etc/resolv.conf
|
||||||
regexp: "^nameserver[[:blank:]]+{{ item }}$"
|
regexp: "^nameserver[[:blank:]]+{{ item }}$"
|
||||||
line: "nameserver {{ item }}"
|
line: "nameserver {{ item }}"
|
||||||
create: yes
|
create: true
|
||||||
loop:
|
loop:
|
||||||
- "1.1.1.1"
|
- "1.1.1.1"
|
||||||
- "1.0.0.1"
|
- "1.0.0.1"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
pkgutil:
|
pkgutil:
|
||||||
name: CSWtop
|
name: CSWtop
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: cm_add_package
|
register: cm_add_package
|
||||||
|
|
||||||
- name: Verify cm_add_package
|
- name: Verify cm_add_package
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
pkgutil:
|
pkgutil:
|
||||||
name: CSWtop
|
name: CSWtop
|
||||||
state: present
|
state: present
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: cm_add_package_again
|
register: cm_add_package_again
|
||||||
|
|
||||||
- name: Verify cm_add_package_again
|
- name: Verify cm_add_package_again
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
pkgutil:
|
pkgutil:
|
||||||
name: CSWtop
|
name: CSWtop
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: cm_remove_package
|
register: cm_remove_package
|
||||||
|
|
||||||
- name: Verify cm_remove_package
|
- name: Verify cm_remove_package
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
pkgutil:
|
pkgutil:
|
||||||
name: CSWtop
|
name: CSWtop
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: cm_remove_package_again
|
register: cm_remove_package_again
|
||||||
|
|
||||||
- name: Verify cm_remove_package_again
|
- name: Verify cm_remove_package_again
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
read_csv:
|
read_csv:
|
||||||
path: users_nonunique.csv
|
path: users_nonunique.csv
|
||||||
key: name
|
key: name
|
||||||
unique: no
|
unique: false
|
||||||
delimiter: ';'
|
delimiter: ';'
|
||||||
register: users_nonunique
|
register: users_nonunique
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
path: users_nonunique.csv
|
path: users_nonunique.csv
|
||||||
dialect: placebo
|
dialect: placebo
|
||||||
register: users_placebo
|
register: users_placebo
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
@ -140,9 +140,9 @@
|
||||||
read_csv:
|
read_csv:
|
||||||
path: users_broken.csv
|
path: users_broken.csv
|
||||||
key: name
|
key: name
|
||||||
strict: yes
|
strict: true
|
||||||
register: users_broken
|
register: users_broken
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
login_host: 127.0.0.1
|
login_host: 127.0.0.1
|
||||||
login_port: "{{ master_port }}"
|
login_port: "{{ master_port }}"
|
||||||
login_password: "{{ redis_password }}"
|
login_password: "{{ redis_password }}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue