summaryrefslogtreecommitdiff
path: root/test/integration/targets/win_chocolatey_source/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/win_chocolatey_source/tasks/main.yml')
-rw-r--r--test/integration/targets/win_chocolatey_source/tasks/main.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/integration/targets/win_chocolatey_source/tasks/main.yml b/test/integration/targets/win_chocolatey_source/tasks/main.yml
new file mode 100644
index 0000000000..0b57cc5554
--- /dev/null
+++ b/test/integration/targets/win_chocolatey_source/tasks/main.yml
@@ -0,0 +1,31 @@
+---
+- name: ensure Chocolatey is installed
+ win_chocolatey:
+ name: chocolatey
+ state: present
+
+- name: remove original Chocolatey source at the start of the test
+ win_chocolatey_source:
+ name: Chocolatey
+ state: absent
+
+- name: ensure test Chocolatey source is removed
+ win_chocolatey_source:
+ name: '{{ test_chocolatey_name }}'
+ state: absent
+
+- block:
+ - name: run tests
+ include_tasks: tests.yml
+
+ always:
+ - name: ensure original Chocolatey source is re-added
+ win_chocolatey_source:
+ name: Chocolatey
+ source: https://chocolatey.org/api/v2/
+ state: present
+
+ - name: remove test Chocolatey source
+ win_chocolatey_source:
+ name: '{{ test_chocolatey_name }}'
+ state: absent