Initial commit

This commit is contained in:
Ansible Core Team 2020-03-09 09:11:07 +00:00
commit aebc1b03fd
4861 changed files with 812621 additions and 0 deletions

View file

@ -0,0 +1,4 @@
destructive
needs/root
shippable/posix/group3
skip/aix

View file

@ -0,0 +1,2 @@
dependencies:
- prepare_tests

View file

@ -0,0 +1,94 @@
- name: Is the locale we're going to test against installed?
shell: locale -a | grep pt_BR
register: initial_state
ignore_errors: True
- name: Make sure the locale is not installed
locale_gen:
name: pt_BR
state: absent
- name: Is the locale present?
shell: locale -a | grep pt_BR
register: cleaned
ignore_errors: True
- name: Make sure the locale is not present
assert:
that:
- "cleaned.rc == 1"
- name: Install the locale
locale_gen:
name: pt_BR
state: present
register: output
- name: Is the locale present?
shell: locale -a | grep pt_BR
register: post_check_output
ignore_errors: True
- name: Make sure the locale is present and we say we installed it
assert:
that:
- "post_check_output.rc == 0"
- "output.changed"
- name: Install the locale a second time
locale_gen:
name: pt_BR
state: present
register: output
- name: Is the locale present?
shell: locale -a | grep pt_BR
register: post_check_output
ignore_errors: True
- name: Make sure the locale is present and we reported no change
assert:
that:
- "post_check_output.rc == 0"
- "not output.changed"
- name: Remove the locale
locale_gen:
name: pt_BR
state: absent
register: output
- name: Is the locale present?
shell: locale -a | grep pt_BR
register: post_check_output
ignore_errors: True
- name: Make sure the locale is absent and we reported a change
assert:
that:
- "post_check_output.rc == 1"
- "output.changed"
- name: Remove the locale a second time
locale_gen:
name: pt_BR
state: absent
register: output
- name: Is the locale present?
shell: locale -a | grep pt_BR
register: post_check_output
ignore_errors: True
- name: Make sure the locale is absent and we reported no change
assert:
that:
- "post_check_output.rc == 1"
- "not output.changed"
# Cleanup
- name: Reinstall the locale we tested against if it was initially installed
locale_gen:
name: pt_BR
state: present
when: initial_state.rc == 0

View file

@ -0,0 +1,19 @@
# (c) 2014, James Tanner <tanner.jc@gmail.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/>.
- include: 'locale_gen.yml'
when: ansible_distribution in ('Ubuntu', 'Debian')