[stable-10] Adjust YAML files (#10233) (#10244)

Adjust YAML files (#10233)

Adjust YAML files.

(cherry picked from commit eaa5e07b28)
This commit is contained in:
Felix Fontein 2025-06-15 10:02:03 +02:00 committed by GitHub
parent e8ff74f077
commit a9e892952d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
244 changed files with 7272 additions and 7329 deletions

View file

@ -7,7 +7,7 @@
# https://github.com/marketplace/actions/ansible-test
name: EOL CI
on:
"on":
# Run EOL CI against all pushes (direct commits, also merged PRs), Pull Requests
push:
branches:

View file

@ -5,7 +5,7 @@
name: "Code scanning - action"
on:
"on":
schedule:
- cron: '26 19 * * 1'
workflow_dispatch:

View file

@ -4,6 +4,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
collections:
- ansible.posix
- community.crypto
- community.docker
- ansible.posix
- community.crypto
- community.docker

View file

@ -19,9 +19,9 @@
- include_tasks: tests.yml
with_nested:
- [ true, false ] # with_link
- [ true, false ] # with_alternatives
- [ 'auto', 'manual' ] # mode
- [true, false] # with_link
- [true, false] # with_alternatives
- ['auto', 'manual'] # mode
loop_control:
loop_var: test_conf

View file

@ -82,7 +82,7 @@
unarchive:
src: "{{ commandline_tools_link }}"
dest: "{{ android_cmdline_temp_dir }}"
remote_src: yes
remote_src: true
creates: "{{ android_cmdline_temp_dir }}/cmdline-tools"
when: not sdkmanager_installed.stat.exists
@ -91,4 +91,4 @@
copy:
src: "{{ android_cmdline_temp_dir }}/cmdline-tools/"
dest: "{{ android_sdk_location }}/cmdline-tools/latest"
remote_src: yes
remote_src: true

View file

@ -4,14 +4,14 @@
# SPDX-License-Identifier: GPL-3.0-or-later
btrfs_subvolume_single_configs:
- file: "/tmp/disks0.img"
- file: "/tmp/disks0.img"
loop: "/dev/loop95"
btrfs_subvolume_multiple_configs:
- file: "/tmp/diskm0.img"
- file: "/tmp/diskm0.img"
loop: "/dev/loop97"
- file: "/tmp/diskm1.img"
- file: "/tmp/diskm1.img"
loop: "/dev/loop98"
- file: "/tmp/diskm2.img"
- file: "/tmp/diskm2.img"
loop: "/dev/loop99"
btrfs_subvolume_configs: "{{ btrfs_subvolume_single_configs + btrfs_subvolume_multiple_configs }}"
btrfs_subvolume_single_devices: "{{ btrfs_subvolume_single_configs | map(attribute='loop') }}"

View file

@ -8,7 +8,7 @@
name:
- btrfs-progs # btrfs userspace
- util-linux # losetup
ignore_errors: True
ignore_errors: true
register: btrfs_installed
- name: Execute integration tests tests

View file

@ -12,7 +12,7 @@
block:
- name: Create subvolume '/nonroot'
community.general.btrfs_subvolume:
automount: Yes
automount: true
name: "/nonroot"
filesystem_label: "{{ btrfs_subvolume_target_label }}"
state: "present"

View file

@ -18,12 +18,12 @@
- name: Create single device btrfs filesystem
ansible.builtin.command:
cmd: "mkfs.btrfs --label {{ btrfs_subvolume_single_label }} -f {{ btrfs_subvolume_single_devices | first }}"
changed_when: True
changed_when: true
- name: Create multiple device btrfs filesystem
ansible.builtin.command:
cmd: "mkfs.btrfs --label {{ btrfs_subvolume_multiple_label }} -f -d raid0 {{ btrfs_subvolume_multiple_devices | join(' ') }}"
changed_when: True
changed_when: true
# Typically created by udev, but apparently missing on Alpine
- name: Create btrfs control device node
@ -34,4 +34,4 @@
- name: Force rescan to ensure all device are detected
ansible.builtin.command:
cmd: "btrfs device scan"
changed_when: True
changed_when: true

View file

@ -7,7 +7,7 @@
block:
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by label
community.general.btrfs_subvolume:
automount: Yes
automount: true
name: "/match_label"
filesystem_label: "{{ btrfs_subvolume_target_label }}"
state: "present"
@ -22,7 +22,7 @@
block:
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by uuid
community.general.btrfs_subvolume:
automount: Yes
automount: true
name: "/match_uuid"
filesystem_uuid: "{{ result.filesystem.uuid }}"
state: "present"
@ -37,7 +37,7 @@
block:
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by device
community.general.btrfs_subvolume:
automount: Yes
automount: true
name: "/match_device"
filesystem_device: "{{ result.filesystem.devices | first }}"
state: "present"
@ -63,7 +63,7 @@
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem when only mount
community.general.btrfs_subvolume:
automount: Yes
automount: true
name: "/match_only_mounted"
state: "present"
register: result
@ -77,4 +77,4 @@
ansible.builtin.assert:
that:
- result.filesystem.label == btrfs_subvolume_target_label
when: False # TODO don't attempt this if the host already has a pre-existing btrfs filesystem
when: false # TODO don't attempt this if the host already has a pre-existing btrfs filesystem

View file

@ -7,7 +7,7 @@
block:
- name: Create a snapshot named 'snapshot_clobber'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/snapshot_clobber"
snapshot_source: "/"
@ -21,7 +21,7 @@
- name: Create a snapshot named 'snapshot_clobber' (no idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/snapshot_clobber"
snapshot_source: "/"
@ -35,7 +35,7 @@
- name: Cleanup created snapshot
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/snapshot_clobber"
state: "absent"

View file

@ -7,7 +7,7 @@
block:
- name: Create a snapshot named 'snapshot_error'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/snapshot_error"
snapshot_source: "/"
@ -21,7 +21,7 @@
- name: Create a snapshot named 'snapshot_error' (no idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/snapshot_error"
snapshot_source: "/"
@ -36,7 +36,7 @@
- name: Cleanup created snapshot
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/snapshot_error"
state: "absent"

View file

@ -7,7 +7,7 @@
block:
- name: Create a snapshot named 'snapshot_skip'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/snapshot_skip"
snapshot_source: "/"
@ -21,7 +21,7 @@
- name: Create a snapshot named 'snapshot_skip' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/snapshot_skip"
snapshot_source: "/"
@ -35,7 +35,7 @@
- name: Cleanup created snapshot
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/snapshot_skip"
state: "absent"

View file

@ -7,8 +7,8 @@
block:
- name: Update filesystem default subvolume to '@'
community.general.btrfs_subvolume:
automount: Yes
default: True
automount: true
default: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/@"
state: "present"
@ -19,8 +19,8 @@
- result is changed
- name: Update filesystem default subvolume to '@' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
default: True
automount: true
default: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/@"
state: "present"
@ -34,8 +34,8 @@
block:
- name: Revert filesystem default subvolume to '/'
community.general.btrfs_subvolume:
automount: Yes
default: True
automount: true
default: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/"
state: "present"
@ -46,8 +46,8 @@
- result is changed
- name: Revert filesystem default subvolume to '/' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
default: True
automount: true
default: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/"
state: "present"
@ -62,8 +62,8 @@
block:
- name: Update filesystem default subvolume to '@'
community.general.btrfs_subvolume:
automount: Yes
default: True
automount: true
default: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/@"
state: "present"
@ -77,7 +77,7 @@
block:
- name: Delete custom default subvolume '@'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/@"
state: "absent"
@ -88,7 +88,7 @@
- result is changed
- name: Delete custom default subvolume '@' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/@"
state: "absent"

View file

@ -5,7 +5,7 @@
- name: Create parent subvolume 'container'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container"
state: "present"
@ -14,7 +14,7 @@
block:
- name: Create a subvolume named 'nested' inside 'container'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container/nested"
state: "present"
@ -25,7 +25,7 @@
- result is changed
- name: Create a subvolume named 'nested' inside 'container' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container/nested"
state: "present"
@ -39,7 +39,7 @@
block:
- name: Remove a subvolume named 'nested' inside 'container'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container/nested"
state: "absent"
@ -50,7 +50,7 @@
- result is changed
- name: Remove a subvolume named 'nested' inside 'container' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container/nested"
state: "absent"

View file

@ -7,10 +7,10 @@
block:
- name: Create a subvolume named '/recursive/son/grandson'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/recursive/son/grandson"
recursive: Yes
recursive: true
state: "present"
register: result
- name: Subvolume named '/recursive/son/grandson' created
@ -20,10 +20,10 @@
- name: Create a subvolume named '/recursive/son/grandson' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/recursive/son/grandson"
recursive: Yes
recursive: true
state: "present"
register: result
- name: Subvolume named '/recursive/son/grandson' created (idempotency)
@ -33,10 +33,10 @@
- name: Create a subvolume named '/recursive/daughter/granddaughter'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/recursive/daughter/granddaughter"
recursive: Yes
recursive: true
state: "present"
register: result
- name: Subvolume named '/recursive/son/grandson' created
@ -46,10 +46,10 @@
- name: Create a subvolume named '/recursive/daughter/granddaughter' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/recursive/daughter/granddaughter"
recursive: Yes
recursive: true
state: "present"
register: result
- name: Subvolume named '/recursive/son/grandson' created (idempotency)
@ -61,10 +61,10 @@
block:
- name: Remove subvolume '/recursive' and all descendents
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/recursive"
recursive: Yes
recursive: true
state: "absent"
register: result
- name: Subvolume '/recursive' removed
@ -74,10 +74,10 @@
- name: Remove subvolume '/recursive' and all descendents (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/recursive"
recursive: Yes
recursive: true
state: "absent"
register: result
- name: Subvolume '/recursive' removed (idempotency)

View file

@ -7,7 +7,7 @@
block:
- name: Create a subvolume named 'simple'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/simple"
state: "present"
@ -18,7 +18,7 @@
- result is changed
- name: Create a subvolume named 'simple' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/simple"
state: "present"
@ -32,7 +32,7 @@
block:
- name: Remove a subvolume named 'simple'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/simple"
state: "absent"
@ -43,7 +43,7 @@
- result is changed
- name: Remove a subvolume named 'simple' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/simple"
state: "absent"

View file

@ -5,7 +5,7 @@
- name: Create a subvolume named 'container'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container"
state: "present"
@ -14,7 +14,7 @@
block:
- name: Create a subvolume named 'container/my data'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container/my data"
state: "present"
@ -25,7 +25,7 @@
- result is changed
- name: Create a subvolume named 'container/my data' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container/my data"
state: "present"
@ -39,7 +39,7 @@
block:
- name: Remove a subvolume named 'container/my data'
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container/my data"
state: "absent"
@ -51,7 +51,7 @@
- name: Remove a subvolume named 'container/my data' (idempotency)
community.general.btrfs_subvolume:
automount: Yes
automount: true
filesystem_label: "{{ btrfs_subvolume_target_label }}"
name: "/container/my data"
state: "absent"

View file

@ -41,22 +41,21 @@
content: |
Foo bar
Bar baz bam!
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Gathering Facts] *********************************************************",
"ok: [testhost]",
"",
"TASK [Create file] *************************************************************",
"changed: [testhost]",
"",
"TASK [Modify file] *************************************************************",
"changed: [testhost]",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ",
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Gathering Facts] *********************************************************"
- "ok: [testhost]"
- ""
- "TASK [Create file] *************************************************************"
- "changed: [testhost]"
- ""
- "TASK [Modify file] *************************************************************"
- "changed: [testhost]"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
always:
- name: Clean up temp file

View file

@ -25,18 +25,17 @@
- name: Sample task name
debug:
msg: sample debug msg
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"ok: [testhost] => {",
" \"msg\": \"sample debug msg\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "ok: [testhost] => {"
- " \"msg\": \"sample debug msg\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Set playbook_on_start_msg callback using environment variable
environment:
@ -51,19 +50,18 @@
- name: Sample task name
debug:
msg: sample debug msg
expected_output: [
"Sample output Sample playbook message",
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"ok: [testhost] => {",
" \"msg\": \"sample debug msg\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- "Sample output Sample playbook message"
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "ok: [testhost] => {"
- " \"msg\": \"sample debug msg\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Set playbook_on_play_start_msg callback using play variable
environment:
@ -80,17 +78,16 @@
- name: Sample task name
debug:
msg: sample debug msg
expected_output: [
"Sample output Sample play name",
"",
"TASK [Sample task name] ********************************************************",
"ok: [testhost] => {",
" \"msg\": \"sample debug msg\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- "Sample output Sample play name"
- ""
- "TASK [Sample task name] ********************************************************"
- "ok: [testhost] => {"
- " \"msg\": \"sample debug msg\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Set playbook_on_task_start_msg callback using play variable
environment:
@ -106,17 +103,16 @@
- name: Sample task name
debug:
msg: sample debug msg
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"Sample output Sample task name",
"ok: [testhost] => {",
" \"msg\": \"sample debug msg\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- "Sample output Sample task name"
- "ok: [testhost] => {"
- " \"msg\": \"sample debug msg\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Set playbook_on_task_start_msg callback using task variable
environment:
@ -132,17 +128,16 @@
msg: sample debug msg
vars:
ansible_callback_diy_playbook_on_task_start_msg: Sample output {{ ansible_callback_diy.task.name }}
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"Sample output Sample task name",
"ok: [testhost] => {",
" \"msg\": \"sample debug msg\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- "Sample output Sample task name"
- "ok: [testhost] => {"
- " \"msg\": \"sample debug msg\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Set runner_on_ok_msg callback using task variable
environment:
@ -158,16 +153,15 @@
msg: sample debug msg
vars:
ansible_callback_diy_runner_on_ok_msg: Sample output {{ ansible_callback_diy.result.output.msg }}
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"Sample output sample debug msg",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "Sample output sample debug msg"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Set runner_on_failed_msg callback using task variable
environment:
@ -185,16 +179,15 @@
ignore_errors: true
vars:
ansible_callback_diy_runner_on_failed_msg: Sample output Sample failure message
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"Sample output Sample failure message",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "Sample output Sample failure message"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1 "
- name: Set runner_on_skipped_msg callback using task variable
environment:
@ -211,16 +204,15 @@
when: false
vars:
ansible_callback_diy_runner_on_skipped_msg: Sample output Skipped {{ ansible_callback_diy.task.name }}
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"Sample output Skipped Sample task name",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=0 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "Sample output Skipped Sample task name"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=0 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 "
- name: Set runner_item_on_ok_msg callback using task variable
environment:
@ -240,18 +232,17 @@
- sample item 3
vars:
ansible_callback_diy_runner_item_on_ok_msg: Sample output Looping {{ ansible_callback_diy.result.output.msg }}
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"Sample output Looping sample debug msg sample item 1",
"Sample output Looping sample debug msg sample item 2",
"Sample output Looping sample debug msg sample item 3",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "Sample output Looping sample debug msg sample item 1"
- "Sample output Looping sample debug msg sample item 2"
- "Sample output Looping sample debug msg sample item 3"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Set runner_item_on_failed_msg callback using task variable
environment:
@ -273,28 +264,25 @@
ignore_errors: true
vars:
ansible_callback_diy_runner_item_on_failed_msg: Sample output Looping sample failure message
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"ok: [testhost] => (item=sample item 1) => {",
" \"msg\": \"sample debug msg sample item 1\"",
"}",
"Sample output Looping sample failure message",
"ok: [testhost] => (item=sample item 3) => {",
" \"msg\": \"sample debug msg sample item 3\"",
"}",
[
# Apparently a bug was fixed in Ansible, as before it ran through with "All items completed"
"fatal: [testhost]: FAILED! => {\"msg\": \"All items completed\"}",
"fatal: [testhost]: FAILED! => {\"msg\": \"One or more items failed\"}",
],
"...ignoring",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "ok: [testhost] => (item=sample item 1) => {"
- " \"msg\": \"sample debug msg sample item 1\""
- "}"
- "Sample output Looping sample failure message"
- "ok: [testhost] => (item=sample item 3) => {"
- " \"msg\": \"sample debug msg sample item 3\""
- "}"
- # Apparently a bug was fixed in Ansible, as before it ran through with "All items completed"
- "fatal: [testhost]: FAILED! => {\"msg\": \"All items completed\"}"
- "fatal: [testhost]: FAILED! => {\"msg\": \"One or more items failed\"}"
- "...ignoring"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1 "
- name: Set runner_item_on_skipped_msg callback using task variable
environment:
@ -315,22 +303,21 @@
when: item != 'sample item 2'
vars:
ansible_callback_diy_runner_item_on_skipped_msg: Sample output Looping Skipped {{ ansible_callback_diy.result.output.item }}
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"ok: [testhost] => (item=sample item 1) => {",
" \"msg\": \"sample debug msg sample item 1\"",
"}",
"Sample output Looping Skipped sample item 2",
"ok: [testhost] => (item=sample item 3) => {",
" \"msg\": \"sample debug msg sample item 3\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "ok: [testhost] => (item=sample item 1) => {"
- " \"msg\": \"sample debug msg sample item 1\""
- "}"
- "Sample output Looping Skipped sample item 2"
- "ok: [testhost] => (item=sample item 3) => {"
- " \"msg\": \"sample debug msg sample item 3\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Set playbook_on_stats_msg callback using play variable
environment:
@ -371,20 +358,19 @@
- name: Sample task name
debug:
msg: sample debug msg
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"ok: [testhost] => {",
" \"msg\": \"sample debug msg\"",
"}",
" Sample output stats",
"===============================",
" ok : testhost: 1",
"",
" processed : testhost: 1"
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "ok: [testhost] => {"
- " \"msg\": \"sample debug msg\""
- "}"
- " Sample output stats"
- "==============================="
- " ok : testhost: 1"
- ""
- " processed : testhost: 1"
- name: Suppress output on playbook_on_task_start_msg callback using task variable
environment:
@ -400,16 +386,15 @@
msg: sample debug msg
vars:
ansible_callback_diy_playbook_on_task_start_msg: ''
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"ok: [testhost] => {",
" \"msg\": \"sample debug msg\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- "ok: [testhost] => {"
- " \"msg\": \"sample debug msg\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Suppress output on runner_on_ok_msg callback using task variable
environment:
@ -425,15 +410,14 @@
msg: sample debug msg
vars:
ansible_callback_diy_runner_on_ok_msg: ''
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Set runner_on_ok_msg_color using task variable
environment:
@ -450,13 +434,12 @@
vars:
ansible_callback_diy_runner_on_ok_msg: Sample output {{ ansible_callback_diy.result.output.msg }}
ansible_callback_diy_runner_on_ok_msg_color: blue
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"Sample output sample debug msg",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "Sample output sample debug msg"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "

View file

@ -24,18 +24,17 @@
- name: Sample task
debug:
msg: This is a test
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task] *************************************************************",
"ok: [testhost] => {",
" \"msg\": \"This is a test\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task] *************************************************************"
- "ok: [testhost] => {"
- " \"msg\": \"This is a test\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: community.general.print_task is enabled
environment:
@ -49,23 +48,22 @@
- name: Sample task
debug:
msg: This is a test
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task] *************************************************************",
"",
"- name: Sample task",
" debug:",
" msg: This is a test",
"",
"ok: [testhost] => {",
" \"msg\": \"This is a test\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task] *************************************************************"
- ""
- "- name: Sample task"
- " debug:"
- " msg: This is a test"
- ""
- "ok: [testhost] => {"
- " \"msg\": \"This is a test\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Print with msg parameter on the same line
environment:
@ -78,22 +76,21 @@
tasks:
- name: Sample task
debug: msg="This is a test"
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task] *************************************************************",
"",
"- name: Sample task",
" debug: msg=\"This is a test\"",
"",
"ok: [testhost] => {",
" \"msg\": \"This is a test\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task] *************************************************************"
- ""
- "- name: Sample task"
- " debug: msg=\"This is a test\""
- ""
- "ok: [testhost] => {"
- " \"msg\": \"This is a test\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Task with additional parameters
environment:
@ -110,23 +107,22 @@
test_var: "Hello World"
debug:
var: test_var
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task] *************************************************************",
"",
"- name: Sample task",
" when: true",
" vars:",
" test_var: Hello World",
" debug:",
" var: test_var",
"",
"ok: [testhost] => {",
" \"test_var\": \"Hello World\"",
"}",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task] *************************************************************"
- ""
- "- name: Sample task"
- " when: true"
- " vars:"
- " test_var: Hello World"
- " debug:"
- " var: test_var"
- ""
- "ok: [testhost] => {"
- " \"test_var\": \"Hello World\""
- "}"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "

View file

@ -26,18 +26,17 @@
- name: Sample task name
debug:
msg: sample debug msg
expected_output: [
"",
"PLAY [testhost] ******************************************************* 15:04:05",
"",
"TASK [Sample task name] *********************************************** 15:04:05",
"ok: [testhost] => {",
" \"msg\": \"sample debug msg\"",
"}",
"",
"PLAY RECAP ************************************************************ 15:04:05",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ******************************************************* 15:04:05"
- ""
- "TASK [Sample task name] *********************************************** 15:04:05"
- "ok: [testhost] => {"
- " \"msg\": \"sample debug msg\""
- "}"
- ""
- "PLAY RECAP ************************************************************ 15:04:05"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Enable timestamp in the longer length
environment:
@ -52,15 +51,14 @@
- name: Sample task name
debug:
msg: sample debug msg
expected_output: [
"",
"PLAY [testhost] ******************************************** 2006-01-02T15:04:05",
"",
"TASK [Sample task name] ************************************ 2006-01-02T15:04:05",
"ok: [testhost] => {",
" \"msg\": \"sample debug msg\"",
"}",
"",
"PLAY RECAP ************************************************* 2006-01-02T15:04:05",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ******************************************** 2006-01-02T15:04:05"
- ""
- "TASK [Sample task name] ************************************ 2006-01-02T15:04:05"
- "ok: [testhost] => {"
- " \"msg\": \"sample debug msg\""
- "}"
- ""
- "PLAY RECAP ************************************************* 2006-01-02T15:04:05"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "

View file

@ -25,17 +25,17 @@
- name: Sample task name
debug:
msg: sample debug msg
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Sample task name] ********************************************************",
"ok: [testhost] => ",
" msg: sample debug msg",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Sample task name] ********************************************************"
- "ok: [testhost] => "
- " msg: sample debug msg"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Test umlauts in multiline
environment:
ANSIBLE_NOCOLOR: 'true'
@ -48,20 +48,20 @@
- name: Umlaut output
debug:
msg: "äöü\néêè\nßï☺"
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Umlaut output] ***********************************************************",
"ok: [testhost] => ",
" msg: |-",
" äöü",
" éêè",
" ßï☺",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Umlaut output] ***********************************************************"
- "ok: [testhost] => "
- " msg: |-"
- " äöü"
- " éêè"
- " ßï☺"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
- name: Test to_yaml
environment:
ANSIBLE_NOCOLOR: 'true'
@ -79,21 +79,20 @@
- name: Test to_yaml
debug:
msg: "{{ data | to_yaml }}"
expected_output: [
"",
"PLAY [testhost] ****************************************************************",
"",
"TASK [Test to_yaml] ************************************************************",
"ok: [testhost] => ",
" msg: |-",
" 'line 1",
" ",
" line 2",
" ",
" line 3",
" ",
" '",
"",
"PLAY RECAP *********************************************************************",
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
]
expected_output:
- ""
- "PLAY [testhost] ****************************************************************"
- ""
- "TASK [Test to_yaml] ************************************************************"
- "ok: [testhost] => "
- " msg: |-"
- " 'line 1"
- " "
- " line 2"
- " "
- " line 3"
- " "
- " '"
- ""
- "PLAY RECAP *********************************************************************"
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "

View file

@ -10,7 +10,7 @@
copy:
content: ""
dest: "{{ remote_tmp }}/test_empty.txt"
force: no
force: false
mode: '0644'
- name: assert file without content exists

View file

@ -15,7 +15,7 @@
- result is changed
- result.data.Value == 'somevalue'
#- name: Test the lookup
# - name: Test the lookup
# assert:
# that:
# - lookup('community.general.consul_kv', 'somekey', token=consul_management_token) == 'somevalue'

View file

@ -44,7 +44,7 @@
consul_role:
name: foo-role-with-policy
description: "Testing updating description"
check_mode: yes
check_mode: true
register: result
- assert:
@ -106,7 +106,7 @@
datacenters:
- dc2
register: result
check_mode: yes
check_mode: true
- assert:
that:
@ -146,7 +146,7 @@
name: role-with-service-identity
node_identities: []
register: result
check_mode: yes
check_mode: true
- assert:
that:

View file

@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
discord_id: 000
discord_id: 0
discord_token: xxx

View file

@ -177,7 +177,6 @@
- filesize_stat_basic_14.stat.checksum == filesize_test_checksum
- name: Expand the file with 1 byte (57001B) (check mode)
community.general.filesize:
path: "{{ filesize_testfile }}"
@ -253,7 +252,6 @@
- filesize_stat_basic_24.stat.checksum != filesize_test_checksum
- name: Expand the file up to 2 MiB (2*1024*1024 bytes) (check mode)
community.general.filesize:
path: "{{ filesize_testfile }}"
@ -327,7 +325,6 @@
- filesize_stat_basic_34.stat.size == 2*1024**2
- name: Truncate the file to 57kB (57000B) (check mode)
community.general.filesize:
path: "{{ filesize_testfile }}"
@ -404,7 +401,6 @@
- filesize_stat_basic_44.stat.checksum == filesize_test_checksum
- name: Remove test file
ansible.builtin.file:
path: "{{ filesize_testfile }}"

View file

@ -89,7 +89,6 @@
- filesize_stat_float_04.stat.size == 512512
- name: Create a file with a size of 512.513kB (check mode)
community.general.filesize:
path: "{{ filesize_testfile }}"
@ -166,7 +165,6 @@
- filesize_stat_float_14.stat.size == 512513
- name: Create a file with a size of 4.004MB (check mode)
community.general.filesize:
path: "{{ filesize_testfile }}"

View file

@ -119,7 +119,6 @@
- filesize_stat_sparse_06.stat.size == 2*1000**4
- name: Change sparse file size to 2TiB (check mode)
community.general.filesize:
path: "{{ filesize_testfile }}"
@ -198,7 +197,6 @@
- filesize_stat_sparse_14.stat.size == 2199023255552
- name: Change sparse file size to 2.321TB (check mode)
community.general.filesize:
path: "{{ filesize_testfile }}"
@ -279,7 +277,6 @@
- filesize_stat_sparse_24.stat.size == 2321000000000
- name: Remove test file
ansible.builtin.file:
path: "{{ filesize_testfile }}"

View file

@ -20,7 +20,6 @@
follow: false
- name: Create a file with a size of 512 kB (512000 bytes) (check mode)
community.general.filesize:
path: "{{ filesize_testlink }}"
@ -85,7 +84,6 @@
- filesize_test_symlink_04.path != filesize_testlink
- name: Remove test file
ansible.builtin.file:
path: "{{ filesize_testfile }}"

View file

@ -175,7 +175,7 @@
quiet: '{{ quiet_test | default(true) | bool }}'
vars:
alias: {"AnsibleUnicode": "str", "_AnsibleTaggedStr": "str", "_AnsibleTaggedInt": "int", "_AnsibleTaggedFloat": "float"}
data: {'a': 1, 'b': 1.1, 'c': 'abc', 'd': True, 'e': ['x', 'y', 'z'], 'f': {'x': 1, 'y': 2}}
data: {'a': 1, 'b': 1.1, 'c': 'abc', 'd': true, 'e': ['x', 'y', 'z'], 'f': {'x': 1, 'y': 2}}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
dtype: dict[str, bool|dict|float|int|list|str]
@ -187,6 +187,6 @@
quiet: '{{ quiet_test | default(true) | bool }}'
vars:
alias: {"AnsibleUnicode": "str", "_AnsibleTaggedStr": "str", "_AnsibleTaggedInt": "int", "_AnsibleTaggedFloat": "float"}
data: [1, 2, 1.1, 'abc', True, ['x', 'y', 'z'], {'x': 1, 'y': 2}]
data: [1, 2, 1.1, 'abc', true, ['x', 'y', 'z'], {'x': 1, 'y': 2}]
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
dtype: list[bool|dict|float|int|list|str]

View file

@ -6,8 +6,8 @@
gandi_livedns_domain_name: "ansible-tests.org"
gandi_livedns_record_items:
# Single A record
- record: test-www
# Single A record
- record: test-www
type: A
values:
- 10.10.10.10
@ -16,8 +16,8 @@ gandi_livedns_record_items:
- 10.10.10.11
update_ttl: 800
# Multiple A records
- record: test-www-multiple
# Multiple A records
- record: test-www-multiple
type: A
ttl: 3600
values:
@ -27,8 +27,8 @@ gandi_livedns_record_items:
- 10.10.11.11
- 10.10.11.13
# CNAME
- record: test-cname
# CNAME
- record: test-cname
type: CNAME
ttl: 10800
values:

View file

@ -3,7 +3,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
#- import_tasks: setup_no_value.yml
# - import_tasks: setup_no_value.yml
- name: setting value
git_config:

View file

@ -15,18 +15,27 @@
- block:
- include_tasks: get_simple_value.yml
loop:
- { import_file: setup_global.yml, git_scope: 'global' }
- { import_file: setup_file.yml, git_scope: 'file', git_file: "{{ remote_tmp_dir }}/gitconfig_file" }
- import_file: setup_global.yml
git_scope: 'global'
- import_file: setup_file.yml
git_scope: 'file'
git_file: "{{ remote_tmp_dir }}/gitconfig_file"
- include_tasks: get_multi_value.yml
loop:
- { import_file: setup_global.yml, git_scope: 'global' }
- { import_file: setup_file.yml, git_scope: 'file', git_file: "{{ remote_tmp_dir }}/gitconfig_file" }
- import_file: setup_global.yml
git_scope: 'global'
- import_file: setup_file.yml
git_scope: 'file'
git_file: "{{ remote_tmp_dir }}/gitconfig_file"
- include_tasks: get_all_values.yml
loop:
- { import_file: setup_global.yml, git_scope: 'global' }
- { import_file: setup_file.yml, git_scope: 'file', git_file: "{{ remote_tmp_dir }}/gitconfig_file" }
- import_file: setup_global.yml
git_scope: 'global'
- import_file: setup_file.yml
git_scope: 'file'
git_file: "{{ remote_tmp_dir }}/gitconfig_file"
- include_tasks: error_handling.yml
when: git_installed is succeeded and git_version.stdout is version(git_version_supporting_includes, ">=")

View file

@ -438,7 +438,7 @@
- gitlab_instance_variable_state.instance_variable.removed|length == 0
- gitlab_instance_variable_state.instance_variable.updated|length == 0
# VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
#- gitlab_instance_variable_state.instance_variable.added[0] == "my_test_var"
# - gitlab_instance_variable_state.instance_variable.added[0] == "my_test_var"
- name: change variable_type attribute
gitlab_instance_variable:

View file

@ -14,9 +14,9 @@
state: present
- block:
###
### Group label
###
###
### Group label
###
- name: Create {{ gitlab_project_group }}
gitlab_group:
@ -217,9 +217,9 @@
- gitlab_group_label_create_purging.labels.added[0] == "{{ gitlab_second_label }}"
- gitlab_group_label_create_purging.labels.removed[0] == "{{ gitlab_first_label }}"
###
### Project label
###
###
### Project label
###
- name: Create {{ gitlab_project_name }}
gitlab_project:

View file

@ -47,7 +47,7 @@
state_filter: "opened"
assignee_ids: ""
reviewer_ids: ""
remove_source_branch: True
remove_source_branch: true
state: present
register: gitlab_merge_request_create
@ -69,7 +69,7 @@
state_filter: "opened"
assignee_ids: ""
reviewer_ids: ""
remove_source_branch: True
remove_source_branch: true
state: present
register: gitlab_merge_request_create_idempotence
@ -91,7 +91,7 @@
state_filter: "opened"
assignee_ids: "{{ gitlab_assignee_ids }}"
reviewer_ids: ""
remove_source_branch: True
remove_source_branch: true
state: present
register: gitlab_merge_request_udpate

View file

@ -14,9 +14,9 @@
state: present
- block:
###
### Group milestone
###
###
### Group milestone
###
- name: Create {{ gitlab_project_group }}
gitlab_group:
api_url: "{{ gitlab_host }}"
@ -179,9 +179,9 @@
- gitlab_group_milestone_create_purging.milestones.added[0] == "{{ gitlab_second_milestone }}"
- gitlab_group_milestone_create_purging.milestones.removed[0] == "{{ gitlab_first_milestone }}"
###
### Project milestone
###
###
### Project milestone
###
- name: Purge all group milestones for project milestone test - cannot exist with same name
gitlab_milestone:
api_url: "{{ gitlab_host }}"

View file

@ -479,7 +479,7 @@
- gitlab_project_variable_state.project_variable.removed|length == 0
- gitlab_project_variable_state.project_variable.updated|length == 0
# VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
#- gitlab_project_variable_state.project_variable.added[0] == "my_test_var"
# - gitlab_project_variable_state.project_variable.added[0] == "my_test_var"
- name: change variable_type attribute
gitlab_project_variable:

View file

@ -18,7 +18,7 @@
path: "{{ brew_which.stdout }}"
register: brew_stat
#- name: Use ignored-pinned option while upgrading all
# - name: Use ignored-pinned option while upgrading all
# homebrew:
# upgrade_all: true
# upgrade_options: ignore-pinned
@ -28,7 +28,7 @@
# environment:
# HOMEBREW_NO_AUTO_UPDATE: True
#- assert:
# - assert:
# that:
# - upgrade_option_result.changed

View file

@ -18,7 +18,7 @@
path: "{{ brew_which.stdout }}"
register: brew_stat
#- name: Use ignored-pinned option while upgrading all
# - name: Use ignored-pinned option while upgrading all
# homebrew:
# upgrade_all: true
# upgrade_options: ignore-pinned
@ -28,7 +28,7 @@
# environment:
# HOMEBREW_NO_AUTO_UPDATE: True
#- assert:
# - assert:
# that:
# - upgrade_option_result.changed

View file

@ -9,18 +9,18 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Find brew binary
- name: Find brew binary
command: which brew
register: brew_which
when: ansible_distribution in ['MacOSX']
- name: Get owner of brew binary
- name: Get owner of brew binary
stat:
path: "{{ brew_which.stdout }}"
register: brew_stat
when: ansible_distribution in ['MacOSX']
- block:
- block:
- name: Install cask
homebrew_cask:
name: "{{ cask }}"

View file

@ -62,7 +62,7 @@
root_volume:
volume_type: "SAS"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a instance (check mode)
hwc_ecs_instance:
data_volumes:
@ -90,7 +90,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a instance
hwc_ecs_instance:
data_volumes:
@ -117,7 +117,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a instance (idemponent)
hwc_ecs_instance:
data_volumes:
@ -173,7 +173,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a instance (check mode)
hwc_ecs_instance:
data_volumes:
@ -201,7 +201,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a instance
hwc_ecs_instance:
data_volumes:
@ -228,7 +228,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a instance (idemponent)
hwc_ecs_instance:
data_volumes:
@ -283,7 +283,7 @@
that:
- result is not failed
- result is not changed
#---------------------------------------------------------
# ---------------------------------------------------------
# Post-test teardown
- name: delete a disk
hwc_evs_disk:

View file

@ -15,7 +15,7 @@
volume_type: "SATA"
size: 10
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a disk
hwc_evs_disk:
availability_zone: "cn-north-1a"
@ -56,7 +56,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a disk (check mode)
hwc_evs_disk:
availability_zone: "cn-north-1a"
@ -70,7 +70,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a disk
hwc_evs_disk:
availability_zone: "cn-north-1a"

View file

@ -33,7 +33,7 @@
name: "vpc_1"
cidr: "192.168.100.0/24"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a vpc
hwc_network_vpc:
identity_endpoint: "{{ identity_endpoint }}"
@ -68,7 +68,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a vpc
hwc_network_vpc:
identity_endpoint: "{{ identity_endpoint }}"

View file

@ -18,7 +18,7 @@
region: "{{ region }}"
name: "ansible_smn_topic_test"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a smn topic
hwc_smn_topic:
identity_endpoint: "{{ identity_endpoint }}"
@ -51,7 +51,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a smn topic
hwc_smn_topic:
identity_endpoint: "{{ identity_endpoint }}"

View file

@ -39,7 +39,7 @@
size: 1
port_id: "{{ port.id }}"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a eip (check mode)
hwc_vpc_eip:
type: "5_bgp"
@ -55,7 +55,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a eip
hwc_vpc_eip:
type: "5_bgp"
@ -70,7 +70,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a eip (idemponent)
hwc_vpc_eip:
type: "5_bgp"
@ -102,7 +102,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a eip (check mode)
hwc_vpc_eip:
type: "5_bgp"
@ -118,7 +118,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a eip
hwc_vpc_eip:
type: "5_bgp"
@ -133,7 +133,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a eip (idemponent)
hwc_vpc_eip:
type: "5_bgp"
@ -165,7 +165,7 @@
that:
- result is not failed
- result is not changed
#---------------------------------------------------------
# ---------------------------------------------------------
# Post-test teardown
- name: delete a port
hwc_vpc_port:

View file

@ -28,7 +28,7 @@
peering_vpc:
vpc_id: "{{ vpc2.id }}"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a peering connect (check mode)
hwc_vpc_peering_connect:
local_vpc_id: "{{ vpc1.id }}"
@ -43,7 +43,7 @@
that:
- not result.id
- result.changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a peering connect
hwc_vpc_peering_connect:
local_vpc_id: "{{ vpc1.id }}"
@ -56,7 +56,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a peering connect (idemponent)
hwc_vpc_peering_connect:
local_vpc_id: "{{ vpc1.id }}"
@ -84,7 +84,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a peering connect (check mode)
hwc_vpc_peering_connect:
local_vpc_id: "{{ vpc1.id }}"
@ -98,7 +98,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a peering connect
hwc_vpc_peering_connect:
local_vpc_id: "{{ vpc1.id }}"
@ -111,7 +111,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a peering connect (idemponent)
hwc_vpc_peering_connect:
local_vpc_id: "{{ vpc1.id }}"
@ -139,7 +139,7 @@
that:
- result is not failed
- result is not changed
#---------------------------------------------------------
# ---------------------------------------------------------
# Post-test teardown
- name: delete a vpc
hwc_network_vpc:

View file

@ -29,7 +29,7 @@
subnet_id: "{{ subnet.id }}"
ip_address: "192.168.100.33"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a port (check mode)
hwc_vpc_port:
subnet_id: "{{ subnet.id }}"
@ -41,7 +41,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a port
hwc_vpc_port:
subnet_id: "{{ subnet.id }}"
@ -52,7 +52,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a port (idemponent)
hwc_vpc_port:
subnet_id: "{{ subnet.id }}"
@ -75,7 +75,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a port (check mode)
hwc_vpc_port:
subnet_id: "{{ subnet.id }}"
@ -87,7 +87,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a port
hwc_vpc_port:
subnet_id: "{{ subnet.id }}"
@ -98,7 +98,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a port (idemponent)
hwc_vpc_port:
subnet_id: "{{ subnet.id }}"
@ -122,7 +122,7 @@
that:
- result is not failed
- result is not changed
#---------------------------------------------------------
# ---------------------------------------------------------
# Post-test teardown
- name: delete a subnet
hwc_vpc_subnet:

View file

@ -29,7 +29,7 @@
subnet_id: "{{ subnet.id }}"
ip_address: "192.168.100.33"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a private ip (check mode)
hwc_vpc_private_ip:
subnet_id: "{{ subnet.id }}"
@ -41,7 +41,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a private ip
hwc_vpc_private_ip:
subnet_id: "{{ subnet.id }}"
@ -52,7 +52,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a private ip (idemponent)
hwc_vpc_private_ip:
subnet_id: "{{ subnet.id }}"
@ -76,7 +76,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a private ip (check mode)
hwc_vpc_private_ip:
subnet_id: "{{ subnet.id }}"
@ -88,7 +88,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a private ip
hwc_vpc_private_ip:
subnet_id: "{{ subnet.id }}"
@ -99,7 +99,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a private ip (idemponent)
hwc_vpc_private_ip:
subnet_id: "{{ subnet.id }}"
@ -123,7 +123,7 @@
that:
- result is not failed
- result is not changed
#---------------------------------------------------------
# ---------------------------------------------------------
# Post-test teardown
- name: delete a subnet
hwc_vpc_subnet:

View file

@ -37,7 +37,7 @@
destination: "192.168.0.0/16"
next_hop: "{{ connect.id }}"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a route (check mode)
hwc_vpc_route:
vpc_id: "{{ vpc1.id }}"
@ -49,7 +49,7 @@
that:
- not result.id
- result.changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a route
hwc_vpc_route:
vpc_id: "{{ vpc1.id }}"
@ -87,7 +87,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a route (check mode)
hwc_vpc_route:
vpc_id: "{{ vpc1.id }}"
@ -95,7 +95,7 @@
next_hop: "{{ connect.id }}"
state: absent
check_mode: true
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a route
hwc_vpc_route:
vpc_id: "{{ vpc1.id }}"
@ -107,7 +107,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a (idemponent)
hwc_vpc_route:
vpc_id: "{{ vpc1.id }}"
@ -133,7 +133,7 @@
that:
- result is not failed
- result is not changed
#---------------------------------------------------------
# ---------------------------------------------------------
# Post-test teardown
- name: delete a peering connect
hwc_vpc_peering_connect:

View file

@ -13,7 +13,7 @@
hwc_vpc_security_group:
name: "ansible_network_security_group_test"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a security group (check mode)
hwc_vpc_security_group:
name: "ansible_network_security_group_test"
@ -25,7 +25,7 @@
that:
- not result.id
- result.changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a security group
hwc_vpc_security_group:
name: "ansible_network_security_group_test"
@ -35,7 +35,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a security group (idemponent)
hwc_vpc_security_group:
name: "ansible_network_security_group_test"
@ -57,7 +57,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a security group (check mode)
hwc_vpc_security_group:
name: "ansible_network_security_group_test"
@ -68,7 +68,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a security group
hwc_vpc_security_group:
name: "ansible_network_security_group_test"

View file

@ -24,7 +24,7 @@
port_range_min: 22
remote_ip_prefix: "0.0.0.0/0"
state: absent
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a security group rule (check mode)
hwc_vpc_security_group_rule:
direction: "ingress"
@ -42,7 +42,7 @@
that:
- not result.id
- result.changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a security group rule
hwc_vpc_security_group_rule:
direction: "ingress"
@ -58,7 +58,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: create a security group rule (idemponent)
hwc_vpc_security_group_rule:
direction: "ingress"
@ -91,7 +91,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a security group rule (check mode)
hwc_vpc_security_group_rule:
direction: "ingress"
@ -108,7 +108,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a security group rule
hwc_vpc_security_group_rule:
direction: "ingress"
@ -124,7 +124,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ----------------------------------------------------------
- name: delete a security group rule (idemponent)
hwc_vpc_security_group_rule:
direction: "ingress"
@ -157,7 +157,7 @@
that:
- result is not failed
- result is not changed
#---------------------------------------------------------
# ---------------------------------------------------------
# Post-test teardown
- name: delete a security group
hwc_vpc_security_group:

View file

@ -23,7 +23,7 @@
name: "ansible_network_subnet_test"
dhcp_enable: true
state: absent
#----------------------------------------------------------
# ---------------------------------------------------------
- name: create a subnet (check mode)
hwc_vpc_subnet:
vpc_id: "{{ vpc.id }}"
@ -39,7 +39,7 @@
that:
- not result.id
- result.changed
#----------------------------------------------------------
# ---------------------------------------------------------
- name: create a subnet
hwc_vpc_subnet:
vpc_id: "{{ vpc.id }}"
@ -53,7 +53,7 @@
assert:
that:
result is changed
#----------------------------------------------------------
# ---------------------------------------------------------
- name: create a subnet (idemponent)
hwc_vpc_subnet:
vpc_id: "{{ vpc.id }}"
@ -83,7 +83,7 @@
that:
- result is not failed
- result is not changed
#----------------------------------------------------------
# ---------------------------------------------------------
- name: delete a subnet (check mode)
hwc_vpc_subnet:
vpc_id: "{{ vpc.id }}"
@ -98,7 +98,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ---------------------------------------------------------
- name: delete a subnet
hwc_vpc_subnet:
vpc_id: "{{ vpc.id }}"
@ -112,7 +112,7 @@
assert:
that:
- result is changed
#----------------------------------------------------------
# ---------------------------------------------------------
- name: delete a subnet (idemponent)
hwc_vpc_subnet:
vpc_id: "{{ vpc.id }}"
@ -142,7 +142,7 @@
that:
- result is not failed
- result is not changed
#---------------------------------------------------------
# --------------------------------------------------------
# Post-test teardown
- name: delete a vpc
hwc_network_vpc:

View file

@ -32,7 +32,6 @@
quiet: true
- name: "trigger error about missing param 'state'"
iptables_state:
path: foobar
@ -47,7 +46,6 @@
quiet: true
- name: "trigger error about missing param 'path'"
iptables_state:
state: saved
@ -62,7 +60,6 @@
quiet: true
- name: "trigger error about invalid value for param 'state'"
iptables_state:
path: foobar
@ -99,7 +96,6 @@
quiet: true
- name: "save state (must report a change)"
iptables_state:
path: "{{ iptables_saved }}"
@ -114,7 +110,6 @@
quiet: true
- name: "save state (idempotency, must NOT report a change)"
iptables_state:
path: "{{ iptables_saved }}"
@ -129,7 +124,6 @@
quiet: true
- name: "save state (check_mode, must NOT report a change)"
iptables_state:
path: "{{ iptables_saved }}"
@ -145,7 +139,6 @@
quiet: true
# We begin with 'state=restored' by restoring the current state on itself.
# This at least ensures the file produced with state=saved is suitable for
# state=restored.
@ -176,7 +169,6 @@
register: xtables_lock
- name: "state=restored changed=false"
block:
- name: "restore state (must NOT report a change, warning about rollback & async)"
@ -202,14 +194,12 @@
register: xtables_lock
- name: "change iptables state (iptables)"
iptables:
chain: OUTPUT
jump: ACCEPT
- name: "state=restored changed=true"
block:
- name: "restore state (check_mode, must report a change)"
@ -236,7 +226,6 @@
register: xtables_lock
- name: "state=restored changed=true"
block:
- name: "restore state (must report a change, async, no warning)"
@ -265,7 +254,6 @@
register: xtables_lock
- name: "state=restored changed=false"
block:
- name: "restore state (must NOT report a change, async, no warning)"
@ -293,7 +281,6 @@
register: xtables_lock
- name: "state=restored changed=false"
block:
- name: "restore state (check_mode=yes, must NOT report a change, no warning)"

View file

@ -28,7 +28,6 @@
quiet: true
- name: "get state (table nat)"
iptables_state:
table: nat
@ -48,7 +47,6 @@
quiet: true
- name: "save state (table filter)"
iptables_state:
path: "{{ iptables_saved }}"
@ -68,7 +66,6 @@
quiet: true
- name: "save state (table nat)"
iptables_state:
path: "{{ iptables_saved }}"
@ -89,7 +86,6 @@
quiet: true
- name: "save state (any table)"
iptables_state:
path: "{{ iptables_saved }}"
@ -109,7 +105,6 @@
quiet: true
- name: "restore state (table nat, must NOT report a change, no warning)"
iptables_state:
path: "{{ iptables_saved }}"
@ -132,7 +127,6 @@
quiet: true
- name: "change NAT table (iptables)"
iptables:
table: nat
@ -141,7 +135,6 @@
state: present
- name: "restore state (table nat, must report a change, no warning)"
iptables_state:
path: "{{ iptables_saved }}"
@ -166,7 +159,6 @@
quiet: true
- name: "get raw and mangle tables states"
iptables_state:
path: "{{ iptables_saved }}"
@ -179,7 +171,6 @@
check_mode: true
- name: "save state (any table)"
iptables_state:
path: "{{ iptables_saved }}"
@ -200,7 +191,6 @@
quiet: true
- name: "save filter table into a test file"
iptables_state:
path: "{{ iptables_tests }}"
@ -213,7 +203,6 @@
line: "# *mangle"
- name: "restore state (table filter, must NOT report a change, no warning)"
iptables_state:
path: "{{ iptables_tests }}"
@ -242,7 +231,6 @@
quiet: true
- name: "restore state (any table, must NOT report a change, no warning)"
iptables_state:
path: "{{ iptables_tests }}"
@ -270,7 +258,6 @@
quiet: true
- name: "restore state (table mangle, must fail, no warning)"
iptables_state:
path: "{{ iptables_tests }}"

View file

@ -12,7 +12,6 @@
COMMIT
- name: "restore state from the test file (check_mode, must report a change)"
iptables_state:
path: "{{ iptables_tests }}"
@ -26,7 +25,6 @@
- iptables_state is changed
- name: "fail to restore state from the test file"
block:
- name: "restore state from the test file (bad policies, expected error -> rollback)"
@ -59,7 +57,6 @@
- iptables_state is failed
- name: "fail to restore state from the test file (again)"
block:
- name: "try again, with a higher timeout (bad policies, same expected error)"
@ -94,7 +91,6 @@
- iptables_state is failed
- name: "restore state from backup (must NOT report a change)"
iptables_state:
path: "{{ iptables_saved }}"
@ -109,7 +105,6 @@
- iptables_state is not changed
- name: "restore state from backup (mangle, must NOT report a change)"
iptables_state:
path: "{{ iptables_saved }}"
@ -125,7 +120,6 @@
- iptables_state is not changed
- name: "create a blocking ruleset with a REJECT rule"
copy:
dest: "{{ iptables_tests }}"
@ -135,7 +129,6 @@
COMMIT
- name: "fail to restore state from the test file (again)"
block:
- name: "restore state from the test file (bad rules, expected error -> rollback)"
@ -168,7 +161,6 @@
- iptables_state is failed
- name: "fail to restore state from the test file (again)"
block:
- name: "try again, with a higher timeout (bad rules, same expected error)"

View file

@ -147,7 +147,7 @@
that:
- result_x509_changed is failed
- name: import initial test certificate from file path
- name: Import initial test certificate from file path
community.general.java_cert:
cert_alias: test_cert
cert_path: "{{ test_cert_path }}"

View file

@ -4,4 +4,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
dependencies:
- setup_wildfly_server
- setup_wildfly_server

View file

@ -17,7 +17,7 @@
copy:
dest: "{{ kwriteconf_fake }}"
src: kwriteconf_fake
mode: 0755
mode: "0755"
- name: Simple test
kdeconfig:
@ -182,7 +182,7 @@
values:
- group: test
key: test1
bool_value: on
bool_value: true
kwriteconfig_path: "{{ kwriteconf_fake }}"
register: result_bool_idem
ignore_errors: true
@ -207,7 +207,7 @@
value: test2
- groups: [testx, testy]
key: testz
bool_value: on
bool_value: true
kwriteconfig_path: "{{ kwriteconf_fake }}"
register: result_checkmode
ignore_errors: true
@ -236,7 +236,7 @@
value: test2
- groups: [testx, testy]
key: testz
bool_value: on
bool_value: true
kwriteconfig_path: "{{ kwriteconf_fake }}"
register: result_checkmode_apply
ignore_errors: true
@ -260,7 +260,7 @@
value: test2
- groups: [testx, testy]
key: testz
bool_value: on
bool_value: true
kwriteconfig_path: "{{ kwriteconf_fake }}"
register: result_checkmode2
ignore_errors: true

View file

@ -29,7 +29,7 @@
uri:
url: "{{ url }}/admin/"
status_code: 200
validate_certs: no
validate_certs: false
register: result
until: result.status == 200
retries: 10

View file

@ -6,7 +6,7 @@
uri:
url: "{{ url }}/admin/"
status_code: 200
validate_certs: no
validate_certs: false
register: result
until: result.status == 200
retries: 10
@ -72,7 +72,7 @@
redirect_uris: '{{redirect_uris1}}'
attributes: '{{client_attributes1}}'
protocol_mappers: '{{protocol_mappers1}}'
authorization_services_enabled: False
authorization_services_enabled: false
check_mode: true
register: check_client_when_present_and_same
@ -94,8 +94,8 @@
redirect_uris: '{{redirect_uris1}}'
attributes: '{{client_attributes1}}'
protocol_mappers: '{{protocol_mappers1}}'
authorization_services_enabled: False
service_accounts_enabled: True
authorization_services_enabled: false
service_accounts_enabled: true
check_mode: true
register: check_client_when_present_and_changed

View file

@ -6,7 +6,7 @@
uri:
url: "{{ url }}/admin/"
status_code: 200
validate_certs: no
validate_certs: false
register: result
until: result.status == 200
retries: 10
@ -54,9 +54,9 @@
state: present
redirect_uris:
- "https://my-backend-api.c.org/"
fullScopeAllowed: True
fullScopeAllowed: true
attributes: '{{client_attributes1}}'
public_client: False
public_client: false
- name: Create a Keycloak client role
community.general.keycloak_role:
@ -82,8 +82,8 @@
redirect_uris:
- "https://my-onepage-app-frontend.c.org/"
attributes: '{{client_attributes1}}'
full_scope_allowed: False
public_client: True
full_scope_allowed: false
public_client: true
- name: Map roles to public client

View file

@ -6,7 +6,7 @@
uri:
url: "{{ url }}/admin/"
status_code: 200
validate_certs: no
validate_certs: false
register: result
until: result.status == 200
retries: 10

View file

@ -37,7 +37,8 @@
- name: Map a realm role to client service account
vars:
- roles: [ {'name': '{{ role }}'} ]
- roles:
- name: '{{ role }}'
community.general.keycloak_user_rolemapping:
auth_keycloak_url: "{{ url }}"
auth_realm: "{{ admin_realm }}"
@ -57,7 +58,8 @@
- name: Unmap a realm role from client service account
vars:
- roles: [ {'name': '{{ role }}'} ]
- roles:
- name: '{{ role }}'
community.general.keycloak_user_rolemapping:
auth_keycloak_url: "{{ url }}"
auth_realm: "{{ admin_realm }}"
@ -101,7 +103,8 @@
- name: Map a client role to client service account
vars:
- roles: [ {'name': '{{ role }}'} ]
- roles:
- name: '{{ role }}'
community.general.keycloak_user_rolemapping:
auth_keycloak_url: "{{ url }}"
auth_realm: "{{ admin_realm }}"
@ -122,7 +125,8 @@
- name: Unmap a client role from client service account
vars:
- roles: [ {'name': '{{ role }}'} ]
- roles:
- name: '{{ role }}'
community.general.keycloak_user_rolemapping:
auth_keycloak_url: "{{ url }}"
auth_realm: "{{ admin_realm }}"

View file

@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
etcd3_prefix: '/keyprefix/'
etcd3_singlekey: '/singlekeypath'
etcd3_prefix: '/keyprefix/'
etcd3_singlekey: '/singlekeypath'

View file

@ -3,64 +3,64 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Create a password ({{ backend }})
- name: Create a password ({{ backend }})
set_fact:
newpass: "{{ lookup('community.general.passwordstore', 'test-pass', length=8, create=true, backend=backend) }}"
- name: Fetch password from an existing file ({{ backend }})
- name: Fetch password from an existing file ({{ backend }})
set_fact:
readpass: "{{ lookup('community.general.passwordstore', 'test-pass', backend=backend) }}"
- name: Verify password ({{ backend }})
- name: Verify password ({{ backend }})
assert:
that:
- readpass == newpass
- name: Create a password with equal sign ({{ backend }})
- name: Create a password with equal sign ({{ backend }})
set_fact:
newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=true', backend=backend) }}"
- name: Fetch a password with equal sign ({{ backend }})
- name: Fetch a password with equal sign ({{ backend }})
set_fact:
readpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal', backend=backend) }}"
- name: Verify password ({{ backend }})
- name: Verify password ({{ backend }})
assert:
that:
- readpass == newpass
- name: Create a password using missing=create ({{ backend }})
- name: Create a password using missing=create ({{ backend }})
set_fact:
newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='create', length=8, backend=backend) }}"
- name: Fetch password from an existing file ({{ backend }})
- name: Fetch password from an existing file ({{ backend }})
set_fact:
readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', backend=backend) }}"
- name: Verify password ({{ backend }})
- name: Verify password ({{ backend }})
assert:
that:
- readpass == newpass
- name: Fetch password from existing file using missing=empty ({{ backend }})
- name: Fetch password from existing file using missing=empty ({{ backend }})
set_fact:
readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='empty', backend=backend) }}"
- name: Verify password ({{ backend }})
- name: Verify password ({{ backend }})
assert:
that:
- readpass == newpass
- name: Fetch password from non-existing file using missing=empty ({{ backend }})
- name: Fetch password from non-existing file using missing=empty ({{ backend }})
set_fact:
readpass: "{{ query('community.general.passwordstore', 'test-missing-pass', missing='empty', backend=backend) }}"
- name: Verify password ({{ backend }})
- name: Verify password ({{ backend }})
assert:
that:
- readpass == [ none ]
- name: Create the YAML password ({{ backend }})
- name: Create the YAML password ({{ backend }})
command: "{{ backend }} insert -m -f test-yaml-pass"
args:
stdin: |
@ -69,60 +69,60 @@
multi
line
- name: Fetch a password with YAML subkey ({{ backend }})
- name: Fetch a password with YAML subkey ({{ backend }})
set_fact:
readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass', subkey='key', backend=backend) }}"
- name: Read a yaml subkey ({{ backend }})
- name: Read a yaml subkey ({{ backend }})
assert:
that:
- readyamlpass == 'multi\nline\n'
- name: Create a non-YAML multiline file ({{ backend }})
- name: Create a non-YAML multiline file ({{ backend }})
command: "{{ backend }} insert -m -f test-multiline-pass"
args:
stdin: |
testpassword
random additional line
- name: Fetch password from multiline file ({{ backend }})
- name: Fetch password from multiline file ({{ backend }})
set_fact:
readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass', backend=backend) }}"
- name: Multiline pass only returns first line ({{ backend }})
- name: Multiline pass only returns first line ({{ backend }})
assert:
that:
- readyamlpass == 'testpassword'
- name: Fetch all from multiline file ({{ backend }})
- name: Fetch all from multiline file ({{ backend }})
set_fact:
readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass', returnall='yes', backend=backend) }}"
- name: Multiline pass returnall returns everything in the file ({{ backend }})
- name: Multiline pass returnall returns everything in the file ({{ backend }})
assert:
that:
- readyamlpass == 'testpassword\nrandom additional line\n'
- name: Create a password in a folder ({{ backend }})
- name: Create a password in a folder ({{ backend }})
set_fact:
newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', length=8, create=true, backend=backend) }}"
- name: Fetch password from folder ({{ backend }})
- name: Fetch password from folder ({{ backend }})
set_fact:
readpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', backend=backend) }}"
- name: Verify password from folder ({{ backend }})
- name: Verify password from folder ({{ backend }})
assert:
that:
- readpass == newpass
- name: Try to read folder as passname ({{ backend }})
- name: Try to read folder as passname ({{ backend }})
set_fact:
newpass: "{{ lookup('community.general.passwordstore', 'folder', backend=backend) }}"
ignore_errors: true
register: eval_error
- name: Make sure reading folder as passname failed ({{ backend }})
- name: Make sure reading folder as passname failed ({{ backend }})
assert:
that:
- eval_error is failed

