1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/win_chocolatey_source/tasks/main.yml
Jordan Borean 933d36b25f
win_chocolatey_source: add new module to manage Chocolatey sources (#42790)
* win_chocolatey_source: add new module to manage Chocolatey sources

* Added examples and fix diff run

* Minor fixes from review

* When editing a source, recreate with the explicit options instead of using the existing source

* Fixed up copyright header in PowerShell file
2018-07-18 10:36:21 +10:00

31 lines
736 B
YAML

---
- 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