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