View file

@ -66,7 +66,7 @@
# port: 8885
# register: result
#- assert:
# - assert:
# that:
# - result is success

View file

@ -38,7 +38,7 @@
copy:
src: sleeper.c
dest: "{{ remote_tmp_dir }}/sleeper.c"
mode: 0644
mode: "0644"
- name: Compile fake 'sleep' binary
command: cc {{ remote_tmp_dir }}/sleeper.c -o {{ remote_tmp_dir }}/{{ random_name }}
@ -47,7 +47,7 @@
template:
src: obtainpid.sh.j2
dest: "{{ remote_tmp_dir }}/obtainpid.sh"
mode: 0755
mode: "0755"
- name: "Run the fake 'sleep' binary"
command: sh {{ remote_tmp_dir }}/obtainpid.sh

View file

@ -7,7 +7,7 @@
ansible.builtin.file:
path: /opt/pipx
state: directory
mode: 0755
mode: "0755"
- name: Install tox site-wide
community.general.pipx:

View file

@ -4,4 +4,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
dependencies:
- setup_redis_replication
- setup_redis_replication

View file

@ -4,4 +4,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
dependencies:
- setup_rundeck
- setup_rundeck

View file

@ -47,7 +47,7 @@
become: true
ansible.builtin.file:
path: /var/run/docker.sock
mode: 0666
mode: "0666"
- name: Install python "requests"
ansible.builtin.pip:

View file

@ -9,7 +9,7 @@
#
etcd3_ver: "v3.2.14"
etcd3_download_server: "https://storage.googleapis.com/etcd"
#etcd3_download_server: "https://github.com/coreos/etcd/releases/download"
# etcd3_download_server: "https://github.com/coreos/etcd/releases/download"
etcd3_download_url: "{{ etcd3_download_server }}/{{ etcd3_ver }}/etcd-{{ etcd3_ver }}-linux-amd64.tar.gz"
etcd3_download_location: /tmp/etcd-download-test
etcd3_path: "{{ etcd3_download_location }}/etcd-{{ etcd3_ver }}-linux-amd64"

View file

@ -94,8 +94,8 @@
register: _etcd3run
changed_when: true
# - name: kill etcd3
# command: "pkill etcd"
# - name: kill etcd3
# command: "pkill etcd"
when:
- _testetcd3ctl.rc != 0

View file

@ -4,5 +4,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
dependencies:
- setup_pkg_mgr
- setup_remote_constraints
- setup_pkg_mgr
- setup_remote_constraints

View file

@ -4,5 +4,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
dependencies:
- setup_pkg_mgr
- setup_remote_tmp_dir
- setup_pkg_mgr
- setup_remote_tmp_dir

View file

@ -20,7 +20,7 @@
identities_only: true
controlmaster: "auto"
controlpath: "~/.ssh/sockets/%r@%h-%p"
controlpersist: yes
controlpersist: "yes"
dynamicforward: '10080'
other_options:
serveraliveinterval: '30'
@ -57,7 +57,7 @@
identities_only: true
controlmaster: "auto"
controlpath: "~/.ssh/sockets/%r@%h-%p"
controlpersist: yes
controlpersist: "yes"
dynamicforward: '10080'
other_options:
serveraliveinterval: '30'
@ -83,7 +83,7 @@
identities_only: true
controlmaster: "auto"
controlpath: "~/.ssh/sockets/%r@%h-%p"
controlpersist: yes
controlpersist: "yes"
dynamicforward: '10080'
other_options:
serveraliveinterval: '30'
@ -126,7 +126,7 @@
add_keys_to_agent: false
host_key_algorithms: "+ssh-ed25519"
identities_only: false
controlmaster: no
controlmaster: "no"
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
controlpersist: "600"
dynamicforward: '11080'
@ -154,7 +154,7 @@
add_keys_to_agent: false
host_key_algorithms: "+ssh-ed25519"
identities_only: false
controlmaster: no
controlmaster: "no"
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
controlpersist: "600"
dynamicforward: '11080'
@ -298,7 +298,7 @@
identities_only: true
controlmaster: "auto"
controlpath: "~/.ssh/sockets/%r@%h-%p"
controlpersist: yes
controlpersist: "yes"
dynamicforward: '10080'
other_options:
serveraliveinterval: '30'
@ -335,7 +335,7 @@
identities_only: true
controlmaster: "auto"
controlpath: "~/.ssh/sockets/%r@%h-%p"
controlpersist: yes
controlpersist: "yes"
dynamicforward: '10080'
other_options:
serveraliveinterval: '30'
@ -361,7 +361,7 @@
identities_only: true
controlmaster: "auto"
controlpath: "~/.ssh/sockets/%r@%h-%p"
controlpersist: yes
controlpersist: "yes"
dynamicforward: '10080'
other_options:
serveraliveinterval: '30'
@ -404,7 +404,7 @@
add_keys_to_agent: false
host_key_algorithms: "+ssh-ed25519"
identities_only: false
controlmaster: no
controlmaster: "no"
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
controlpersist: "600"
dynamicforward: '11080'
@ -432,7 +432,7 @@
add_keys_to_agent: false
host_key_algorithms: "+ssh-ed25519"
identities_only: false
controlmaster: no
controlmaster: "no"
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
controlpersist: "600"
dynamicforward: '11080'

View file

@ -7,7 +7,7 @@
ansible.builtin.file:
path: "{{ terraform_project_dir }}/complex_vars"
state: directory
mode: 0755
mode: "0755"
- name: copy terraform files to work space
ansible.builtin.copy:
@ -49,10 +49,10 @@
one
two
list_of_lists:
- [ 1 ]
- [ 11, 12, 13 ]
- [ 2 ]
- [ 3 ]
- [1]
- [11, 12, 13]
- [2]
- [3]
state: present
register: terraform_init_result

View file

@ -42,7 +42,7 @@
ansible.builtin.unarchive:
src: "{{ terraform_url }}"
dest: "{{ remote_tmp_dir }}"
mode: 0755
mode: "0755"
remote_src: true
validate_certs: "{{ validate_certs }}"

View file

@ -7,7 +7,7 @@
file:
path: "{{ terraform_project_dir }}/{{ item['name'] }}"
state: directory
mode: 0755
mode: "0755"
loop: "{{ terraform_provider_versions }}"
loop_control:
index_var: provider_index

View file

@ -184,7 +184,7 @@
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
_AnsibleTaggedFloat: float
data: {'a': 1, 'b': 1.1, 'c': 'abc', 'd': True, 'e': ['x', 'y', 'z'], 'f': {'x': 1, 'y': 2}}
data: {'a': 1, 'b': 1.1, 'c': 'abc', 'd': true, 'e': ['x', 'y', 'z'], 'f': {'x': 1, 'y': 2}}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
dtype: dict[str, bool|dict|float|int|list|str]
@ -200,7 +200,7 @@
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
_AnsibleTaggedFloat: float
data: [1, 2, 1.1, 'abc', True, ['x', 'y', 'z'], {'x': 1, 'y': 2}]
data: [1, 2, 1.1, 'abc', true, ['x', 'y', 'z'], {'x': 1, 'y': 2}]
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
dtype: list[bool|dict|float|int|list|str]

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Add child element
- name: Add child element
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/beers
@ -17,10 +17,10 @@
- beer: Окское
register: add_children_elements_unicode
- name: Add trailing newline
- name: Add trailing newline
shell: echo "" >> /tmp/ansible-xml-beers.xml
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-add-children-elements-unicode.xml
dest: /tmp/ansible-xml-beers.xml
@ -28,9 +28,9 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- add_children_elements_unicode is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-elements-unicode.xml /tmp/ansible-xml-beers.xml
# command: diff -u {{ role_path }}/results/test-add-children-elements-unicode.xml /tmp/ansible-xml-beers.xml

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Add child element
- name: Add child element
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/beers
@ -17,10 +17,10 @@
- beer: Old Rasputin
register: add_children_elements
- name: Add trailing newline
- name: Add trailing newline
shell: echo "" >> /tmp/ansible-xml-beers.xml
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-add-children-elements.xml
dest: /tmp/ansible-xml-beers.xml
@ -28,9 +28,9 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- add_children_elements is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-elements.xml /tmp/ansible-xml-beers.xml
# command: diff -u {{ role_path }}/results/test-add-children-elements.xml /tmp/ansible-xml-beers.xml

