You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# win_shell invocations can eventually be replaced with win_eventlog
|
|
|
|
- name: Remove potentially leftover test logs and sources
|
|
|
|
win_shell: Remove-EventLog -LogName "{{ item.log }}" -ErrorAction SilentlyContinue
|
|
|
|
with_items:
|
|
|
|
- "{{ win_test_log_source }}"
|
|
|
|
- "{{ win_test_log_source_extra }}"
|
|
|
|
failed_when: no
|
|
|
|
|
|
|
|
- name: Add new test logs and sources
|
|
|
|
win_shell: New-EventLog -LogName "{{ item.log }}" -Source "{{ item.source }}"
|
|
|
|
with_items:
|
|
|
|
- "{{ win_test_log_source }}"
|
|
|
|
- "{{ win_test_log_source_extra }}"
|
|
|
|
|
|
|
|
- name: Run tests for win_eventlog_entry
|
|
|
|
block:
|
|
|
|
|
|
|
|
- name: Test in normal mode
|
|
|
|
import_tasks: tests.yml
|
|
|
|
vars:
|
|
|
|
in_check_mode: no
|
|
|
|
|
|
|
|
- name: Test in check-mode
|
|
|
|
import_tasks: tests.yml
|
|
|
|
vars:
|
|
|
|
in_check_mode: yes
|
|
|
|
check_mode: yes
|
|
|
|
|
|
|
|
- name: Remove test logs and sources
|
|
|
|
win_shell: Remove-EventLog -LogName "{{ item.log }}"
|
|
|
|
with_items:
|
|
|
|
- "{{ win_test_log_source }}"
|
|
|
|
- "{{ win_test_log_source_extra }}"
|