mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 03:30:22 -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
|
# https://github.com/marketplace/actions/ansible-test
|
||||||
|
|
||||||
name: EOL CI
|
name: EOL CI
|
||||||
on:
|
"on":
|
||||||
# Run EOL CI against all pushes (direct commits, also merged PRs), Pull Requests
|
# Run EOL CI against all pushes (direct commits, also merged PRs), Pull Requests
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
name: "Code scanning - action"
|
name: "Code scanning - action"
|
||||||
|
|
||||||
on:
|
"on":
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '26 19 * * 1'
|
- cron: '26 19 * * 1'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
collections:
|
collections:
|
||||||
- ansible.posix
|
- ansible.posix
|
||||||
- community.crypto
|
- community.crypto
|
||||||
- community.docker
|
- community.docker
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
|
|
||||||
- include_tasks: tests.yml
|
- include_tasks: tests.yml
|
||||||
with_nested:
|
with_nested:
|
||||||
- [ true, false ] # with_link
|
- [true, false] # with_link
|
||||||
- [ true, false ] # with_alternatives
|
- [true, false] # with_alternatives
|
||||||
- [ 'auto', 'manual' ] # mode
|
- ['auto', 'manual'] # mode
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: test_conf
|
loop_var: test_conf
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "{{ commandline_tools_link }}"
|
src: "{{ commandline_tools_link }}"
|
||||||
dest: "{{ android_cmdline_temp_dir }}"
|
dest: "{{ android_cmdline_temp_dir }}"
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
creates: "{{ android_cmdline_temp_dir }}/cmdline-tools"
|
creates: "{{ android_cmdline_temp_dir }}/cmdline-tools"
|
||||||
when: not sdkmanager_installed.stat.exists
|
when: not sdkmanager_installed.stat.exists
|
||||||
|
|
||||||
|
@ -91,4 +91,4 @@
|
||||||
copy:
|
copy:
|
||||||
src: "{{ android_cmdline_temp_dir }}/cmdline-tools/"
|
src: "{{ android_cmdline_temp_dir }}/cmdline-tools/"
|
||||||
dest: "{{ android_sdk_location }}/cmdline-tools/latest"
|
dest: "{{ android_sdk_location }}/cmdline-tools/latest"
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
btrfs_subvolume_single_configs:
|
btrfs_subvolume_single_configs:
|
||||||
- file: "/tmp/disks0.img"
|
- file: "/tmp/disks0.img"
|
||||||
loop: "/dev/loop95"
|
loop: "/dev/loop95"
|
||||||
btrfs_subvolume_multiple_configs:
|
btrfs_subvolume_multiple_configs:
|
||||||
- file: "/tmp/diskm0.img"
|
- file: "/tmp/diskm0.img"
|
||||||
loop: "/dev/loop97"
|
loop: "/dev/loop97"
|
||||||
- file: "/tmp/diskm1.img"
|
- file: "/tmp/diskm1.img"
|
||||||
loop: "/dev/loop98"
|
loop: "/dev/loop98"
|
||||||
- file: "/tmp/diskm2.img"
|
- file: "/tmp/diskm2.img"
|
||||||
loop: "/dev/loop99"
|
loop: "/dev/loop99"
|
||||||
btrfs_subvolume_configs: "{{ btrfs_subvolume_single_configs + btrfs_subvolume_multiple_configs }}"
|
btrfs_subvolume_configs: "{{ btrfs_subvolume_single_configs + btrfs_subvolume_multiple_configs }}"
|
||||||
btrfs_subvolume_single_devices: "{{ btrfs_subvolume_single_configs | map(attribute='loop') }}"
|
btrfs_subvolume_single_devices: "{{ btrfs_subvolume_single_configs | map(attribute='loop') }}"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
name:
|
name:
|
||||||
- btrfs-progs # btrfs userspace
|
- btrfs-progs # btrfs userspace
|
||||||
- util-linux # losetup
|
- util-linux # losetup
|
||||||
ignore_errors: True
|
ignore_errors: true
|
||||||
register: btrfs_installed
|
register: btrfs_installed
|
||||||
|
|
||||||
- name: Execute integration tests tests
|
- name: Execute integration tests tests
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Create subvolume '/nonroot'
|
- name: Create subvolume '/nonroot'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
name: "/nonroot"
|
name: "/nonroot"
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
- name: Create single device btrfs filesystem
|
- name: Create single device btrfs filesystem
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "mkfs.btrfs --label {{ btrfs_subvolume_single_label }} -f {{ btrfs_subvolume_single_devices | first }}"
|
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
|
- name: Create multiple device btrfs filesystem
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "mkfs.btrfs --label {{ btrfs_subvolume_multiple_label }} -f -d raid0 {{ btrfs_subvolume_multiple_devices | join(' ') }}"
|
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
|
# Typically created by udev, but apparently missing on Alpine
|
||||||
- name: Create btrfs control device node
|
- name: Create btrfs control device node
|
||||||
|
@ -34,4 +34,4 @@
|
||||||
- name: Force rescan to ensure all device are detected
|
- name: Force rescan to ensure all device are detected
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "btrfs device scan"
|
cmd: "btrfs device scan"
|
||||||
changed_when: True
|
changed_when: true
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by label
|
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by label
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
name: "/match_label"
|
name: "/match_label"
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by uuid
|
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by uuid
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
name: "/match_uuid"
|
name: "/match_uuid"
|
||||||
filesystem_uuid: "{{ result.filesystem.uuid }}"
|
filesystem_uuid: "{{ result.filesystem.uuid }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by device
|
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by device
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
name: "/match_device"
|
name: "/match_device"
|
||||||
filesystem_device: "{{ result.filesystem.devices | first }}"
|
filesystem_device: "{{ result.filesystem.devices | first }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem when only mount
|
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem when only mount
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
name: "/match_only_mounted"
|
name: "/match_only_mounted"
|
||||||
state: "present"
|
state: "present"
|
||||||
register: result
|
register: result
|
||||||
|
@ -77,4 +77,4 @@
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- result.filesystem.label == btrfs_subvolume_target_label
|
- 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:
|
block:
|
||||||
- name: Create a snapshot named 'snapshot_clobber'
|
- name: Create a snapshot named 'snapshot_clobber'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/snapshot_clobber"
|
name: "/snapshot_clobber"
|
||||||
snapshot_source: "/"
|
snapshot_source: "/"
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
- name: Create a snapshot named 'snapshot_clobber' (no idempotency)
|
- name: Create a snapshot named 'snapshot_clobber' (no idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/snapshot_clobber"
|
name: "/snapshot_clobber"
|
||||||
snapshot_source: "/"
|
snapshot_source: "/"
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
- name: Cleanup created snapshot
|
- name: Cleanup created snapshot
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/snapshot_clobber"
|
name: "/snapshot_clobber"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Create a snapshot named 'snapshot_error'
|
- name: Create a snapshot named 'snapshot_error'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/snapshot_error"
|
name: "/snapshot_error"
|
||||||
snapshot_source: "/"
|
snapshot_source: "/"
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
- name: Create a snapshot named 'snapshot_error' (no idempotency)
|
- name: Create a snapshot named 'snapshot_error' (no idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/snapshot_error"
|
name: "/snapshot_error"
|
||||||
snapshot_source: "/"
|
snapshot_source: "/"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
- name: Cleanup created snapshot
|
- name: Cleanup created snapshot
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/snapshot_error"
|
name: "/snapshot_error"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Create a snapshot named 'snapshot_skip'
|
- name: Create a snapshot named 'snapshot_skip'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/snapshot_skip"
|
name: "/snapshot_skip"
|
||||||
snapshot_source: "/"
|
snapshot_source: "/"
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
- name: Create a snapshot named 'snapshot_skip' (idempotency)
|
- name: Create a snapshot named 'snapshot_skip' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/snapshot_skip"
|
name: "/snapshot_skip"
|
||||||
snapshot_source: "/"
|
snapshot_source: "/"
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
- name: Cleanup created snapshot
|
- name: Cleanup created snapshot
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/snapshot_skip"
|
name: "/snapshot_skip"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
block:
|
block:
|
||||||
- name: Update filesystem default subvolume to '@'
|
- name: Update filesystem default subvolume to '@'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
default: True
|
default: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/@"
|
name: "/@"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -19,8 +19,8 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
- name: Update filesystem default subvolume to '@' (idempotency)
|
- name: Update filesystem default subvolume to '@' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
default: True
|
default: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/@"
|
name: "/@"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
block:
|
block:
|
||||||
- name: Revert filesystem default subvolume to '/'
|
- name: Revert filesystem default subvolume to '/'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
default: True
|
default: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/"
|
name: "/"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -46,8 +46,8 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
- name: Revert filesystem default subvolume to '/' (idempotency)
|
- name: Revert filesystem default subvolume to '/' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
default: True
|
default: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/"
|
name: "/"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -62,8 +62,8 @@
|
||||||
block:
|
block:
|
||||||
- name: Update filesystem default subvolume to '@'
|
- name: Update filesystem default subvolume to '@'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
default: True
|
default: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/@"
|
name: "/@"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Delete custom default subvolume '@'
|
- name: Delete custom default subvolume '@'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/@"
|
name: "/@"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
- name: Delete custom default subvolume '@' (idempotency)
|
- name: Delete custom default subvolume '@' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/@"
|
name: "/@"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
- name: Create parent subvolume 'container'
|
- name: Create parent subvolume 'container'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container"
|
name: "/container"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Create a subvolume named 'nested' inside 'container'
|
- name: Create a subvolume named 'nested' inside 'container'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container/nested"
|
name: "/container/nested"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
- name: Create a subvolume named 'nested' inside 'container' (idempotency)
|
- name: Create a subvolume named 'nested' inside 'container' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container/nested"
|
name: "/container/nested"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Remove a subvolume named 'nested' inside 'container'
|
- name: Remove a subvolume named 'nested' inside 'container'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container/nested"
|
name: "/container/nested"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
- name: Remove a subvolume named 'nested' inside 'container' (idempotency)
|
- name: Remove a subvolume named 'nested' inside 'container' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container/nested"
|
name: "/container/nested"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
block:
|
block:
|
||||||
- name: Create a subvolume named '/recursive/son/grandson'
|
- name: Create a subvolume named '/recursive/son/grandson'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/recursive/son/grandson"
|
name: "/recursive/son/grandson"
|
||||||
recursive: Yes
|
recursive: true
|
||||||
state: "present"
|
state: "present"
|
||||||
register: result
|
register: result
|
||||||
- name: Subvolume named '/recursive/son/grandson' created
|
- name: Subvolume named '/recursive/son/grandson' created
|
||||||
|
@ -20,10 +20,10 @@
|
||||||
|
|
||||||
- name: Create a subvolume named '/recursive/son/grandson' (idempotency)
|
- name: Create a subvolume named '/recursive/son/grandson' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/recursive/son/grandson"
|
name: "/recursive/son/grandson"
|
||||||
recursive: Yes
|
recursive: true
|
||||||
state: "present"
|
state: "present"
|
||||||
register: result
|
register: result
|
||||||
- name: Subvolume named '/recursive/son/grandson' created (idempotency)
|
- name: Subvolume named '/recursive/son/grandson' created (idempotency)
|
||||||
|
@ -33,10 +33,10 @@
|
||||||
|
|
||||||
- name: Create a subvolume named '/recursive/daughter/granddaughter'
|
- name: Create a subvolume named '/recursive/daughter/granddaughter'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/recursive/daughter/granddaughter"
|
name: "/recursive/daughter/granddaughter"
|
||||||
recursive: Yes
|
recursive: true
|
||||||
state: "present"
|
state: "present"
|
||||||
register: result
|
register: result
|
||||||
- name: Subvolume named '/recursive/son/grandson' created
|
- name: Subvolume named '/recursive/son/grandson' created
|
||||||
|
@ -46,10 +46,10 @@
|
||||||
|
|
||||||
- name: Create a subvolume named '/recursive/daughter/granddaughter' (idempotency)
|
- name: Create a subvolume named '/recursive/daughter/granddaughter' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/recursive/daughter/granddaughter"
|
name: "/recursive/daughter/granddaughter"
|
||||||
recursive: Yes
|
recursive: true
|
||||||
state: "present"
|
state: "present"
|
||||||
register: result
|
register: result
|
||||||
- name: Subvolume named '/recursive/son/grandson' created (idempotency)
|
- name: Subvolume named '/recursive/son/grandson' created (idempotency)
|
||||||
|
@ -61,10 +61,10 @@
|
||||||
block:
|
block:
|
||||||
- name: Remove subvolume '/recursive' and all descendents
|
- name: Remove subvolume '/recursive' and all descendents
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/recursive"
|
name: "/recursive"
|
||||||
recursive: Yes
|
recursive: true
|
||||||
state: "absent"
|
state: "absent"
|
||||||
register: result
|
register: result
|
||||||
- name: Subvolume '/recursive' removed
|
- name: Subvolume '/recursive' removed
|
||||||
|
@ -74,10 +74,10 @@
|
||||||
|
|
||||||
- name: Remove subvolume '/recursive' and all descendents (idempotency)
|
- name: Remove subvolume '/recursive' and all descendents (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/recursive"
|
name: "/recursive"
|
||||||
recursive: Yes
|
recursive: true
|
||||||
state: "absent"
|
state: "absent"
|
||||||
register: result
|
register: result
|
||||||
- name: Subvolume '/recursive' removed (idempotency)
|
- name: Subvolume '/recursive' removed (idempotency)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Create a subvolume named 'simple'
|
- name: Create a subvolume named 'simple'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/simple"
|
name: "/simple"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
- name: Create a subvolume named 'simple' (idempotency)
|
- name: Create a subvolume named 'simple' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/simple"
|
name: "/simple"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Remove a subvolume named 'simple'
|
- name: Remove a subvolume named 'simple'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/simple"
|
name: "/simple"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
- name: Remove a subvolume named 'simple' (idempotency)
|
- name: Remove a subvolume named 'simple' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/simple"
|
name: "/simple"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
- name: Create a subvolume named 'container'
|
- name: Create a subvolume named 'container'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container"
|
name: "/container"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Create a subvolume named 'container/my data'
|
- name: Create a subvolume named 'container/my data'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container/my data"
|
name: "/container/my data"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
- name: Create a subvolume named 'container/my data' (idempotency)
|
- name: Create a subvolume named 'container/my data' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container/my data"
|
name: "/container/my data"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
block:
|
block:
|
||||||
- name: Remove a subvolume named 'container/my data'
|
- name: Remove a subvolume named 'container/my data'
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container/my data"
|
name: "/container/my data"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
- name: Remove a subvolume named 'container/my data' (idempotency)
|
- name: Remove a subvolume named 'container/my data' (idempotency)
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
automount: Yes
|
automount: true
|
||||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||||
name: "/container/my data"
|
name: "/container/my data"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
|
|
@ -41,22 +41,21 @@
|
||||||
content: |
|
content: |
|
||||||
Foo bar
|
Foo bar
|
||||||
Bar baz bam!
|
Bar baz bam!
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Gathering Facts] *********************************************************",
|
- "TASK [Gathering Facts] *********************************************************"
|
||||||
"ok: [testhost]",
|
- "ok: [testhost]"
|
||||||
"",
|
- ""
|
||||||
"TASK [Create file] *************************************************************",
|
- "TASK [Create file] *************************************************************"
|
||||||
"changed: [testhost]",
|
- "changed: [testhost]"
|
||||||
"",
|
- ""
|
||||||
"TASK [Modify file] *************************************************************",
|
- "TASK [Modify file] *************************************************************"
|
||||||
"changed: [testhost]",
|
- "changed: [testhost]"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ",
|
- "testhost : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Clean up temp file
|
- name: Clean up temp file
|
||||||
|
|
|
@ -25,18 +25,17 @@
|
||||||
- name: Sample task name
|
- name: Sample task name
|
||||||
debug:
|
debug:
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"sample debug msg\"",
|
- " \"msg\": \"sample debug msg\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Set playbook_on_start_msg callback using environment variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -51,19 +50,18 @@
|
||||||
- name: Sample task name
|
- name: Sample task name
|
||||||
debug:
|
debug:
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
expected_output: [
|
expected_output:
|
||||||
"Sample output Sample playbook message",
|
- "Sample output Sample playbook message"
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"sample debug msg\"",
|
- " \"msg\": \"sample debug msg\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Set playbook_on_play_start_msg callback using play variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -80,17 +78,16 @@
|
||||||
- name: Sample task name
|
- name: Sample task name
|
||||||
debug:
|
debug:
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
expected_output: [
|
expected_output:
|
||||||
"Sample output Sample play name",
|
- "Sample output Sample play name"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"sample debug msg\"",
|
- " \"msg\": \"sample debug msg\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Set playbook_on_task_start_msg callback using play variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -106,17 +103,16 @@
|
||||||
- name: Sample task name
|
- name: Sample task name
|
||||||
debug:
|
debug:
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"Sample output Sample task name",
|
- "Sample output Sample task name"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"sample debug msg\"",
|
- " \"msg\": \"sample debug msg\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Set playbook_on_task_start_msg callback using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -132,17 +128,16 @@
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_playbook_on_task_start_msg: Sample output {{ ansible_callback_diy.task.name }}
|
ansible_callback_diy_playbook_on_task_start_msg: Sample output {{ ansible_callback_diy.task.name }}
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"Sample output Sample task name",
|
- "Sample output Sample task name"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"sample debug msg\"",
|
- " \"msg\": \"sample debug msg\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Set runner_on_ok_msg callback using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -158,16 +153,15 @@
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_runner_on_ok_msg: Sample output {{ ansible_callback_diy.result.output.msg }}
|
ansible_callback_diy_runner_on_ok_msg: Sample output {{ ansible_callback_diy.result.output.msg }}
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"Sample output sample debug msg",
|
- "Sample output sample debug msg"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Set runner_on_failed_msg callback using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -185,16 +179,15 @@
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_runner_on_failed_msg: Sample output Sample failure message
|
ansible_callback_diy_runner_on_failed_msg: Sample output Sample failure message
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"Sample output Sample failure message",
|
- "Sample output Sample failure message"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1 "
|
- "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
|
- name: Set runner_on_skipped_msg callback using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -211,16 +204,15 @@
|
||||||
when: false
|
when: false
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_runner_on_skipped_msg: Sample output Skipped {{ ansible_callback_diy.task.name }}
|
ansible_callback_diy_runner_on_skipped_msg: Sample output Skipped {{ ansible_callback_diy.task.name }}
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"Sample output Skipped Sample task name",
|
- "Sample output Skipped Sample task name"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=0 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 "
|
- "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
|
- name: Set runner_item_on_ok_msg callback using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -240,18 +232,17 @@
|
||||||
- sample item 3
|
- sample item 3
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_runner_item_on_ok_msg: Sample output Looping {{ ansible_callback_diy.result.output.msg }}
|
ansible_callback_diy_runner_item_on_ok_msg: Sample output Looping {{ ansible_callback_diy.result.output.msg }}
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"Sample output Looping sample debug msg sample item 1",
|
- "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 2"
|
||||||
"Sample output Looping sample debug msg sample item 3",
|
- "Sample output Looping sample debug msg sample item 3"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Set runner_item_on_failed_msg callback using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -273,28 +264,25 @@
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_runner_item_on_failed_msg: Sample output Looping sample failure message
|
ansible_callback_diy_runner_item_on_failed_msg: Sample output Looping sample failure message
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"ok: [testhost] => (item=sample item 1) => {",
|
- "ok: [testhost] => (item=sample item 1) => {"
|
||||||
" \"msg\": \"sample debug msg sample item 1\"",
|
- " \"msg\": \"sample debug msg sample item 1\""
|
||||||
"}",
|
- "}"
|
||||||
"Sample output Looping sample failure message",
|
- "Sample output Looping sample failure message"
|
||||||
"ok: [testhost] => (item=sample item 3) => {",
|
- "ok: [testhost] => (item=sample item 3) => {"
|
||||||
" \"msg\": \"sample debug msg 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"
|
||||||
# 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\": \"All items completed\"}",
|
- "fatal: [testhost]: FAILED! => {\"msg\": \"One or more items failed\"}"
|
||||||
"fatal: [testhost]: FAILED! => {\"msg\": \"One or more items failed\"}",
|
- "...ignoring"
|
||||||
],
|
- ""
|
||||||
"...ignoring",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"",
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1 "
|
||||||
"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
|
- name: Set runner_item_on_skipped_msg callback using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -315,22 +303,21 @@
|
||||||
when: item != 'sample item 2'
|
when: item != 'sample item 2'
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_runner_item_on_skipped_msg: Sample output Looping Skipped {{ ansible_callback_diy.result.output.item }}
|
ansible_callback_diy_runner_item_on_skipped_msg: Sample output Looping Skipped {{ ansible_callback_diy.result.output.item }}
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"ok: [testhost] => (item=sample item 1) => {",
|
- "ok: [testhost] => (item=sample item 1) => {"
|
||||||
" \"msg\": \"sample debug msg sample item 1\"",
|
- " \"msg\": \"sample debug msg sample item 1\""
|
||||||
"}",
|
- "}"
|
||||||
"Sample output Looping Skipped sample item 2",
|
- "Sample output Looping Skipped sample item 2"
|
||||||
"ok: [testhost] => (item=sample item 3) => {",
|
- "ok: [testhost] => (item=sample item 3) => {"
|
||||||
" \"msg\": \"sample debug msg sample item 3\"",
|
- " \"msg\": \"sample debug msg sample item 3\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Set playbook_on_stats_msg callback using play variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -371,20 +358,19 @@
|
||||||
- name: Sample task name
|
- name: Sample task name
|
||||||
debug:
|
debug:
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"sample debug msg\"",
|
- " \"msg\": \"sample debug msg\""
|
||||||
"}",
|
- "}"
|
||||||
" Sample output stats",
|
- " Sample output stats"
|
||||||
"===============================",
|
- "==============================="
|
||||||
" ok : testhost: 1",
|
- " ok : testhost: 1"
|
||||||
"",
|
- ""
|
||||||
" processed : testhost: 1"
|
- " processed : testhost: 1"
|
||||||
]
|
|
||||||
|
|
||||||
- name: Suppress output on playbook_on_task_start_msg callback using task variable
|
- name: Suppress output on playbook_on_task_start_msg callback using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -400,16 +386,15 @@
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_playbook_on_task_start_msg: ''
|
ansible_callback_diy_playbook_on_task_start_msg: ''
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"sample debug msg\"",
|
- " \"msg\": \"sample debug msg\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Suppress output on runner_on_ok_msg callback using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -425,15 +410,14 @@
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_runner_on_ok_msg: ''
|
ansible_callback_diy_runner_on_ok_msg: ''
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "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
|
- name: Set runner_on_ok_msg_color using task variable
|
||||||
environment:
|
environment:
|
||||||
|
@ -450,13 +434,12 @@
|
||||||
vars:
|
vars:
|
||||||
ansible_callback_diy_runner_on_ok_msg: Sample output {{ ansible_callback_diy.result.output.msg }}
|
ansible_callback_diy_runner_on_ok_msg: Sample output {{ ansible_callback_diy.result.output.msg }}
|
||||||
ansible_callback_diy_runner_on_ok_msg_color: blue
|
ansible_callback_diy_runner_on_ok_msg_color: blue
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"Sample output sample debug msg",
|
- "Sample output sample debug msg"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
|
|
|
@ -24,18 +24,17 @@
|
||||||
- name: Sample task
|
- name: Sample task
|
||||||
debug:
|
debug:
|
||||||
msg: This is a test
|
msg: This is a test
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task] *************************************************************",
|
- "TASK [Sample task] *************************************************************"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"This is a test\"",
|
- " \"msg\": \"This is a test\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
|
|
||||||
- name: community.general.print_task is enabled
|
- name: community.general.print_task is enabled
|
||||||
environment:
|
environment:
|
||||||
|
@ -49,23 +48,22 @@
|
||||||
- name: Sample task
|
- name: Sample task
|
||||||
debug:
|
debug:
|
||||||
msg: This is a test
|
msg: This is a test
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task] *************************************************************",
|
- "TASK [Sample task] *************************************************************"
|
||||||
"",
|
- ""
|
||||||
"- name: Sample task",
|
- "- name: Sample task"
|
||||||
" debug:",
|
- " debug:"
|
||||||
" msg: This is a test",
|
- " msg: This is a test"
|
||||||
"",
|
- ""
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"This is a test\"",
|
- " \"msg\": \"This is a test\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
|
|
||||||
- name: Print with msg parameter on the same line
|
- name: Print with msg parameter on the same line
|
||||||
environment:
|
environment:
|
||||||
|
@ -78,22 +76,21 @@
|
||||||
tasks:
|
tasks:
|
||||||
- name: Sample task
|
- name: Sample task
|
||||||
debug: msg="This is a test"
|
debug: msg="This is a test"
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task] *************************************************************",
|
- "TASK [Sample task] *************************************************************"
|
||||||
"",
|
- ""
|
||||||
"- name: Sample task",
|
- "- name: Sample task"
|
||||||
" debug: msg=\"This is a test\"",
|
- " debug: msg=\"This is a test\""
|
||||||
"",
|
- ""
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"This is a test\"",
|
- " \"msg\": \"This is a test\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
|
|
||||||
- name: Task with additional parameters
|
- name: Task with additional parameters
|
||||||
environment:
|
environment:
|
||||||
|
@ -110,23 +107,22 @@
|
||||||
test_var: "Hello World"
|
test_var: "Hello World"
|
||||||
debug:
|
debug:
|
||||||
var: test_var
|
var: test_var
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task] *************************************************************",
|
- "TASK [Sample task] *************************************************************"
|
||||||
"",
|
- ""
|
||||||
"- name: Sample task",
|
- "- name: Sample task"
|
||||||
" when: true",
|
- " when: true"
|
||||||
" vars:",
|
- " vars:"
|
||||||
" test_var: Hello World",
|
- " test_var: Hello World"
|
||||||
" debug:",
|
- " debug:"
|
||||||
" var: test_var",
|
- " var: test_var"
|
||||||
"",
|
- ""
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"test_var\": \"Hello World\"",
|
- " \"test_var\": \"Hello World\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
|
|
|
@ -26,18 +26,17 @@
|
||||||
- name: Sample task name
|
- name: Sample task name
|
||||||
debug:
|
debug:
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ******************************************************* 15:04:05",
|
- "PLAY [testhost] ******************************************************* 15:04:05"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] *********************************************** 15:04:05",
|
- "TASK [Sample task name] *********************************************** 15:04:05"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"sample debug msg\"",
|
- " \"msg\": \"sample debug msg\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP ************************************************************ 15:04:05",
|
- "PLAY RECAP ************************************************************ 15:04:05"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
|
|
||||||
- name: Enable timestamp in the longer length
|
- name: Enable timestamp in the longer length
|
||||||
environment:
|
environment:
|
||||||
|
@ -52,15 +51,14 @@
|
||||||
- name: Sample task name
|
- name: Sample task name
|
||||||
debug:
|
debug:
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ******************************************** 2006-01-02T15:04:05",
|
- "PLAY [testhost] ******************************************** 2006-01-02T15:04:05"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ************************************ 2006-01-02T15:04:05",
|
- "TASK [Sample task name] ************************************ 2006-01-02T15:04:05"
|
||||||
"ok: [testhost] => {",
|
- "ok: [testhost] => {"
|
||||||
" \"msg\": \"sample debug msg\"",
|
- " \"msg\": \"sample debug msg\""
|
||||||
"}",
|
- "}"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP ************************************************* 2006-01-02T15:04:05",
|
- "PLAY RECAP ************************************************* 2006-01-02T15:04:05"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
|
|
|
@ -25,17 +25,17 @@
|
||||||
- name: Sample task name
|
- name: Sample task name
|
||||||
debug:
|
debug:
|
||||||
msg: sample debug msg
|
msg: sample debug msg
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Sample task name] ********************************************************",
|
- "TASK [Sample task name] ********************************************************"
|
||||||
"ok: [testhost] => ",
|
- "ok: [testhost] => "
|
||||||
" msg: sample debug msg",
|
- " msg: sample debug msg"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
- name: Test umlauts in multiline
|
- name: Test umlauts in multiline
|
||||||
environment:
|
environment:
|
||||||
ANSIBLE_NOCOLOR: 'true'
|
ANSIBLE_NOCOLOR: 'true'
|
||||||
|
@ -48,20 +48,20 @@
|
||||||
- name: Umlaut output
|
- name: Umlaut output
|
||||||
debug:
|
debug:
|
||||||
msg: "äöü\néêè\nßï☺"
|
msg: "äöü\néêè\nßï☺"
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Umlaut output] ***********************************************************",
|
- "TASK [Umlaut output] ***********************************************************"
|
||||||
"ok: [testhost] => ",
|
- "ok: [testhost] => "
|
||||||
" msg: |-",
|
- " msg: |-"
|
||||||
" äöü",
|
- " äöü"
|
||||||
" éêè",
|
- " éêè"
|
||||||
" ßï☺",
|
- " ßï☺"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
- name: Test to_yaml
|
- name: Test to_yaml
|
||||||
environment:
|
environment:
|
||||||
ANSIBLE_NOCOLOR: 'true'
|
ANSIBLE_NOCOLOR: 'true'
|
||||||
|
@ -79,21 +79,20 @@
|
||||||
- name: Test to_yaml
|
- name: Test to_yaml
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ data | to_yaml }}"
|
msg: "{{ data | to_yaml }}"
|
||||||
expected_output: [
|
expected_output:
|
||||||
"",
|
- ""
|
||||||
"PLAY [testhost] ****************************************************************",
|
- "PLAY [testhost] ****************************************************************"
|
||||||
"",
|
- ""
|
||||||
"TASK [Test to_yaml] ************************************************************",
|
- "TASK [Test to_yaml] ************************************************************"
|
||||||
"ok: [testhost] => ",
|
- "ok: [testhost] => "
|
||||||
" msg: |-",
|
- " msg: |-"
|
||||||
" 'line 1",
|
- " 'line 1"
|
||||||
" ",
|
- " "
|
||||||
" line 2",
|
- " line 2"
|
||||||
" ",
|
- " "
|
||||||
" line 3",
|
- " line 3"
|
||||||
" ",
|
- " "
|
||||||
" '",
|
- " '"
|
||||||
"",
|
- ""
|
||||||
"PLAY RECAP *********************************************************************",
|
- "PLAY RECAP *********************************************************************"
|
||||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
- "testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||||
]
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
copy:
|
copy:
|
||||||
content: ""
|
content: ""
|
||||||
dest: "{{ remote_tmp }}/test_empty.txt"
|
dest: "{{ remote_tmp }}/test_empty.txt"
|
||||||
force: no
|
force: false
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- name: assert file without content exists
|
- name: assert file without content exists
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
- result.data.Value == 'somevalue'
|
- result.data.Value == 'somevalue'
|
||||||
|
|
||||||
#- name: Test the lookup
|
# - name: Test the lookup
|
||||||
# assert:
|
# assert:
|
||||||
# that:
|
# that:
|
||||||
# - lookup('community.general.consul_kv', 'somekey', token=consul_management_token) == 'somevalue'
|
# - lookup('community.general.consul_kv', 'somekey', token=consul_management_token) == 'somevalue'
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
consul_role:
|
consul_role:
|
||||||
name: foo-role-with-policy
|
name: foo-role-with-policy
|
||||||
description: "Testing updating description"
|
description: "Testing updating description"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
datacenters:
|
datacenters:
|
||||||
- dc2
|
- dc2
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
name: role-with-service-identity
|
name: role-with-service-identity
|
||||||
node_identities: []
|
node_identities: []
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
discord_id: 000
|
discord_id: 0
|
||||||
discord_token: xxx
|
discord_token: xxx
|
||||||
|
|
|
@ -177,7 +177,6 @@
|
||||||
- filesize_stat_basic_14.stat.checksum == filesize_test_checksum
|
- filesize_stat_basic_14.stat.checksum == filesize_test_checksum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Expand the file with 1 byte (57001B) (check mode)
|
- name: Expand the file with 1 byte (57001B) (check mode)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
@ -253,7 +252,6 @@
|
||||||
- filesize_stat_basic_24.stat.checksum != filesize_test_checksum
|
- filesize_stat_basic_24.stat.checksum != filesize_test_checksum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Expand the file up to 2 MiB (2*1024*1024 bytes) (check mode)
|
- name: Expand the file up to 2 MiB (2*1024*1024 bytes) (check mode)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
@ -327,7 +325,6 @@
|
||||||
- filesize_stat_basic_34.stat.size == 2*1024**2
|
- filesize_stat_basic_34.stat.size == 2*1024**2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Truncate the file to 57kB (57000B) (check mode)
|
- name: Truncate the file to 57kB (57000B) (check mode)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
@ -404,7 +401,6 @@
|
||||||
- filesize_stat_basic_44.stat.checksum == filesize_test_checksum
|
- filesize_stat_basic_44.stat.checksum == filesize_test_checksum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Remove test file
|
- name: Remove test file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
|
|
@ -89,7 +89,6 @@
|
||||||
- filesize_stat_float_04.stat.size == 512512
|
- filesize_stat_float_04.stat.size == 512512
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Create a file with a size of 512.513kB (check mode)
|
- name: Create a file with a size of 512.513kB (check mode)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
@ -166,7 +165,6 @@
|
||||||
- filesize_stat_float_14.stat.size == 512513
|
- filesize_stat_float_14.stat.size == 512513
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Create a file with a size of 4.004MB (check mode)
|
- name: Create a file with a size of 4.004MB (check mode)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
|
|
@ -119,7 +119,6 @@
|
||||||
- filesize_stat_sparse_06.stat.size == 2*1000**4
|
- filesize_stat_sparse_06.stat.size == 2*1000**4
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Change sparse file size to 2TiB (check mode)
|
- name: Change sparse file size to 2TiB (check mode)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
@ -198,7 +197,6 @@
|
||||||
- filesize_stat_sparse_14.stat.size == 2199023255552
|
- filesize_stat_sparse_14.stat.size == 2199023255552
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Change sparse file size to 2.321TB (check mode)
|
- name: Change sparse file size to 2.321TB (check mode)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
@ -279,7 +277,6 @@
|
||||||
- filesize_stat_sparse_24.stat.size == 2321000000000
|
- filesize_stat_sparse_24.stat.size == 2321000000000
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Remove test file
|
- name: Remove test file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
follow: false
|
follow: false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Create a file with a size of 512 kB (512000 bytes) (check mode)
|
- name: Create a file with a size of 512 kB (512000 bytes) (check mode)
|
||||||
community.general.filesize:
|
community.general.filesize:
|
||||||
path: "{{ filesize_testlink }}"
|
path: "{{ filesize_testlink }}"
|
||||||
|
@ -85,7 +84,6 @@
|
||||||
- filesize_test_symlink_04.path != filesize_testlink
|
- filesize_test_symlink_04.path != filesize_testlink
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Remove test file
|
- name: Remove test file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ filesize_testfile }}"
|
path: "{{ filesize_testfile }}"
|
||||||
|
|
|
@ -175,7 +175,7 @@
|
||||||
quiet: '{{ quiet_test | default(true) | bool }}'
|
quiet: '{{ quiet_test | default(true) | bool }}'
|
||||||
vars:
|
vars:
|
||||||
alias: {"AnsibleUnicode": "str", "_AnsibleTaggedStr": "str", "_AnsibleTaggedInt": "int", "_AnsibleTaggedFloat": "float"}
|
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) }}'
|
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
|
||||||
dtype: dict[str, bool|dict|float|int|list|str]
|
dtype: dict[str, bool|dict|float|int|list|str]
|
||||||
|
|
||||||
|
@ -187,6 +187,6 @@
|
||||||
quiet: '{{ quiet_test | default(true) | bool }}'
|
quiet: '{{ quiet_test | default(true) | bool }}'
|
||||||
vars:
|
vars:
|
||||||
alias: {"AnsibleUnicode": "str", "_AnsibleTaggedStr": "str", "_AnsibleTaggedInt": "int", "_AnsibleTaggedFloat": "float"}
|
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) }}'
|
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
|
||||||
dtype: list[bool|dict|float|int|list|str]
|
dtype: list[bool|dict|float|int|list|str]
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
gandi_livedns_domain_name: "ansible-tests.org"
|
gandi_livedns_domain_name: "ansible-tests.org"
|
||||||
gandi_livedns_record_items:
|
gandi_livedns_record_items:
|
||||||
|
|
||||||
# Single A record
|
# Single A record
|
||||||
- record: test-www
|
- record: test-www
|
||||||
type: A
|
type: A
|
||||||
values:
|
values:
|
||||||
- 10.10.10.10
|
- 10.10.10.10
|
||||||
|
@ -16,8 +16,8 @@ gandi_livedns_record_items:
|
||||||
- 10.10.10.11
|
- 10.10.10.11
|
||||||
update_ttl: 800
|
update_ttl: 800
|
||||||
|
|
||||||
# Multiple A records
|
# Multiple A records
|
||||||
- record: test-www-multiple
|
- record: test-www-multiple
|
||||||
type: A
|
type: A
|
||||||
ttl: 3600
|
ttl: 3600
|
||||||
values:
|
values:
|
||||||
|
@ -27,8 +27,8 @@ gandi_livedns_record_items:
|
||||||
- 10.10.11.11
|
- 10.10.11.11
|
||||||
- 10.10.11.13
|
- 10.10.11.13
|
||||||
|
|
||||||
# CNAME
|
# CNAME
|
||||||
- record: test-cname
|
- record: test-cname
|
||||||
type: CNAME
|
type: CNAME
|
||||||
ttl: 10800
|
ttl: 10800
|
||||||
values:
|
values:
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
#- import_tasks: setup_no_value.yml
|
# - import_tasks: setup_no_value.yml
|
||||||
|
|
||||||
- name: setting value
|
- name: setting value
|
||||||
git_config:
|
git_config:
|
||||||
|
|
|
@ -15,18 +15,27 @@
|
||||||
- block:
|
- block:
|
||||||
- include_tasks: get_simple_value.yml
|
- include_tasks: get_simple_value.yml
|
||||||
loop:
|
loop:
|
||||||
- { import_file: setup_global.yml, git_scope: 'global' }
|
- import_file: setup_global.yml
|
||||||
- { import_file: setup_file.yml, git_scope: 'file', git_file: "{{ remote_tmp_dir }}/gitconfig_file" }
|
git_scope: 'global'
|
||||||
|
- import_file: setup_file.yml
|
||||||
|
git_scope: 'file'
|
||||||
|
git_file: "{{ remote_tmp_dir }}/gitconfig_file"
|
||||||
|
|
||||||
- include_tasks: get_multi_value.yml
|
- include_tasks: get_multi_value.yml
|
||||||
loop:
|
loop:
|
||||||
- { import_file: setup_global.yml, git_scope: 'global' }
|
- import_file: setup_global.yml
|
||||||
- { import_file: setup_file.yml, git_scope: 'file', git_file: "{{ remote_tmp_dir }}/gitconfig_file" }
|
git_scope: 'global'
|
||||||
|
- import_file: setup_file.yml
|
||||||
|
git_scope: 'file'
|
||||||
|
git_file: "{{ remote_tmp_dir }}/gitconfig_file"
|
||||||
|
|
||||||
- include_tasks: get_all_values.yml
|
- include_tasks: get_all_values.yml
|
||||||
loop:
|
loop:
|
||||||
- { import_file: setup_global.yml, git_scope: 'global' }
|
- import_file: setup_global.yml
|
||||||
- { import_file: setup_file.yml, git_scope: 'file', git_file: "{{ remote_tmp_dir }}/gitconfig_file" }
|
git_scope: 'global'
|
||||||
|
- import_file: setup_file.yml
|
||||||
|
git_scope: 'file'
|
||||||
|
git_file: "{{ remote_tmp_dir }}/gitconfig_file"
|
||||||
|
|
||||||
- include_tasks: error_handling.yml
|
- include_tasks: error_handling.yml
|
||||||
when: git_installed is succeeded and git_version.stdout is version(git_version_supporting_includes, ">=")
|
when: git_installed is succeeded and git_version.stdout is version(git_version_supporting_includes, ">=")
|
||||||
|
|
|
@ -438,7 +438,7 @@
|
||||||
- gitlab_instance_variable_state.instance_variable.removed|length == 0
|
- gitlab_instance_variable_state.instance_variable.removed|length == 0
|
||||||
- gitlab_instance_variable_state.instance_variable.updated|length == 0
|
- gitlab_instance_variable_state.instance_variable.updated|length == 0
|
||||||
# VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
|
# 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
|
- name: change variable_type attribute
|
||||||
gitlab_instance_variable:
|
gitlab_instance_variable:
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
###
|
###
|
||||||
### Group label
|
### Group label
|
||||||
###
|
###
|
||||||
|
|
||||||
- name: Create {{ gitlab_project_group }}
|
- name: Create {{ gitlab_project_group }}
|
||||||
gitlab_group:
|
gitlab_group:
|
||||||
|
@ -217,9 +217,9 @@
|
||||||
- gitlab_group_label_create_purging.labels.added[0] == "{{ gitlab_second_label }}"
|
- gitlab_group_label_create_purging.labels.added[0] == "{{ gitlab_second_label }}"
|
||||||
- gitlab_group_label_create_purging.labels.removed[0] == "{{ gitlab_first_label }}"
|
- gitlab_group_label_create_purging.labels.removed[0] == "{{ gitlab_first_label }}"
|
||||||
|
|
||||||
###
|
###
|
||||||
### Project label
|
### Project label
|
||||||
###
|
###
|
||||||
|
|
||||||
- name: Create {{ gitlab_project_name }}
|
- name: Create {{ gitlab_project_name }}
|
||||||
gitlab_project:
|
gitlab_project:
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
state_filter: "opened"
|
state_filter: "opened"
|
||||||
assignee_ids: ""
|
assignee_ids: ""
|
||||||
reviewer_ids: ""
|
reviewer_ids: ""
|
||||||
remove_source_branch: True
|
remove_source_branch: true
|
||||||
state: present
|
state: present
|
||||||
register: gitlab_merge_request_create
|
register: gitlab_merge_request_create
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
state_filter: "opened"
|
state_filter: "opened"
|
||||||
assignee_ids: ""
|
assignee_ids: ""
|
||||||
reviewer_ids: ""
|
reviewer_ids: ""
|
||||||
remove_source_branch: True
|
remove_source_branch: true
|
||||||
state: present
|
state: present
|
||||||
register: gitlab_merge_request_create_idempotence
|
register: gitlab_merge_request_create_idempotence
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
state_filter: "opened"
|
state_filter: "opened"
|
||||||
assignee_ids: "{{ gitlab_assignee_ids }}"
|
assignee_ids: "{{ gitlab_assignee_ids }}"
|
||||||
reviewer_ids: ""
|
reviewer_ids: ""
|
||||||
remove_source_branch: True
|
remove_source_branch: true
|
||||||
state: present
|
state: present
|
||||||
register: gitlab_merge_request_udpate
|
register: gitlab_merge_request_udpate
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
###
|
###
|
||||||
### Group milestone
|
### Group milestone
|
||||||
###
|
###
|
||||||
- name: Create {{ gitlab_project_group }}
|
- name: Create {{ gitlab_project_group }}
|
||||||
gitlab_group:
|
gitlab_group:
|
||||||
api_url: "{{ gitlab_host }}"
|
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.added[0] == "{{ gitlab_second_milestone }}"
|
||||||
- gitlab_group_milestone_create_purging.milestones.removed[0] == "{{ gitlab_first_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
|
- name: Purge all group milestones for project milestone test - cannot exist with same name
|
||||||
gitlab_milestone:
|
gitlab_milestone:
|
||||||
api_url: "{{ gitlab_host }}"
|
api_url: "{{ gitlab_host }}"
|
||||||
|
|
|
@ -479,7 +479,7 @@
|
||||||
- gitlab_project_variable_state.project_variable.removed|length == 0
|
- gitlab_project_variable_state.project_variable.removed|length == 0
|
||||||
- gitlab_project_variable_state.project_variable.updated|length == 0
|
- gitlab_project_variable_state.project_variable.updated|length == 0
|
||||||
# VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
|
# 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
|
- name: change variable_type attribute
|
||||||
gitlab_project_variable:
|
gitlab_project_variable:
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
path: "{{ brew_which.stdout }}"
|
path: "{{ brew_which.stdout }}"
|
||||||
register: brew_stat
|
register: brew_stat
|
||||||
|
|
||||||
#- name: Use ignored-pinned option while upgrading all
|
# - name: Use ignored-pinned option while upgrading all
|
||||||
# homebrew:
|
# homebrew:
|
||||||
# upgrade_all: true
|
# upgrade_all: true
|
||||||
# upgrade_options: ignore-pinned
|
# upgrade_options: ignore-pinned
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
# environment:
|
# environment:
|
||||||
# HOMEBREW_NO_AUTO_UPDATE: True
|
# HOMEBREW_NO_AUTO_UPDATE: True
|
||||||
|
|
||||||
#- assert:
|
# - assert:
|
||||||
# that:
|
# that:
|
||||||
# - upgrade_option_result.changed
|
# - upgrade_option_result.changed
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
path: "{{ brew_which.stdout }}"
|
path: "{{ brew_which.stdout }}"
|
||||||
register: brew_stat
|
register: brew_stat
|
||||||
|
|
||||||
#- name: Use ignored-pinned option while upgrading all
|
# - name: Use ignored-pinned option while upgrading all
|
||||||
# homebrew:
|
# homebrew:
|
||||||
# upgrade_all: true
|
# upgrade_all: true
|
||||||
# upgrade_options: ignore-pinned
|
# upgrade_options: ignore-pinned
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
# environment:
|
# environment:
|
||||||
# HOMEBREW_NO_AUTO_UPDATE: True
|
# HOMEBREW_NO_AUTO_UPDATE: True
|
||||||
|
|
||||||
#- assert:
|
# - assert:
|
||||||
# that:
|
# that:
|
||||||
# - upgrade_option_result.changed
|
# - upgrade_option_result.changed
|
||||||
|
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Find brew binary
|
- name: Find brew binary
|
||||||
command: which brew
|
command: which brew
|
||||||
register: brew_which
|
register: brew_which
|
||||||
when: ansible_distribution in ['MacOSX']
|
when: ansible_distribution in ['MacOSX']
|
||||||
|
|
||||||
- name: Get owner of brew binary
|
- name: Get owner of brew binary
|
||||||
stat:
|
stat:
|
||||||
path: "{{ brew_which.stdout }}"
|
path: "{{ brew_which.stdout }}"
|
||||||
register: brew_stat
|
register: brew_stat
|
||||||
when: ansible_distribution in ['MacOSX']
|
when: ansible_distribution in ['MacOSX']
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Install cask
|
- name: Install cask
|
||||||
homebrew_cask:
|
homebrew_cask:
|
||||||
name: "{{ cask }}"
|
name: "{{ cask }}"
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
root_volume:
|
root_volume:
|
||||||
volume_type: "SAS"
|
volume_type: "SAS"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a instance (check mode)
|
- name: create a instance (check mode)
|
||||||
hwc_ecs_instance:
|
hwc_ecs_instance:
|
||||||
data_volumes:
|
data_volumes:
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a instance
|
- name: create a instance
|
||||||
hwc_ecs_instance:
|
hwc_ecs_instance:
|
||||||
data_volumes:
|
data_volumes:
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a instance (idemponent)
|
- name: create a instance (idemponent)
|
||||||
hwc_ecs_instance:
|
hwc_ecs_instance:
|
||||||
data_volumes:
|
data_volumes:
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a instance (check mode)
|
- name: delete a instance (check mode)
|
||||||
hwc_ecs_instance:
|
hwc_ecs_instance:
|
||||||
data_volumes:
|
data_volumes:
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a instance
|
- name: delete a instance
|
||||||
hwc_ecs_instance:
|
hwc_ecs_instance:
|
||||||
data_volumes:
|
data_volumes:
|
||||||
|
@ -228,7 +228,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a instance (idemponent)
|
- name: delete a instance (idemponent)
|
||||||
hwc_ecs_instance:
|
hwc_ecs_instance:
|
||||||
data_volumes:
|
data_volumes:
|
||||||
|
@ -283,7 +283,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Post-test teardown
|
# Post-test teardown
|
||||||
- name: delete a disk
|
- name: delete a disk
|
||||||
hwc_evs_disk:
|
hwc_evs_disk:
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
volume_type: "SATA"
|
volume_type: "SATA"
|
||||||
size: 10
|
size: 10
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a disk
|
- name: create a disk
|
||||||
hwc_evs_disk:
|
hwc_evs_disk:
|
||||||
availability_zone: "cn-north-1a"
|
availability_zone: "cn-north-1a"
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a disk (check mode)
|
- name: delete a disk (check mode)
|
||||||
hwc_evs_disk:
|
hwc_evs_disk:
|
||||||
availability_zone: "cn-north-1a"
|
availability_zone: "cn-north-1a"
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a disk
|
- name: delete a disk
|
||||||
hwc_evs_disk:
|
hwc_evs_disk:
|
||||||
availability_zone: "cn-north-1a"
|
availability_zone: "cn-north-1a"
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
name: "vpc_1"
|
name: "vpc_1"
|
||||||
cidr: "192.168.100.0/24"
|
cidr: "192.168.100.0/24"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a vpc
|
- name: create a vpc
|
||||||
hwc_network_vpc:
|
hwc_network_vpc:
|
||||||
identity_endpoint: "{{ identity_endpoint }}"
|
identity_endpoint: "{{ identity_endpoint }}"
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a vpc
|
- name: delete a vpc
|
||||||
hwc_network_vpc:
|
hwc_network_vpc:
|
||||||
identity_endpoint: "{{ identity_endpoint }}"
|
identity_endpoint: "{{ identity_endpoint }}"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
region: "{{ region }}"
|
region: "{{ region }}"
|
||||||
name: "ansible_smn_topic_test"
|
name: "ansible_smn_topic_test"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a smn topic
|
- name: create a smn topic
|
||||||
hwc_smn_topic:
|
hwc_smn_topic:
|
||||||
identity_endpoint: "{{ identity_endpoint }}"
|
identity_endpoint: "{{ identity_endpoint }}"
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a smn topic
|
- name: delete a smn topic
|
||||||
hwc_smn_topic:
|
hwc_smn_topic:
|
||||||
identity_endpoint: "{{ identity_endpoint }}"
|
identity_endpoint: "{{ identity_endpoint }}"
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
size: 1
|
size: 1
|
||||||
port_id: "{{ port.id }}"
|
port_id: "{{ port.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a eip (check mode)
|
- name: create a eip (check mode)
|
||||||
hwc_vpc_eip:
|
hwc_vpc_eip:
|
||||||
type: "5_bgp"
|
type: "5_bgp"
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a eip
|
- name: create a eip
|
||||||
hwc_vpc_eip:
|
hwc_vpc_eip:
|
||||||
type: "5_bgp"
|
type: "5_bgp"
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a eip (idemponent)
|
- name: create a eip (idemponent)
|
||||||
hwc_vpc_eip:
|
hwc_vpc_eip:
|
||||||
type: "5_bgp"
|
type: "5_bgp"
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a eip (check mode)
|
- name: delete a eip (check mode)
|
||||||
hwc_vpc_eip:
|
hwc_vpc_eip:
|
||||||
type: "5_bgp"
|
type: "5_bgp"
|
||||||
|
@ -118,7 +118,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a eip
|
- name: delete a eip
|
||||||
hwc_vpc_eip:
|
hwc_vpc_eip:
|
||||||
type: "5_bgp"
|
type: "5_bgp"
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a eip (idemponent)
|
- name: delete a eip (idemponent)
|
||||||
hwc_vpc_eip:
|
hwc_vpc_eip:
|
||||||
type: "5_bgp"
|
type: "5_bgp"
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Post-test teardown
|
# Post-test teardown
|
||||||
- name: delete a port
|
- name: delete a port
|
||||||
hwc_vpc_port:
|
hwc_vpc_port:
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
peering_vpc:
|
peering_vpc:
|
||||||
vpc_id: "{{ vpc2.id }}"
|
vpc_id: "{{ vpc2.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a peering connect (check mode)
|
- name: create a peering connect (check mode)
|
||||||
hwc_vpc_peering_connect:
|
hwc_vpc_peering_connect:
|
||||||
local_vpc_id: "{{ vpc1.id }}"
|
local_vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
that:
|
that:
|
||||||
- not result.id
|
- not result.id
|
||||||
- result.changed
|
- result.changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a peering connect
|
- name: create a peering connect
|
||||||
hwc_vpc_peering_connect:
|
hwc_vpc_peering_connect:
|
||||||
local_vpc_id: "{{ vpc1.id }}"
|
local_vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a peering connect (idemponent)
|
- name: create a peering connect (idemponent)
|
||||||
hwc_vpc_peering_connect:
|
hwc_vpc_peering_connect:
|
||||||
local_vpc_id: "{{ vpc1.id }}"
|
local_vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a peering connect (check mode)
|
- name: delete a peering connect (check mode)
|
||||||
hwc_vpc_peering_connect:
|
hwc_vpc_peering_connect:
|
||||||
local_vpc_id: "{{ vpc1.id }}"
|
local_vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a peering connect
|
- name: delete a peering connect
|
||||||
hwc_vpc_peering_connect:
|
hwc_vpc_peering_connect:
|
||||||
local_vpc_id: "{{ vpc1.id }}"
|
local_vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a peering connect (idemponent)
|
- name: delete a peering connect (idemponent)
|
||||||
hwc_vpc_peering_connect:
|
hwc_vpc_peering_connect:
|
||||||
local_vpc_id: "{{ vpc1.id }}"
|
local_vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Post-test teardown
|
# Post-test teardown
|
||||||
- name: delete a vpc
|
- name: delete a vpc
|
||||||
hwc_network_vpc:
|
hwc_network_vpc:
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
ip_address: "192.168.100.33"
|
ip_address: "192.168.100.33"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a port (check mode)
|
- name: create a port (check mode)
|
||||||
hwc_vpc_port:
|
hwc_vpc_port:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a port
|
- name: create a port
|
||||||
hwc_vpc_port:
|
hwc_vpc_port:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a port (idemponent)
|
- name: create a port (idemponent)
|
||||||
hwc_vpc_port:
|
hwc_vpc_port:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a port (check mode)
|
- name: delete a port (check mode)
|
||||||
hwc_vpc_port:
|
hwc_vpc_port:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a port
|
- name: delete a port
|
||||||
hwc_vpc_port:
|
hwc_vpc_port:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a port (idemponent)
|
- name: delete a port (idemponent)
|
||||||
hwc_vpc_port:
|
hwc_vpc_port:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Post-test teardown
|
# Post-test teardown
|
||||||
- name: delete a subnet
|
- name: delete a subnet
|
||||||
hwc_vpc_subnet:
|
hwc_vpc_subnet:
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
ip_address: "192.168.100.33"
|
ip_address: "192.168.100.33"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a private ip (check mode)
|
- name: create a private ip (check mode)
|
||||||
hwc_vpc_private_ip:
|
hwc_vpc_private_ip:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a private ip
|
- name: create a private ip
|
||||||
hwc_vpc_private_ip:
|
hwc_vpc_private_ip:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a private ip (idemponent)
|
- name: create a private ip (idemponent)
|
||||||
hwc_vpc_private_ip:
|
hwc_vpc_private_ip:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a private ip (check mode)
|
- name: delete a private ip (check mode)
|
||||||
hwc_vpc_private_ip:
|
hwc_vpc_private_ip:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a private ip
|
- name: delete a private ip
|
||||||
hwc_vpc_private_ip:
|
hwc_vpc_private_ip:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a private ip (idemponent)
|
- name: delete a private ip (idemponent)
|
||||||
hwc_vpc_private_ip:
|
hwc_vpc_private_ip:
|
||||||
subnet_id: "{{ subnet.id }}"
|
subnet_id: "{{ subnet.id }}"
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Post-test teardown
|
# Post-test teardown
|
||||||
- name: delete a subnet
|
- name: delete a subnet
|
||||||
hwc_vpc_subnet:
|
hwc_vpc_subnet:
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
destination: "192.168.0.0/16"
|
destination: "192.168.0.0/16"
|
||||||
next_hop: "{{ connect.id }}"
|
next_hop: "{{ connect.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a route (check mode)
|
- name: create a route (check mode)
|
||||||
hwc_vpc_route:
|
hwc_vpc_route:
|
||||||
vpc_id: "{{ vpc1.id }}"
|
vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
that:
|
that:
|
||||||
- not result.id
|
- not result.id
|
||||||
- result.changed
|
- result.changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a route
|
- name: create a route
|
||||||
hwc_vpc_route:
|
hwc_vpc_route:
|
||||||
vpc_id: "{{ vpc1.id }}"
|
vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a route (check mode)
|
- name: delete a route (check mode)
|
||||||
hwc_vpc_route:
|
hwc_vpc_route:
|
||||||
vpc_id: "{{ vpc1.id }}"
|
vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
next_hop: "{{ connect.id }}"
|
next_hop: "{{ connect.id }}"
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: true
|
check_mode: true
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a route
|
- name: delete a route
|
||||||
hwc_vpc_route:
|
hwc_vpc_route:
|
||||||
vpc_id: "{{ vpc1.id }}"
|
vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a (idemponent)
|
- name: delete a (idemponent)
|
||||||
hwc_vpc_route:
|
hwc_vpc_route:
|
||||||
vpc_id: "{{ vpc1.id }}"
|
vpc_id: "{{ vpc1.id }}"
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Post-test teardown
|
# Post-test teardown
|
||||||
- name: delete a peering connect
|
- name: delete a peering connect
|
||||||
hwc_vpc_peering_connect:
|
hwc_vpc_peering_connect:
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
name: "ansible_network_security_group_test"
|
name: "ansible_network_security_group_test"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a security group (check mode)
|
- name: create a security group (check mode)
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
name: "ansible_network_security_group_test"
|
name: "ansible_network_security_group_test"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
that:
|
that:
|
||||||
- not result.id
|
- not result.id
|
||||||
- result.changed
|
- result.changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a security group
|
- name: create a security group
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
name: "ansible_network_security_group_test"
|
name: "ansible_network_security_group_test"
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a security group (idemponent)
|
- name: create a security group (idemponent)
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
name: "ansible_network_security_group_test"
|
name: "ansible_network_security_group_test"
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a security group (check mode)
|
- name: delete a security group (check mode)
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
name: "ansible_network_security_group_test"
|
name: "ansible_network_security_group_test"
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a security group
|
- name: delete a security group
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
name: "ansible_network_security_group_test"
|
name: "ansible_network_security_group_test"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
port_range_min: 22
|
port_range_min: 22
|
||||||
remote_ip_prefix: "0.0.0.0/0"
|
remote_ip_prefix: "0.0.0.0/0"
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a security group rule (check mode)
|
- name: create a security group rule (check mode)
|
||||||
hwc_vpc_security_group_rule:
|
hwc_vpc_security_group_rule:
|
||||||
direction: "ingress"
|
direction: "ingress"
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
that:
|
that:
|
||||||
- not result.id
|
- not result.id
|
||||||
- result.changed
|
- result.changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a security group rule
|
- name: create a security group rule
|
||||||
hwc_vpc_security_group_rule:
|
hwc_vpc_security_group_rule:
|
||||||
direction: "ingress"
|
direction: "ingress"
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: create a security group rule (idemponent)
|
- name: create a security group rule (idemponent)
|
||||||
hwc_vpc_security_group_rule:
|
hwc_vpc_security_group_rule:
|
||||||
direction: "ingress"
|
direction: "ingress"
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a security group rule (check mode)
|
- name: delete a security group rule (check mode)
|
||||||
hwc_vpc_security_group_rule:
|
hwc_vpc_security_group_rule:
|
||||||
direction: "ingress"
|
direction: "ingress"
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a security group rule
|
- name: delete a security group rule
|
||||||
hwc_vpc_security_group_rule:
|
hwc_vpc_security_group_rule:
|
||||||
direction: "ingress"
|
direction: "ingress"
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
- name: delete a security group rule (idemponent)
|
- name: delete a security group rule (idemponent)
|
||||||
hwc_vpc_security_group_rule:
|
hwc_vpc_security_group_rule:
|
||||||
direction: "ingress"
|
direction: "ingress"
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Post-test teardown
|
# Post-test teardown
|
||||||
- name: delete a security group
|
- name: delete a security group
|
||||||
hwc_vpc_security_group:
|
hwc_vpc_security_group:
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
name: "ansible_network_subnet_test"
|
name: "ansible_network_subnet_test"
|
||||||
dhcp_enable: true
|
dhcp_enable: true
|
||||||
state: absent
|
state: absent
|
||||||
#----------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
- name: create a subnet (check mode)
|
- name: create a subnet (check mode)
|
||||||
hwc_vpc_subnet:
|
hwc_vpc_subnet:
|
||||||
vpc_id: "{{ vpc.id }}"
|
vpc_id: "{{ vpc.id }}"
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
that:
|
that:
|
||||||
- not result.id
|
- not result.id
|
||||||
- result.changed
|
- result.changed
|
||||||
#----------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
- name: create a subnet
|
- name: create a subnet
|
||||||
hwc_vpc_subnet:
|
hwc_vpc_subnet:
|
||||||
vpc_id: "{{ vpc.id }}"
|
vpc_id: "{{ vpc.id }}"
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
result is changed
|
result is changed
|
||||||
#----------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
- name: create a subnet (idemponent)
|
- name: create a subnet (idemponent)
|
||||||
hwc_vpc_subnet:
|
hwc_vpc_subnet:
|
||||||
vpc_id: "{{ vpc.id }}"
|
vpc_id: "{{ vpc.id }}"
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#----------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
- name: delete a subnet (check mode)
|
- name: delete a subnet (check mode)
|
||||||
hwc_vpc_subnet:
|
hwc_vpc_subnet:
|
||||||
vpc_id: "{{ vpc.id }}"
|
vpc_id: "{{ vpc.id }}"
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
- name: delete a subnet
|
- name: delete a subnet
|
||||||
hwc_vpc_subnet:
|
hwc_vpc_subnet:
|
||||||
vpc_id: "{{ vpc.id }}"
|
vpc_id: "{{ vpc.id }}"
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
#----------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
- name: delete a subnet (idemponent)
|
- name: delete a subnet (idemponent)
|
||||||
hwc_vpc_subnet:
|
hwc_vpc_subnet:
|
||||||
vpc_id: "{{ vpc.id }}"
|
vpc_id: "{{ vpc.id }}"
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
that:
|
that:
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result is not changed
|
- result is not changed
|
||||||
#---------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Post-test teardown
|
# Post-test teardown
|
||||||
- name: delete a vpc
|
- name: delete a vpc
|
||||||
hwc_network_vpc:
|
hwc_network_vpc:
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "trigger error about missing param 'state'"
|
- name: "trigger error about missing param 'state'"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: foobar
|
path: foobar
|
||||||
|
@ -47,7 +46,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "trigger error about missing param 'path'"
|
- name: "trigger error about missing param 'path'"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
state: saved
|
state: saved
|
||||||
|
@ -62,7 +60,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "trigger error about invalid value for param 'state'"
|
- name: "trigger error about invalid value for param 'state'"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: foobar
|
path: foobar
|
||||||
|
@ -99,7 +96,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "save state (must report a change)"
|
- name: "save state (must report a change)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -114,7 +110,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "save state (idempotency, must NOT report a change)"
|
- name: "save state (idempotency, must NOT report a change)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -129,7 +124,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "save state (check_mode, must NOT report a change)"
|
- name: "save state (check_mode, must NOT report a change)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -145,7 +139,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# We begin with 'state=restored' by restoring the current state on itself.
|
# 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
|
# This at least ensures the file produced with state=saved is suitable for
|
||||||
# state=restored.
|
# state=restored.
|
||||||
|
@ -176,7 +169,6 @@
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "state=restored changed=false"
|
- name: "state=restored changed=false"
|
||||||
block:
|
block:
|
||||||
- name: "restore state (must NOT report a change, warning about rollback & async)"
|
- name: "restore state (must NOT report a change, warning about rollback & async)"
|
||||||
|
@ -202,14 +194,12 @@
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "change iptables state (iptables)"
|
- name: "change iptables state (iptables)"
|
||||||
iptables:
|
iptables:
|
||||||
chain: OUTPUT
|
chain: OUTPUT
|
||||||
jump: ACCEPT
|
jump: ACCEPT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "state=restored changed=true"
|
- name: "state=restored changed=true"
|
||||||
block:
|
block:
|
||||||
- name: "restore state (check_mode, must report a change)"
|
- name: "restore state (check_mode, must report a change)"
|
||||||
|
@ -236,7 +226,6 @@
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "state=restored changed=true"
|
- name: "state=restored changed=true"
|
||||||
block:
|
block:
|
||||||
- name: "restore state (must report a change, async, no warning)"
|
- name: "restore state (must report a change, async, no warning)"
|
||||||
|
@ -265,7 +254,6 @@
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "state=restored changed=false"
|
- name: "state=restored changed=false"
|
||||||
block:
|
block:
|
||||||
- name: "restore state (must NOT report a change, async, no warning)"
|
- name: "restore state (must NOT report a change, async, no warning)"
|
||||||
|
@ -293,7 +281,6 @@
|
||||||
register: xtables_lock
|
register: xtables_lock
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "state=restored changed=false"
|
- name: "state=restored changed=false"
|
||||||
block:
|
block:
|
||||||
- name: "restore state (check_mode=yes, must NOT report a change, no warning)"
|
- name: "restore state (check_mode=yes, must NOT report a change, no warning)"
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "get state (table nat)"
|
- name: "get state (table nat)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
table: nat
|
table: nat
|
||||||
|
@ -48,7 +47,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "save state (table filter)"
|
- name: "save state (table filter)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -68,7 +66,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "save state (table nat)"
|
- name: "save state (table nat)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -89,7 +86,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "save state (any table)"
|
- name: "save state (any table)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -109,7 +105,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "restore state (table nat, must NOT report a change, no warning)"
|
- name: "restore state (table nat, must NOT report a change, no warning)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -132,7 +127,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "change NAT table (iptables)"
|
- name: "change NAT table (iptables)"
|
||||||
iptables:
|
iptables:
|
||||||
table: nat
|
table: nat
|
||||||
|
@ -141,7 +135,6 @@
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "restore state (table nat, must report a change, no warning)"
|
- name: "restore state (table nat, must report a change, no warning)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -166,7 +159,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "get raw and mangle tables states"
|
- name: "get raw and mangle tables states"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -179,7 +171,6 @@
|
||||||
check_mode: true
|
check_mode: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "save state (any table)"
|
- name: "save state (any table)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -200,7 +191,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "save filter table into a test file"
|
- name: "save filter table into a test file"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_tests }}"
|
path: "{{ iptables_tests }}"
|
||||||
|
@ -213,7 +203,6 @@
|
||||||
line: "# *mangle"
|
line: "# *mangle"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "restore state (table filter, must NOT report a change, no warning)"
|
- name: "restore state (table filter, must NOT report a change, no warning)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_tests }}"
|
path: "{{ iptables_tests }}"
|
||||||
|
@ -242,7 +231,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "restore state (any table, must NOT report a change, no warning)"
|
- name: "restore state (any table, must NOT report a change, no warning)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_tests }}"
|
path: "{{ iptables_tests }}"
|
||||||
|
@ -270,7 +258,6 @@
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "restore state (table mangle, must fail, no warning)"
|
- name: "restore state (table mangle, must fail, no warning)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_tests }}"
|
path: "{{ iptables_tests }}"
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
COMMIT
|
COMMIT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "restore state from the test file (check_mode, must report a change)"
|
- name: "restore state from the test file (check_mode, must report a change)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_tests }}"
|
path: "{{ iptables_tests }}"
|
||||||
|
@ -26,7 +25,6 @@
|
||||||
- iptables_state is changed
|
- iptables_state is changed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "fail to restore state from the test file"
|
- name: "fail to restore state from the test file"
|
||||||
block:
|
block:
|
||||||
- name: "restore state from the test file (bad policies, expected error -> rollback)"
|
- name: "restore state from the test file (bad policies, expected error -> rollback)"
|
||||||
|
@ -59,7 +57,6 @@
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "fail to restore state from the test file (again)"
|
- name: "fail to restore state from the test file (again)"
|
||||||
block:
|
block:
|
||||||
- name: "try again, with a higher timeout (bad policies, same expected error)"
|
- name: "try again, with a higher timeout (bad policies, same expected error)"
|
||||||
|
@ -94,7 +91,6 @@
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "restore state from backup (must NOT report a change)"
|
- name: "restore state from backup (must NOT report a change)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -109,7 +105,6 @@
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "restore state from backup (mangle, must NOT report a change)"
|
- name: "restore state from backup (mangle, must NOT report a change)"
|
||||||
iptables_state:
|
iptables_state:
|
||||||
path: "{{ iptables_saved }}"
|
path: "{{ iptables_saved }}"
|
||||||
|
@ -125,7 +120,6 @@
|
||||||
- iptables_state is not changed
|
- iptables_state is not changed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "create a blocking ruleset with a REJECT rule"
|
- name: "create a blocking ruleset with a REJECT rule"
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ iptables_tests }}"
|
dest: "{{ iptables_tests }}"
|
||||||
|
@ -135,7 +129,6 @@
|
||||||
COMMIT
|
COMMIT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "fail to restore state from the test file (again)"
|
- name: "fail to restore state from the test file (again)"
|
||||||
block:
|
block:
|
||||||
- name: "restore state from the test file (bad rules, expected error -> rollback)"
|
- name: "restore state from the test file (bad rules, expected error -> rollback)"
|
||||||
|
@ -168,7 +161,6 @@
|
||||||
- iptables_state is failed
|
- iptables_state is failed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "fail to restore state from the test file (again)"
|
- name: "fail to restore state from the test file (again)"
|
||||||
block:
|
block:
|
||||||
- name: "try again, with a higher timeout (bad rules, same expected error)"
|
- name: "try again, with a higher timeout (bad rules, same expected error)"
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
that:
|
that:
|
||||||
- result_x509_changed is failed
|
- 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:
|
community.general.java_cert:
|
||||||
cert_alias: test_cert
|
cert_alias: test_cert
|
||||||
cert_path: "{{ test_cert_path }}"
|
cert_path: "{{ test_cert_path }}"
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- setup_wildfly_server
|
- setup_wildfly_server
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ kwriteconf_fake }}"
|
dest: "{{ kwriteconf_fake }}"
|
||||||
src: kwriteconf_fake
|
src: kwriteconf_fake
|
||||||
mode: 0755
|
mode: "0755"
|
||||||
|
|
||||||
- name: Simple test
|
- name: Simple test
|
||||||
kdeconfig:
|
kdeconfig:
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
values:
|
values:
|
||||||
- group: test
|
- group: test
|
||||||
key: test1
|
key: test1
|
||||||
bool_value: on
|
bool_value: true
|
||||||
kwriteconfig_path: "{{ kwriteconf_fake }}"
|
kwriteconfig_path: "{{ kwriteconf_fake }}"
|
||||||
register: result_bool_idem
|
register: result_bool_idem
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
@ -207,7 +207,7 @@
|
||||||
value: test2
|
value: test2
|
||||||
- groups: [testx, testy]
|
- groups: [testx, testy]
|
||||||
key: testz
|
key: testz
|
||||||
bool_value: on
|
bool_value: true
|
||||||
kwriteconfig_path: "{{ kwriteconf_fake }}"
|
kwriteconfig_path: "{{ kwriteconf_fake }}"
|
||||||
register: result_checkmode
|
register: result_checkmode
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
@ -236,7 +236,7 @@
|
||||||
value: test2
|
value: test2
|
||||||
- groups: [testx, testy]
|
- groups: [testx, testy]
|
||||||
key: testz
|
key: testz
|
||||||
bool_value: on
|
bool_value: true
|
||||||
kwriteconfig_path: "{{ kwriteconf_fake }}"
|
kwriteconfig_path: "{{ kwriteconf_fake }}"
|
||||||
register: result_checkmode_apply
|
register: result_checkmode_apply
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
value: test2
|
value: test2
|
||||||
- groups: [testx, testy]
|
- groups: [testx, testy]
|
||||||
key: testz
|
key: testz
|
||||||
bool_value: on
|
bool_value: true
|
||||||
kwriteconfig_path: "{{ kwriteconf_fake }}"
|
kwriteconfig_path: "{{ kwriteconf_fake }}"
|
||||||
register: result_checkmode2
|
register: result_checkmode2
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
uri:
|
uri:
|
||||||
url: "{{ url }}/admin/"
|
url: "{{ url }}/admin/"
|
||||||
status_code: 200
|
status_code: 200
|
||||||
validate_certs: no
|
validate_certs: false
|
||||||
register: result
|
register: result
|
||||||
until: result.status == 200
|
until: result.status == 200
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
uri:
|
uri:
|
||||||
url: "{{ url }}/admin/"
|
url: "{{ url }}/admin/"
|
||||||
status_code: 200
|
status_code: 200
|
||||||
validate_certs: no
|
validate_certs: false
|
||||||
register: result
|
register: result
|
||||||
until: result.status == 200
|
until: result.status == 200
|
||||||
retries: 10
|
retries: 10
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
redirect_uris: '{{redirect_uris1}}'
|
redirect_uris: '{{redirect_uris1}}'
|
||||||
attributes: '{{client_attributes1}}'
|
attributes: '{{client_attributes1}}'
|
||||||
protocol_mappers: '{{protocol_mappers1}}'
|
protocol_mappers: '{{protocol_mappers1}}'
|
||||||
authorization_services_enabled: False
|
authorization_services_enabled: false
|
||||||
check_mode: true
|
check_mode: true
|
||||||
register: check_client_when_present_and_same
|
register: check_client_when_present_and_same
|
||||||
|
|
||||||
|
@ -94,8 +94,8 @@
|
||||||
redirect_uris: '{{redirect_uris1}}'
|
redirect_uris: '{{redirect_uris1}}'
|
||||||
attributes: '{{client_attributes1}}'
|
attributes: '{{client_attributes1}}'
|
||||||
protocol_mappers: '{{protocol_mappers1}}'
|
protocol_mappers: '{{protocol_mappers1}}'
|
||||||
authorization_services_enabled: False
|
authorization_services_enabled: false
|
||||||
service_accounts_enabled: True
|
service_accounts_enabled: true
|
||||||
check_mode: true
|
check_mode: true
|
||||||
register: check_client_when_present_and_changed
|
register: check_client_when_present_and_changed
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
uri:
|
uri:
|
||||||
url: "{{ url }}/admin/"
|
url: "{{ url }}/admin/"
|
||||||
status_code: 200
|
status_code: 200
|
||||||
validate_certs: no
|
validate_certs: false
|
||||||
register: result
|
register: result
|
||||||
until: result.status == 200
|
until: result.status == 200
|
||||||
retries: 10
|
retries: 10
|
||||||
|
@ -54,9 +54,9 @@
|
||||||
state: present
|
state: present
|
||||||
redirect_uris:
|
redirect_uris:
|
||||||
- "https://my-backend-api.c.org/"
|
- "https://my-backend-api.c.org/"
|
||||||
fullScopeAllowed: True
|
fullScopeAllowed: true
|
||||||
attributes: '{{client_attributes1}}'
|
attributes: '{{client_attributes1}}'
|
||||||
public_client: False
|
public_client: false
|
||||||
|
|
||||||
- name: Create a Keycloak client role
|
- name: Create a Keycloak client role
|
||||||
community.general.keycloak_role:
|
community.general.keycloak_role:
|
||||||
|
@ -82,8 +82,8 @@
|
||||||
redirect_uris:
|
redirect_uris:
|
||||||
- "https://my-onepage-app-frontend.c.org/"
|
- "https://my-onepage-app-frontend.c.org/"
|
||||||
attributes: '{{client_attributes1}}'
|
attributes: '{{client_attributes1}}'
|
||||||
full_scope_allowed: False
|
full_scope_allowed: false
|
||||||
public_client: True
|
public_client: true
|
||||||
|
|
||||||
|
|
||||||
- name: Map roles to public client
|
- name: Map roles to public client
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
uri:
|
uri:
|
||||||
url: "{{ url }}/admin/"
|
url: "{{ url }}/admin/"
|
||||||
status_code: 200
|
status_code: 200
|
||||||
validate_certs: no
|
validate_certs: false
|
||||||
register: result
|
register: result
|
||||||
until: result.status == 200
|
until: result.status == 200
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
|
|
||||||
- name: Map a realm role to client service account
|
- name: Map a realm role to client service account
|
||||||
vars:
|
vars:
|
||||||
- roles: [ {'name': '{{ role }}'} ]
|
- roles:
|
||||||
|
- name: '{{ role }}'
|
||||||
community.general.keycloak_user_rolemapping:
|
community.general.keycloak_user_rolemapping:
|
||||||
auth_keycloak_url: "{{ url }}"
|
auth_keycloak_url: "{{ url }}"
|
||||||
auth_realm: "{{ admin_realm }}"
|
auth_realm: "{{ admin_realm }}"
|
||||||
|
@ -57,7 +58,8 @@
|
||||||
|
|
||||||
- name: Unmap a realm role from client service account
|
- name: Unmap a realm role from client service account
|
||||||
vars:
|
vars:
|
||||||
- roles: [ {'name': '{{ role }}'} ]
|
- roles:
|
||||||
|
- name: '{{ role }}'
|
||||||
community.general.keycloak_user_rolemapping:
|
community.general.keycloak_user_rolemapping:
|
||||||
auth_keycloak_url: "{{ url }}"
|
auth_keycloak_url: "{{ url }}"
|
||||||
auth_realm: "{{ admin_realm }}"
|
auth_realm: "{{ admin_realm }}"
|
||||||
|
@ -101,7 +103,8 @@
|
||||||
|
|
||||||
- name: Map a client role to client service account
|
- name: Map a client role to client service account
|
||||||
vars:
|
vars:
|
||||||
- roles: [ {'name': '{{ role }}'} ]
|
- roles:
|
||||||
|
- name: '{{ role }}'
|
||||||
community.general.keycloak_user_rolemapping:
|
community.general.keycloak_user_rolemapping:
|
||||||
auth_keycloak_url: "{{ url }}"
|
auth_keycloak_url: "{{ url }}"
|
||||||
auth_realm: "{{ admin_realm }}"
|
auth_realm: "{{ admin_realm }}"
|
||||||
|
@ -122,7 +125,8 @@
|
||||||
|
|
||||||
- name: Unmap a client role from client service account
|
- name: Unmap a client role from client service account
|
||||||
vars:
|
vars:
|
||||||
- roles: [ {'name': '{{ role }}'} ]
|
- roles:
|
||||||
|
- name: '{{ role }}'
|
||||||
community.general.keycloak_user_rolemapping:
|
community.general.keycloak_user_rolemapping:
|
||||||
auth_keycloak_url: "{{ url }}"
|
auth_keycloak_url: "{{ url }}"
|
||||||
auth_realm: "{{ admin_realm }}"
|
auth_realm: "{{ admin_realm }}"
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
etcd3_prefix: '/keyprefix/'
|
etcd3_prefix: '/keyprefix/'
|
||||||
etcd3_singlekey: '/singlekeypath'
|
etcd3_singlekey: '/singlekeypath'
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Create a password ({{ backend }})
|
- name: Create a password ({{ backend }})
|
||||||
set_fact:
|
set_fact:
|
||||||
newpass: "{{ lookup('community.general.passwordstore', 'test-pass', length=8, create=true, backend=backend) }}"
|
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:
|
set_fact:
|
||||||
readpass: "{{ lookup('community.general.passwordstore', 'test-pass', backend=backend) }}"
|
readpass: "{{ lookup('community.general.passwordstore', 'test-pass', backend=backend) }}"
|
||||||
|
|
||||||
- name: Verify password ({{ backend }})
|
- name: Verify password ({{ backend }})
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- readpass == newpass
|
- readpass == newpass
|
||||||
|
|
||||||
- name: Create a password with equal sign ({{ backend }})
|
- name: Create a password with equal sign ({{ backend }})
|
||||||
set_fact:
|
set_fact:
|
||||||
newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=true', backend=backend) }}"
|
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:
|
set_fact:
|
||||||
readpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal', backend=backend) }}"
|
readpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal', backend=backend) }}"
|
||||||
|
|
||||||
- name: Verify password ({{ backend }})
|
- name: Verify password ({{ backend }})
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- readpass == newpass
|
- readpass == newpass
|
||||||
|
|
||||||
- name: Create a password using missing=create ({{ backend }})
|
- name: Create a password using missing=create ({{ backend }})
|
||||||
set_fact:
|
set_fact:
|
||||||
newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='create', length=8, backend=backend) }}"
|
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:
|
set_fact:
|
||||||
readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', backend=backend) }}"
|
readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', backend=backend) }}"
|
||||||
|
|
||||||
- name: Verify password ({{ backend }})
|
- name: Verify password ({{ backend }})
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- readpass == newpass
|
- readpass == newpass
|
||||||
|
|
||||||
- name: Fetch password from existing file using missing=empty ({{ backend }})
|
- name: Fetch password from existing file using missing=empty ({{ backend }})
|
||||||
set_fact:
|
set_fact:
|
||||||
readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='empty', backend=backend) }}"
|
readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='empty', backend=backend) }}"
|
||||||
|
|
||||||
- name: Verify password ({{ backend }})
|
- name: Verify password ({{ backend }})
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- readpass == newpass
|
- 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:
|
set_fact:
|
||||||
readpass: "{{ query('community.general.passwordstore', 'test-missing-pass', missing='empty', backend=backend) }}"
|
readpass: "{{ query('community.general.passwordstore', 'test-missing-pass', missing='empty', backend=backend) }}"
|
||||||
|
|
||||||
- name: Verify password ({{ backend }})
|
- name: Verify password ({{ backend }})
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- readpass == [ none ]
|
- readpass == [ none ]
|
||||||
|
|
||||||
- name: Create the YAML password ({{ backend }})
|
- name: Create the YAML password ({{ backend }})
|
||||||
command: "{{ backend }} insert -m -f test-yaml-pass"
|
command: "{{ backend }} insert -m -f test-yaml-pass"
|
||||||
args:
|
args:
|
||||||
stdin: |
|
stdin: |
|
||||||
|
@ -69,60 +69,60 @@
|
||||||
multi
|
multi
|
||||||
line
|
line
|
||||||
|
|
||||||
- name: Fetch a password with YAML subkey ({{ backend }})
|
- name: Fetch a password with YAML subkey ({{ backend }})
|
||||||
set_fact:
|
set_fact:
|
||||||
readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass', subkey='key', backend=backend) }}"
|
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:
|
assert:
|
||||||
that:
|
that:
|
||||||
- readyamlpass == 'multi\nline\n'
|
- 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"
|
command: "{{ backend }} insert -m -f test-multiline-pass"
|
||||||
args:
|
args:
|
||||||
stdin: |
|
stdin: |
|
||||||
testpassword
|
testpassword
|
||||||
random additional line
|
random additional line
|
||||||
|
|
||||||
- name: Fetch password from multiline file ({{ backend }})
|
- name: Fetch password from multiline file ({{ backend }})
|
||||||
set_fact:
|
set_fact:
|
||||||
readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass', backend=backend) }}"
|
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:
|
assert:
|
||||||
that:
|
that:
|
||||||
- readyamlpass == 'testpassword'
|
- readyamlpass == 'testpassword'
|
||||||
|
|
||||||
- name: Fetch all from multiline file ({{ backend }})
|
- name: Fetch all from multiline file ({{ backend }})
|
||||||
set_fact:
|
set_fact:
|
||||||
readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass', returnall='yes', backend=backend) }}"
|
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:
|
assert:
|
||||||
that:
|
that:
|
||||||
- readyamlpass == 'testpassword\nrandom additional line\n'
|
- readyamlpass == 'testpassword\nrandom additional line\n'
|
||||||
|
|
||||||
- name: Create a password in a folder ({{ backend }})
|
- name: Create a password in a folder ({{ backend }})
|
||||||
set_fact:
|
set_fact:
|
||||||
newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', length=8, create=true, backend=backend) }}"
|
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:
|
set_fact:
|
||||||
readpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', backend=backend) }}"
|
readpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', backend=backend) }}"
|
||||||
|
|
||||||
- name: Verify password from folder ({{ backend }})
|
- name: Verify password from folder ({{ backend }})
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- readpass == newpass
|
- readpass == newpass
|
||||||
|
|
||||||
- name: Try to read folder as passname ({{ backend }})
|
- name: Try to read folder as passname ({{ backend }})
|
||||||
set_fact:
|
set_fact:
|
||||||
newpass: "{{ lookup('community.general.passwordstore', 'folder', backend=backend) }}"
|
newpass: "{{ lookup('community.general.passwordstore', 'folder', backend=backend) }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: eval_error
|
register: eval_error
|
||||||
|
|
||||||
- name: Make sure reading folder as passname failed ({{ backend }})
|
- name: Make sure reading folder as passname failed ({{ backend }})
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- eval_error is failed
|
- eval_error is failed
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
# port: 8885
|
# port: 8885
|
||||||
# register: result
|
# register: result
|
||||||
|
|
||||||
#- assert:
|
# - assert:
|
||||||
# that:
|
# that:
|
||||||
# - result is success
|
# - result is success
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
copy:
|
copy:
|
||||||
src: sleeper.c
|
src: sleeper.c
|
||||||
dest: "{{ remote_tmp_dir }}/sleeper.c"
|
dest: "{{ remote_tmp_dir }}/sleeper.c"
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
|
|
||||||
- name: Compile fake 'sleep' binary
|
- name: Compile fake 'sleep' binary
|
||||||
command: cc {{ remote_tmp_dir }}/sleeper.c -o {{ remote_tmp_dir }}/{{ random_name }}
|
command: cc {{ remote_tmp_dir }}/sleeper.c -o {{ remote_tmp_dir }}/{{ random_name }}
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
template:
|
template:
|
||||||
src: obtainpid.sh.j2
|
src: obtainpid.sh.j2
|
||||||
dest: "{{ remote_tmp_dir }}/obtainpid.sh"
|
dest: "{{ remote_tmp_dir }}/obtainpid.sh"
|
||||||
mode: 0755
|
mode: "0755"
|
||||||
|
|
||||||
- name: "Run the fake 'sleep' binary"
|
- name: "Run the fake 'sleep' binary"
|
||||||
command: sh {{ remote_tmp_dir }}/obtainpid.sh
|
command: sh {{ remote_tmp_dir }}/obtainpid.sh
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /opt/pipx
|
path: /opt/pipx
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: "0755"
|
||||||
|
|
||||||
- name: Install tox site-wide
|
- name: Install tox site-wide
|
||||||
community.general.pipx:
|
community.general.pipx:
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- setup_redis_replication
|
- setup_redis_replication
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- setup_rundeck
|
- setup_rundeck
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
mode: 0666
|
mode: "0666"
|
||||||
|
|
||||||
- name: Install python "requests"
|
- name: Install python "requests"
|
||||||
ansible.builtin.pip:
|
ansible.builtin.pip:
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#
|
#
|
||||||
etcd3_ver: "v3.2.14"
|
etcd3_ver: "v3.2.14"
|
||||||
etcd3_download_server: "https://storage.googleapis.com/etcd"
|
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_url: "{{ etcd3_download_server }}/{{ etcd3_ver }}/etcd-{{ etcd3_ver }}-linux-amd64.tar.gz"
|
||||||
etcd3_download_location: /tmp/etcd-download-test
|
etcd3_download_location: /tmp/etcd-download-test
|
||||||
etcd3_path: "{{ etcd3_download_location }}/etcd-{{ etcd3_ver }}-linux-amd64"
|
etcd3_path: "{{ etcd3_download_location }}/etcd-{{ etcd3_ver }}-linux-amd64"
|
||||||
|
|
|
@ -94,8 +94,8 @@
|
||||||
register: _etcd3run
|
register: _etcd3run
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
# - name: kill etcd3
|
# - name: kill etcd3
|
||||||
# command: "pkill etcd"
|
# command: "pkill etcd"
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- _testetcd3ctl.rc != 0
|
- _testetcd3ctl.rc != 0
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- setup_pkg_mgr
|
- setup_pkg_mgr
|
||||||
- setup_remote_constraints
|
- setup_remote_constraints
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- setup_pkg_mgr
|
- setup_pkg_mgr
|
||||||
- setup_remote_tmp_dir
|
- setup_remote_tmp_dir
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
identities_only: true
|
identities_only: true
|
||||||
controlmaster: "auto"
|
controlmaster: "auto"
|
||||||
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
||||||
controlpersist: yes
|
controlpersist: "yes"
|
||||||
dynamicforward: '10080'
|
dynamicforward: '10080'
|
||||||
other_options:
|
other_options:
|
||||||
serveraliveinterval: '30'
|
serveraliveinterval: '30'
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
identities_only: true
|
identities_only: true
|
||||||
controlmaster: "auto"
|
controlmaster: "auto"
|
||||||
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
||||||
controlpersist: yes
|
controlpersist: "yes"
|
||||||
dynamicforward: '10080'
|
dynamicforward: '10080'
|
||||||
other_options:
|
other_options:
|
||||||
serveraliveinterval: '30'
|
serveraliveinterval: '30'
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
identities_only: true
|
identities_only: true
|
||||||
controlmaster: "auto"
|
controlmaster: "auto"
|
||||||
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
||||||
controlpersist: yes
|
controlpersist: "yes"
|
||||||
dynamicforward: '10080'
|
dynamicforward: '10080'
|
||||||
other_options:
|
other_options:
|
||||||
serveraliveinterval: '30'
|
serveraliveinterval: '30'
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
add_keys_to_agent: false
|
add_keys_to_agent: false
|
||||||
host_key_algorithms: "+ssh-ed25519"
|
host_key_algorithms: "+ssh-ed25519"
|
||||||
identities_only: false
|
identities_only: false
|
||||||
controlmaster: no
|
controlmaster: "no"
|
||||||
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
|
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
|
||||||
controlpersist: "600"
|
controlpersist: "600"
|
||||||
dynamicforward: '11080'
|
dynamicforward: '11080'
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
add_keys_to_agent: false
|
add_keys_to_agent: false
|
||||||
host_key_algorithms: "+ssh-ed25519"
|
host_key_algorithms: "+ssh-ed25519"
|
||||||
identities_only: false
|
identities_only: false
|
||||||
controlmaster: no
|
controlmaster: "no"
|
||||||
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
|
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
|
||||||
controlpersist: "600"
|
controlpersist: "600"
|
||||||
dynamicforward: '11080'
|
dynamicforward: '11080'
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
identities_only: true
|
identities_only: true
|
||||||
controlmaster: "auto"
|
controlmaster: "auto"
|
||||||
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
||||||
controlpersist: yes
|
controlpersist: "yes"
|
||||||
dynamicforward: '10080'
|
dynamicforward: '10080'
|
||||||
other_options:
|
other_options:
|
||||||
serveraliveinterval: '30'
|
serveraliveinterval: '30'
|
||||||
|
@ -335,7 +335,7 @@
|
||||||
identities_only: true
|
identities_only: true
|
||||||
controlmaster: "auto"
|
controlmaster: "auto"
|
||||||
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
||||||
controlpersist: yes
|
controlpersist: "yes"
|
||||||
dynamicforward: '10080'
|
dynamicforward: '10080'
|
||||||
other_options:
|
other_options:
|
||||||
serveraliveinterval: '30'
|
serveraliveinterval: '30'
|
||||||
|
@ -361,7 +361,7 @@
|
||||||
identities_only: true
|
identities_only: true
|
||||||
controlmaster: "auto"
|
controlmaster: "auto"
|
||||||
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
controlpath: "~/.ssh/sockets/%r@%h-%p"
|
||||||
controlpersist: yes
|
controlpersist: "yes"
|
||||||
dynamicforward: '10080'
|
dynamicforward: '10080'
|
||||||
other_options:
|
other_options:
|
||||||
serveraliveinterval: '30'
|
serveraliveinterval: '30'
|
||||||
|
@ -404,7 +404,7 @@
|
||||||
add_keys_to_agent: false
|
add_keys_to_agent: false
|
||||||
host_key_algorithms: "+ssh-ed25519"
|
host_key_algorithms: "+ssh-ed25519"
|
||||||
identities_only: false
|
identities_only: false
|
||||||
controlmaster: no
|
controlmaster: "no"
|
||||||
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
|
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
|
||||||
controlpersist: "600"
|
controlpersist: "600"
|
||||||
dynamicforward: '11080'
|
dynamicforward: '11080'
|
||||||
|
@ -432,7 +432,7 @@
|
||||||
add_keys_to_agent: false
|
add_keys_to_agent: false
|
||||||
host_key_algorithms: "+ssh-ed25519"
|
host_key_algorithms: "+ssh-ed25519"
|
||||||
identities_only: false
|
identities_only: false
|
||||||
controlmaster: no
|
controlmaster: "no"
|
||||||
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
|
controlpath: "~/.ssh/new-sockets/%r@%h-%p"
|
||||||
controlpersist: "600"
|
controlpersist: "600"
|
||||||
dynamicforward: '11080'
|
dynamicforward: '11080'
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ terraform_project_dir }}/complex_vars"
|
path: "{{ terraform_project_dir }}/complex_vars"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: "0755"
|
||||||
|
|
||||||
- name: copy terraform files to work space
|
- name: copy terraform files to work space
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
@ -49,10 +49,10 @@
|
||||||
one
|
one
|
||||||
two
|
two
|
||||||
list_of_lists:
|
list_of_lists:
|
||||||
- [ 1 ]
|
- [1]
|
||||||
- [ 11, 12, 13 ]
|
- [11, 12, 13]
|
||||||
- [ 2 ]
|
- [2]
|
||||||
- [ 3 ]
|
- [3]
|
||||||
state: present
|
state: present
|
||||||
register: terraform_init_result
|
register: terraform_init_result
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: "{{ terraform_url }}"
|
src: "{{ terraform_url }}"
|
||||||
dest: "{{ remote_tmp_dir }}"
|
dest: "{{ remote_tmp_dir }}"
|
||||||
mode: 0755
|
mode: "0755"
|
||||||
remote_src: true
|
remote_src: true
|
||||||
validate_certs: "{{ validate_certs }}"
|
validate_certs: "{{ validate_certs }}"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ terraform_project_dir }}/{{ item['name'] }}"
|
path: "{{ terraform_project_dir }}/{{ item['name'] }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: "0755"
|
||||||
loop: "{{ terraform_provider_versions }}"
|
loop: "{{ terraform_provider_versions }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: provider_index
|
index_var: provider_index
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
_AnsibleTaggedStr: str
|
_AnsibleTaggedStr: str
|
||||||
_AnsibleTaggedInt: int
|
_AnsibleTaggedInt: int
|
||||||
_AnsibleTaggedFloat: float
|
_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) }}'
|
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
|
||||||
dtype: dict[str, bool|dict|float|int|list|str]
|
dtype: dict[str, bool|dict|float|int|list|str]
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
_AnsibleTaggedStr: str
|
_AnsibleTaggedStr: str
|
||||||
_AnsibleTaggedInt: int
|
_AnsibleTaggedInt: int
|
||||||
_AnsibleTaggedFloat: float
|
_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) }}'
|
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
|
||||||
dtype: list[bool|dict|float|int|list|str]
|
dtype: list[bool|dict|float|int|list|str]
|
||||||
|
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Add child element
|
- name: Add child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/beers
|
xpath: /business/beers
|
||||||
|
@ -17,10 +17,10 @@
|
||||||
- beer: Окское
|
- beer: Окское
|
||||||
register: add_children_elements_unicode
|
register: add_children_elements_unicode
|
||||||
|
|
||||||
- name: Add trailing newline
|
- name: Add trailing newline
|
||||||
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-add-children-elements-unicode.xml
|
src: results/test-add-children-elements-unicode.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -28,9 +28,9 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- add_children_elements_unicode is changed
|
- add_children_elements_unicode is changed
|
||||||
- comparison is not changed # identical
|
- 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
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Add child element
|
- name: Add child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/beers
|
xpath: /business/beers
|
||||||
|
@ -17,10 +17,10 @@
|
||||||
- beer: Old Rasputin
|
- beer: Old Rasputin
|
||||||
register: add_children_elements
|
register: add_children_elements
|
||||||
|
|
||||||
- name: Add trailing newline
|
- name: Add trailing newline
|
||||||
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-add-children-elements.xml
|
src: results/test-add-children-elements.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -28,9 +28,9 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- add_children_elements is changed
|
- add_children_elements is changed
|
||||||
- comparison is not changed # identical
|
- 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
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Add child element
|
- name: Add child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/beers
|
xpath: /business/beers
|
||||||
add_children: '{{ bad_beers }}'
|
add_children: '{{ bad_beers }}'
|
||||||
register: add_children_from_groupvars
|
register: add_children_from_groupvars
|
||||||
|
|
||||||
- name: Add trailing newline
|
- name: Add trailing newline
|
||||||
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-add-children-from-groupvars.xml
|
src: results/test-add-children-from-groupvars.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -27,9 +27,9 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- add_children_from_groupvars is changed
|
- add_children_from_groupvars is changed
|
||||||
- comparison is not changed # identical
|
- 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
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Add child element
|
- name: Add child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: '/business/beers/beer[text()="St. Bernardus Abbot 12"]'
|
xpath: '/business/beers/beer[text()="St. Bernardus Abbot 12"]'
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
pretty_print: true
|
pretty_print: true
|
||||||
register: add_children_insertafter
|
register: add_children_insertafter
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-add-children-insertafter.xml
|
src: results/test-add-children-insertafter.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- add_children_insertafter is changed
|
- add_children_insertafter is changed
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Add child element
|
- name: Add child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: '/business/beers/beer[text()="St. Bernardus Abbot 12"]'
|
xpath: '/business/beers/beer[text()="St. Bernardus Abbot 12"]'
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
pretty_print: true
|
pretty_print: true
|
||||||
register: add_children_insertbefore
|
register: add_children_insertbefore
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-add-children-insertbefore.xml
|
src: results/test-add-children-insertbefore.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- add_children_insertbefore is changed
|
- add_children_insertbefore is changed
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Add child element
|
- name: Add child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/beers
|
xpath: /business/beers
|
||||||
|
@ -19,10 +19,10 @@
|
||||||
type: экстра
|
type: экстра
|
||||||
register: add_children_with_attributes_unicode
|
register: add_children_with_attributes_unicode
|
||||||
|
|
||||||
- name: Add trailing newline
|
- name: Add trailing newline
|
||||||
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-add-children-with-attributes-unicode.xml
|
src: results/test-add-children-with-attributes-unicode.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -30,9 +30,9 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- add_children_with_attributes_unicode is changed
|
- add_children_with_attributes_unicode is changed
|
||||||
- comparison is not changed # identical
|
- 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
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Add child element
|
- name: Add child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/beers
|
xpath: /business/beers
|
||||||
|
@ -19,10 +19,10 @@
|
||||||
type: light
|
type: light
|
||||||
register: add_children_with_attributes
|
register: add_children_with_attributes
|
||||||
|
|
||||||
- name: Add trailing newline
|
- name: Add trailing newline
|
||||||
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-add-children-with-attributes.xml
|
src: results/test-add-children-with-attributes.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -30,13 +30,13 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
# NOTE: This test may fail if lxml does not support predictable element attribute order
|
# 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)
|
# 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.
|
# The module still works fine, we simply are not comparing as smart as we should.
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- add_children_with_attributes is changed
|
- add_children_with_attributes is changed
|
||||||
- comparison is not changed # identical
|
- comparison is not changed # identical
|
||||||
when: lxml_predictable_attribute_order
|
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
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- comparison is not changed # identical
|
- 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
|
# Now we repeat the same, just to ensure proper use of namespaces
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-namespaced-beers.xml
|
src: fixtures/ansible-xml-namespaced-beers.xml
|
||||||
dest: /tmp/ansible-xml-namespaced-beers.xml
|
dest: /tmp/ansible-xml-namespaced-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Add namespaced child element
|
- name: Add namespaced child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-namespaced-beers.xml
|
path: /tmp/ansible-xml-namespaced-beers.xml
|
||||||
xpath: /bus:business/ber:beers
|
xpath: /bus:business/ber:beers
|
||||||
|
@ -20,10 +20,10 @@
|
||||||
- beer: Old Rasputin
|
- beer: Old Rasputin
|
||||||
register: add_namespaced_children_elements
|
register: add_namespaced_children_elements
|
||||||
|
|
||||||
- name: Add trailing newline
|
- name: Add trailing newline
|
||||||
shell: echo "" >> /tmp/ansible-xml-namespaced-beers.xml
|
shell: echo "" >> /tmp/ansible-xml-namespaced-beers.xml
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-add-namespaced-children-elements.xml
|
src: results/test-add-namespaced-children-elements.xml
|
||||||
dest: /tmp/ansible-xml-namespaced-beers.xml
|
dest: /tmp/ansible-xml-namespaced-beers.xml
|
||||||
|
@ -31,9 +31,9 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- add_namespaced_children_elements is changed
|
- add_namespaced_children_elements is changed
|
||||||
- comparison is not changed # identical
|
- 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
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/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:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/beers
|
xpath: /business/beers
|
||||||
|
@ -18,10 +18,10 @@
|
||||||
- '<beer>Old Rasputin</beer>'
|
- '<beer>Old Rasputin</beer>'
|
||||||
register: children_elements
|
register: children_elements
|
||||||
|
|
||||||
- name: Add trailing newline
|
- name: Add trailing newline
|
||||||
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
shell: echo "" >> /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-add-children-elements.xml
|
src: results/test-add-children-elements.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -29,9 +29,9 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- children_elements is changed
|
- children_elements is changed
|
||||||
- comparison is not changed # identical
|
- 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
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers-unicode.xml
|
src: fixtures/ansible-xml-beers-unicode.xml
|
||||||
dest: /tmp/ansible-xml-beers-unicode.xml
|
dest: /tmp/ansible-xml-beers-unicode.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Count child element
|
- name: Count child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers-unicode.xml
|
path: /tmp/ansible-xml-beers-unicode.xml
|
||||||
xpath: /business/beers/beer
|
xpath: /business/beers/beer
|
||||||
count: true
|
count: true
|
||||||
register: beers
|
register: beers
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- beers is not changed
|
- beers is not changed
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Add child element
|
- name: Add child element
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/beers/beer
|
xpath: /business/beers/beer
|
||||||
count: true
|
count: true
|
||||||
register: beers
|
register: beers
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- beers is not changed
|
- beers is not changed
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers-unicode.xml
|
src: fixtures/ansible-xml-beers-unicode.xml
|
||||||
dest: /tmp/ansible-xml-beers-unicode.xml
|
dest: /tmp/ansible-xml-beers-unicode.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Get element attributes
|
- name: Get element attributes
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers-unicode.xml
|
path: /tmp/ansible-xml-beers-unicode.xml
|
||||||
xpath: /business/rating
|
xpath: /business/rating
|
||||||
content: attribute
|
content: attribute
|
||||||
register: get_element_attribute
|
register: get_element_attribute
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- get_element_attribute is not changed
|
- get_element_attribute is not changed
|
||||||
- get_element_attribute.matches[0]['rating'] is defined and get_element_attribute.matches[0]['rating']['subjective'] == 'да'
|
- 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:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers-unicode.xml
|
path: /tmp/ansible-xml-beers-unicode.xml
|
||||||
xpath: /business/rating
|
xpath: /business/rating
|
||||||
content: text
|
content: text
|
||||||
register: get_element_text
|
register: get_element_text
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- get_element_text is not changed
|
- get_element_text is not changed
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Get element attributes
|
- name: Get element attributes
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/rating
|
xpath: /business/rating
|
||||||
content: attribute
|
content: attribute
|
||||||
register: get_element_attribute
|
register: get_element_attribute
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- get_element_attribute is not changed
|
- get_element_attribute is not changed
|
||||||
- get_element_attribute.matches[0]['rating'] is defined
|
- get_element_attribute.matches[0]['rating'] is defined
|
||||||
- get_element_attribute.matches[0]['rating']['subjective'] == 'true'
|
- get_element_attribute.matches[0]['rating']['subjective'] == 'true'
|
||||||
|
|
||||||
- name: Get element attributes (should fail)
|
- name: Get element attributes (should fail)
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/rating
|
xpath: /business/rating
|
||||||
|
@ -32,19 +32,19 @@
|
||||||
register: get_element_attribute_wrong
|
register: get_element_attribute_wrong
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- get_element_attribute_wrong is failed
|
- get_element_attribute_wrong is failed
|
||||||
|
|
||||||
- name: Get element text
|
- name: Get element text
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/rating
|
xpath: /business/rating
|
||||||
content: text
|
content: text
|
||||||
register: get_element_text
|
register: get_element_text
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- get_element_text is not changed
|
- get_element_text is not changed
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/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:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
add_children:
|
add_children:
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
register: module_output
|
register: module_output
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- module_output is not changed
|
- module_output is not changed
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml.orig
|
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
|
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:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
pretty_print: true
|
pretty_print: true
|
||||||
register: pretty_print_only
|
register: pretty_print_only
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-pretty-print-only.xml
|
src: results/test-pretty-print-only.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -25,9 +25,9 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- pretty_print_only is changed
|
- pretty_print_only is changed
|
||||||
- comparison is not changed # identical
|
- 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
|
||||||
|
|
|
@ -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)
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
- name: Setup test fixture
|
- name: Setup test fixture
|
||||||
copy:
|
copy:
|
||||||
src: fixtures/ansible-xml-beers.xml
|
src: fixtures/ansible-xml-beers.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
|
||||||
|
|
||||||
- name: Pretty print
|
- name: Pretty print
|
||||||
xml:
|
xml:
|
||||||
path: /tmp/ansible-xml-beers.xml
|
path: /tmp/ansible-xml-beers.xml
|
||||||
xpath: /business/beers
|
xpath: /business/beers
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
- beer: Old Rasputin
|
- beer: Old Rasputin
|
||||||
register: pretty_print
|
register: pretty_print
|
||||||
|
|
||||||
- name: Compare to expected result
|
- name: Compare to expected result
|
||||||
copy:
|
copy:
|
||||||
src: results/test-pretty-print.xml
|
src: results/test-pretty-print.xml
|
||||||
dest: /tmp/ansible-xml-beers.xml
|
dest: /tmp/ansible-xml-beers.xml
|
||||||
|
@ -26,9 +26,9 @@
|
||||||
diff: true
|
diff: true
|
||||||
register: comparison
|
register: comparison
|
||||||
|
|
||||||
- name: Test expected result
|
- name: Test expected result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- pretty_print is changed
|
- pretty_print is changed
|
||||||
- comparison is not changed # identical
|
- 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
Loading…
Add table
Add a link
Reference in a new issue