View file

@ -3,23 +3,23 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Add child element
- name: Add child element
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/beers
add_children: '{{ bad_beers }}'
register: add_children_from_groupvars
- name: Add trailing newline
- name: Add trailing newline
shell: echo "" >> /tmp/ansible-xml-beers.xml
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-add-children-from-groupvars.xml
dest: /tmp/ansible-xml-beers.xml
@ -27,9 +27,9 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- add_children_from_groupvars is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-from-groupvars.xml /tmp/ansible-xml-beers.xml
# command: diff -u {{ role_path }}/results/test-add-children-from-groupvars.xml /tmp/ansible-xml-beers.xml

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Add child element
- name: Add child element
xml:
path: /tmp/ansible-xml-beers.xml
xpath: '/business/beers/beer[text()="St. Bernardus Abbot 12"]'
@ -21,7 +21,7 @@
pretty_print: true
register: add_children_insertafter
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-add-children-insertafter.xml
dest: /tmp/ansible-xml-beers.xml
@ -29,7 +29,7 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- add_children_insertafter is changed

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Add child element
- name: Add child element
xml:
path: /tmp/ansible-xml-beers.xml
xpath: '/business/beers/beer[text()="St. Bernardus Abbot 12"]'
@ -21,7 +21,7 @@
pretty_print: true
register: add_children_insertbefore
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-add-children-insertbefore.xml
dest: /tmp/ansible-xml-beers.xml
@ -29,7 +29,7 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- add_children_insertbefore is changed

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Add child element
- name: Add child element
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/beers
@ -19,10 +19,10 @@
type: экстра
register: add_children_with_attributes_unicode
- name: Add trailing newline
- name: Add trailing newline
shell: echo "" >> /tmp/ansible-xml-beers.xml
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-add-children-with-attributes-unicode.xml
dest: /tmp/ansible-xml-beers.xml
@ -30,9 +30,9 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- add_children_with_attributes_unicode is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-with-attributes-unicode.xml /tmp/ansible-xml-beers.xml
# command: diff -u {{ role_path }}/results/test-add-children-with-attributes-unicode.xml /tmp/ansible-xml-beers.xml

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Add child element
- name: Add child element
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/beers
@ -19,10 +19,10 @@
type: light
register: add_children_with_attributes
- name: Add trailing newline
- name: Add trailing newline
shell: echo "" >> /tmp/ansible-xml-beers.xml
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-add-children-with-attributes.xml
dest: /tmp/ansible-xml-beers.xml
@ -30,13 +30,13 @@
diff: true
register: comparison
# NOTE: This test may fail if lxml does not support predictable element attribute order
# So we filter the failure out for these platforms (e.g. CentOS 6)
# The module still works fine, we simply are not comparing as smart as we should.
- name: Test expected result
# NOTE: This test may fail if lxml does not support predictable element attribute order
# So we filter the failure out for these platforms (e.g. CentOS 6)
# The module still works fine, we simply are not comparing as smart as we should.
- name: Test expected result
assert:
that:
- add_children_with_attributes is changed
- comparison is not changed # identical
when: lxml_predictable_attribute_order
#command: diff -u {{ role_path }}/results/test-add-children-with-attributes.xml /tmp/ansible-xml-beers.xml
# command: diff -u {{ role_path }}/results/test-add-children-with-attributes.xml /tmp/ansible-xml-beers.xml

