mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
parent
bc99432f89
commit
eaa5e07b28
247 changed files with 7318 additions and 7375 deletions
2
.github/workflows/ansible-test.yml
vendored
2
.github/workflows/ansible-test.yml
vendored
|
@ -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:
|
||||
|
|
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -5,7 +5,7 @@
|
|||
|
||||
name: "Code scanning - action"
|
||||
|
||||
on:
|
||||
"on":
|
||||
schedule:
|
||||
- cron: '26 19 * * 1'
|
||||
workflow_dispatch:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
copy:
|
||||
content: ""
|
||||
dest: "{{ remote_tmp }}/test_empty.txt"
|
||||
force: no
|
||||
force: false
|
||||
mode: '0644'
|
||||
|
||||
- name: assert file without content exists
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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, ">=")
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)"
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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)"
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
ansible.builtin.file:
|
||||
path: /opt/pipx
|
||||
state: directory
|
||||
mode: 0755
|
||||
mode: "0755"
|
||||
|
||||
- name: Install tox site-wide
|
||||
community.general.pipx:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 }}"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
pool_properties:
|
||||
ashift: 12
|
||||
filesystem_properties:
|
||||
compression: off
|
||||
compression: false
|
||||
vdevs:
|
||||
- type: mirror
|
||||
disks: "{{ zpool_vdevs_disk_config.vdev3 }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue