2017-02-27 11:36:52 +00: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 20:35:10 +00:00
|
|
|
- name: install chocolatey-core.extension
|
2017-02-27 11:36:52 +00:00
|
|
|
win_chocolatey:
|
2017-09-15 20:35:10 +00:00
|
|
|
name: chocolatey-core.extension
|
2017-07-15 00:34:29 +00:00
|
|
|
state: present
|
2017-09-15 20:35:10 +00:00
|
|
|
register: install
|
2017-02-27 11:36:52 +00:00
|
|
|
|
2017-09-15 20:35:10 +00:00
|
|
|
- name: verify install chocolatey-core.extension
|
2017-07-15 00:34:29 +00:00
|
|
|
assert:
|
|
|
|
that:
|
2017-09-15 20:35:10 +00:00
|
|
|
- 'install.changed == true'
|
2017-02-27 11:36:52 +00:00
|
|
|
|
2017-09-15 20:35:10 +00:00
|
|
|
- name: install chocolatey-core.extension again
|
2017-07-15 00:34:29 +00:00
|
|
|
win_chocolatey:
|
2017-09-15 20:35:10 +00:00
|
|
|
name: chocolatey-core.extension
|
2017-07-15 00:34:29 +00:00
|
|
|
state: present
|
2017-09-15 20:35:10 +00:00
|
|
|
register: install_again
|
2017-02-27 11:36:52 +00:00
|
|
|
|
2017-09-15 20:35:10 +00:00
|
|
|
- name: verify install chocolatey-core.extension again
|
2017-07-15 00:34:29 +00:00
|
|
|
assert:
|
|
|
|
that:
|
2017-09-15 20:35:10 +00:00
|
|
|
- 'install_again.changed == false'
|
2017-02-27 11:36:52 +00:00
|
|
|
|
2017-09-15 20:35:10 +00:00
|
|
|
- name: remove chocolatey-core.extension
|
2017-07-15 00:34:29 +00:00
|
|
|
win_chocolatey:
|
2017-09-15 20:35:10 +00:00
|
|
|
name: chocolatey-core.extension
|
2017-07-15 00:34:29 +00:00
|
|
|
state: absent
|
2017-09-15 20:35:10 +00:00
|
|
|
register: remove
|
2017-07-13 01:38:34 +00:00
|
|
|
|
2017-09-15 20:35:10 +00:00
|
|
|
- name: verify remove chocolatey-core.extension
|
2017-07-15 00:34:29 +00:00
|
|
|
assert:
|
|
|
|
that:
|
2017-09-15 20:35:10 +00:00
|
|
|
- 'remove.changed == true'
|
2017-07-13 01:38:34 +00:00
|
|
|
|
2017-09-15 20:35:10 +00:00
|
|
|
- name: remove chocolatey-core.extension again
|
2017-07-15 00:34:29 +00:00
|
|
|
win_chocolatey:
|
2017-09-15 20:35:10 +00:00
|
|
|
name: chocolatey-core.extension
|
2017-07-15 00:34:29 +00:00
|
|
|
state: absent
|
2017-09-15 20:35:10 +00:00
|
|
|
register: remove_again
|
2017-07-15 00:34:29 +00:00
|
|
|
|
2017-09-15 20:35:10 +00:00
|
|
|
- name: verify remove chocolatey-core.extension again
|
2017-07-15 00:34:29 +00:00
|
|
|
assert:
|
|
|
|
that:
|
2017-09-15 20:35:10 +00:00
|
|
|
- 'remove_again.changed == false'
|