View file

@ -113,7 +113,7 @@
assert:
that:
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-element-implicitly.xml /tmp/ansible-xml-beers-implicit.xml
# command: diff -u {{ role_path }}/results/test-add-element-implicitly.xml /tmp/ansible-xml-beers-implicit.xml
# Now we repeat the same, just to ensure proper use of namespaces

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-namespaced-beers.xml
dest: /tmp/ansible-xml-namespaced-beers.xml
- name: Add namespaced child element
- name: Add namespaced child element
xml:
path: /tmp/ansible-xml-namespaced-beers.xml
xpath: /bus:business/ber:beers
@ -20,10 +20,10 @@
- beer: Old Rasputin
register: add_namespaced_children_elements
- name: Add trailing newline
- name: Add trailing newline
shell: echo "" >> /tmp/ansible-xml-namespaced-beers.xml
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-add-namespaced-children-elements.xml
dest: /tmp/ansible-xml-namespaced-beers.xml
@ -31,9 +31,9 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- add_namespaced_children_elements is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-namespaced-children-elements.xml /tmp/ansible-xml-namespaced-beers.xml
# command: diff -u {{ role_path }}/results/test-add-namespaced-children-elements.xml /tmp/ansible-xml-namespaced-beers.xml

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Add child element with xml format
- name: Add child element with xml format
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/beers
@ -18,10 +18,10 @@
- '<beer>Old Rasputin</beer>'
register: children_elements
- name: Add trailing newline
- name: Add trailing newline
shell: echo "" >> /tmp/ansible-xml-beers.xml
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-add-children-elements.xml
dest: /tmp/ansible-xml-beers.xml
@ -29,9 +29,9 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- children_elements is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-elements.xml /tmp/ansible-xml-beers.xml
# command: diff -u {{ role_path }}/results/test-add-children-elements.xml /tmp/ansible-xml-beers.xml

