2017-02-27 12:36:52 +01:00
|
|
|
# test code for the win_chocolatey module
|
|
|
|
# (c) 2017, Dag Wieers <dag@wieers.com>
|
|
|
|
|
|
|
|
# This file is part of Ansible
|
|
|
|
#
|
|
|
|
# Ansible is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# Ansible is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2017-09-15 22:35:10 +02:00
|
|
|
- name: install chocolatey-core.extension
|
2017-02-27 12:36:52 +01:00
|
|
|
win_chocolatey:
|
2017-09-15 22:35:10 +02:00
|
|
|
name: chocolatey-core.extension
|
2017-07-15 02:34:29 +02:00
|
|
|
state: present
|
2017-09-15 22:35:10 +02:00
|
|
|
register: install
|
2017-02-27 12:36:52 +01:00
|
|
|
|
2017-09-15 22:35:10 +02:00
|
|
|
- name: verify install chocolatey-core.extension
|
2017-07-15 02:34:29 +02:00
|
|
|
assert:
|
|
|
|
that:
|
2017-09-15 22:35:10 +02:00
|
|
|
- 'install.changed == true'
|
2018-06-25 00:23:31 +02:00
|
|
|
- install.rc == 0
|
2017-02-27 12:36:52 +01:00
|
|
|
|
2017-09-15 22:35:10 +02:00
|
|
|
- name: install chocolatey-core.extension again
|
2017-07-15 02:34:29 +02:00
|
|
|
win_chocolatey:
|
2017-09-15 22:35:10 +02:00
|
|
|
name: chocolatey-core.extension
|
2017-07-15 02:34:29 +02:00
|
|
|
state: present
|
2017-09-15 22:35:10 +02:00
|
|
|
register: install_again
|
2017-02-27 12:36:52 +01:00
|
|
|
|
2017-09-15 22:35:10 +02:00
|
|
|
- name: verify install chocolatey-core.extension again
|
2017-07-15 02:34:29 +02:00
|
|
|
assert:
|
|
|
|
that:
|
2017-09-15 22:35:10 +02:00
|
|
|
- 'install_again.changed == false'
|
2018-06-25 00:23:31 +02:00
|
|
|
- install.rc == 0
|
2017-02-27 12:36:52 +01:00
|
|
|
|
2017-09-15 22:35:10 +02:00
|
|
|
- name: remove chocolatey-core.extension
|
2017-07-15 02:34:29 +02:00
|
|
|
win_chocolatey:
|
2017-09-15 22:35:10 +02:00
|
|
|
name: chocolatey-core.extension
|
2017-07-15 02:34:29 +02:00
|
|
|
state: absent
|
2017-09-15 22:35:10 +02:00
|
|
|
register: remove
|
2017-07-13 03:38:34 +02:00
|
|
|
|
2017-09-15 22:35:10 +02:00
|
|
|
- name: verify remove chocolatey-core.extension
|
2017-07-15 02:34:29 +02:00
|
|
|
assert:
|
|
|
|
that:
|
2017-09-15 22:35:10 +02:00
|
|
|
- 'remove.changed == true'
|
2018-06-25 00:23:31 +02:00
|
|
|
- install.rc == 0
|
2017-07-13 03:38:34 +02:00
|
|
|
|
2017-09-15 22:35:10 +02:00
|
|
|
- name: remove chocolatey-core.extension again
|
2017-07-15 02:34:29 +02:00
|
|
|
win_chocolatey:
|
2017-09-15 22:35:10 +02:00
|
|
|
name: chocolatey-core.extension
|
2017-07-15 02:34:29 +02:00
|
|
|
state: absent
|
2017-09-15 22:35:10 +02:00
|
|
|
register: remove_again
|
2017-07-15 02:34:29 +02:00
|
|
|
|
2017-09-15 22:35:10 +02:00
|
|
|
- name: verify remove chocolatey-core.extension again
|
2017-07-15 02:34:29 +02:00
|
|
|
assert:
|
|
|
|
that:
|
2017-09-15 22:35:10 +02:00
|
|
|
- 'remove_again.changed == false'
|
2018-06-25 00:23:31 +02:00
|
|
|
- install.rc == 0
|