View file

@ -3,20 +3,20 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers-unicode.xml
dest: /tmp/ansible-xml-beers-unicode.xml
- name: Count child element
- name: Count child element
xml:
path: /tmp/ansible-xml-beers-unicode.xml
xpath: /business/beers/beer
count: true
register: beers
- name: Test expected result
- name: Test expected result
assert:
that:
- beers is not changed

View file

@ -3,20 +3,20 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Add child element
- name: Add child element
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/beers/beer
count: true
register: beers
- name: Test expected result
- name: Test expected result
assert:
that:
- beers is not changed

View file

@ -3,33 +3,33 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers-unicode.xml
dest: /tmp/ansible-xml-beers-unicode.xml
- name: Get element attributes
- name: Get element attributes
xml:
path: /tmp/ansible-xml-beers-unicode.xml
xpath: /business/rating
content: attribute
register: get_element_attribute
- name: Test expected result
- name: Test expected result
assert:
that:
- get_element_attribute is not changed
- get_element_attribute.matches[0]['rating'] is defined and get_element_attribute.matches[0]['rating']['subjective'] == 'да'
- name: Get element text
- name: Get element text
xml:
path: /tmp/ansible-xml-beers-unicode.xml
xpath: /business/rating
content: text
register: get_element_text
- name: Test expected result
- name: Test expected result
assert:
that:
- get_element_text is not changed

View file

@ -3,27 +3,27 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Get element attributes
- name: Get element attributes
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/rating
content: attribute
register: get_element_attribute
- name: Test expected result
- name: Test expected result
assert:
that:
- get_element_attribute is not changed
- get_element_attribute.matches[0]['rating'] is defined
- get_element_attribute.matches[0]['rating']['subjective'] == 'true'
- name: Get element attributes (should fail)
- name: Get element attributes (should fail)
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/rating
@ -32,19 +32,19 @@
register: get_element_attribute_wrong
ignore_errors: true
- name: Test expected result
- name: Test expected result
assert:
that:
- get_element_attribute_wrong is failed
- name: Get element text
- name: Get element text
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/rating
content: text
register: get_element_text
- name: Test expected result
- name: Test expected result
assert:
that:
- get_element_text is not changed

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Specify both children to add and a value
- name: Specify both children to add and a value
xml:
path: /tmp/ansible-xml-beers.xml
add_children:
@ -19,7 +19,7 @@
register: module_output
ignore_errors: true
- name: Test expected result
- name: Test expected result
assert:
that:
- module_output is not changed

View file

@ -3,21 +3,21 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml.orig
- name: Remove spaces from test fixture
- name: Remove spaces from test fixture
shell: sed 's/^[ ]*//g' < /tmp/ansible-xml-beers.xml.orig > /tmp/ansible-xml-beers.xml
- name: Pretty print without modification
- name: Pretty print without modification
xml:
path: /tmp/ansible-xml-beers.xml
pretty_print: true
register: pretty_print_only
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-pretty-print-only.xml
dest: /tmp/ansible-xml-beers.xml
@ -25,9 +25,9 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- pretty_print_only is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-pretty-print-only.xml /tmp/ansible-xml-beers.xml
# command: diff -u {{ role_path }}/results/test-pretty-print-only.xml /tmp/ansible-xml-beers.xml

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml
- name: Pretty print
- name: Pretty print
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/beers
@ -18,7 +18,7 @@
- beer: Old Rasputin
register: pretty_print
- name: Compare to expected result
- name: Compare to expected result
copy:
src: results/test-pretty-print.xml
dest: /tmp/ansible-xml-beers.xml
@ -26,9 +26,9 @@
diff: true
register: comparison
- name: Test expected result
- name: Test expected result
assert:
that:
- pretty_print is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-pretty-print.xml /tmp/ansible-xml-beers.xml
# command: diff -u {{ role_path }}/results/test-pretty-print.xml /tmp/ansible-xml-beers.xml

Some files were not shown because too many files have changed in this diff Show more