mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #6152/11c7611c backport][stable-6] More true/false normalization (#6153)
More true/false normalization (#6152)
* More true/false normalization.
* Boolean do not need explicit choices.
* One more.
* Fix type argument.
(cherry picked from commit 11c7611ced
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
186b4200f6
commit
47514e1401
48 changed files with 203 additions and 219 deletions
|
@ -108,7 +108,7 @@ EXAMPLES = r'''
|
|||
device: en1
|
||||
attributes:
|
||||
mtu: 900
|
||||
arp: off
|
||||
arp: 'off'
|
||||
state: available
|
||||
|
||||
- name: Configure IP, netmask and set en1 up.
|
||||
|
|
|
@ -100,7 +100,7 @@ powerstate:
|
|||
description: The current power state of the machine.
|
||||
returned: success and I(machine) is not provided
|
||||
type: str
|
||||
sample: on
|
||||
sample: 'on'
|
||||
status:
|
||||
description: The current power state of the machine when the machine option is set.
|
||||
returned: success and I(machine) is provided
|
||||
|
@ -132,14 +132,14 @@ EXAMPLES = '''
|
|||
name: test.testdomain.com
|
||||
user: admin
|
||||
password: password
|
||||
state: on
|
||||
state: 'on'
|
||||
|
||||
- name: Ensure machines of which remote target address is 48 and 50 are powered off
|
||||
community.general.ipmi_power:
|
||||
name: test.testdomain.com
|
||||
user: admin
|
||||
password: password
|
||||
state: off
|
||||
state: 'off'
|
||||
machine:
|
||||
- targetAddress: 48
|
||||
- targetAddress: 50
|
||||
|
@ -151,9 +151,9 @@ EXAMPLES = '''
|
|||
password: password
|
||||
machine:
|
||||
- targetAddress: 48
|
||||
state: on
|
||||
state: 'on'
|
||||
- targetAddress: 50
|
||||
state: off
|
||||
state: 'off'
|
||||
'''
|
||||
|
||||
import traceback
|
||||
|
|
|
@ -968,7 +968,6 @@ options:
|
|||
- Enable or disable IPSec tunnel to L2TP host.
|
||||
- This option is need when C(service-type) is C(org.freedesktop.NetworkManager.l2tp).
|
||||
type: bool
|
||||
choices: [ yes, no ]
|
||||
ipsec-psk:
|
||||
description:
|
||||
- The pre-shared key in base64 encoding.
|
||||
|
|
|
@ -58,9 +58,6 @@ options:
|
|||
- Should the login data be stripped when proxying the request to the backend host
|
||||
type: bool
|
||||
default: true
|
||||
choices:
|
||||
- True
|
||||
- False
|
||||
backend_user_prefix:
|
||||
type: str
|
||||
description:
|
||||
|
@ -118,9 +115,6 @@ options:
|
|||
- Allow session persistency
|
||||
type: bool
|
||||
default: false
|
||||
choices:
|
||||
- True
|
||||
- False
|
||||
frontend_session_lifetime:
|
||||
type: int
|
||||
description:
|
||||
|
@ -131,9 +125,6 @@ options:
|
|||
- Specifies if limitation of session lifetime is active
|
||||
type: bool
|
||||
default: true
|
||||
choices:
|
||||
- True
|
||||
- False
|
||||
frontend_session_lifetime_scope:
|
||||
type: str
|
||||
description:
|
||||
|
@ -153,9 +144,6 @@ options:
|
|||
- Specifies if session timeout is active
|
||||
type: bool
|
||||
default: true
|
||||
choices:
|
||||
- True
|
||||
- False
|
||||
frontend_session_timeout_scope:
|
||||
type: str
|
||||
description:
|
||||
|
@ -184,9 +172,6 @@ options:
|
|||
- Should a redirect to the requested URL be made
|
||||
type: bool
|
||||
default: false
|
||||
choices:
|
||||
- True
|
||||
- False
|
||||
|
||||
extends_documentation_fragment:
|
||||
- community.general.utm
|
||||
|
@ -336,7 +321,7 @@ def main():
|
|||
aaa=dict(type='list', elements='str', required=True),
|
||||
basic_prompt=dict(type='str', required=True),
|
||||
backend_mode=dict(type='str', required=False, default="None", choices=['Basic', 'None']),
|
||||
backend_strip_basic_auth=dict(type='bool', required=False, default=True, choices=[True, False]),
|
||||
backend_strip_basic_auth=dict(type='bool', required=False, default=True),
|
||||
backend_user_prefix=dict(type='str', required=False, default=""),
|
||||
backend_user_suffix=dict(type='str', required=False, default=""),
|
||||
comment=dict(type='str', required=False, default=""),
|
||||
|
@ -348,16 +333,16 @@ def main():
|
|||
frontend_logout=dict(type='str', required=False),
|
||||
frontend_mode=dict(type='str', required=False, default="Basic", choices=['Basic', 'Form']),
|
||||
frontend_realm=dict(type='str', required=False),
|
||||
frontend_session_allow_persistency=dict(type='bool', required=False, default=False, choices=[True, False]),
|
||||
frontend_session_allow_persistency=dict(type='bool', required=False, default=False),
|
||||
frontend_session_lifetime=dict(type='int', required=True),
|
||||
frontend_session_lifetime_limited=dict(type='bool', required=False, default=True, choices=[True, False]),
|
||||
frontend_session_lifetime_limited=dict(type='bool', required=False, default=True),
|
||||
frontend_session_lifetime_scope=dict(type='str', required=False, default="hours", choices=['days', 'hours', 'minutes']),
|
||||
frontend_session_timeout=dict(type='int', required=True),
|
||||
frontend_session_timeout_enabled=dict(type='bool', required=False, default=True, choices=[True, False]),
|
||||
frontend_session_timeout_enabled=dict(type='bool', required=False, default=True),
|
||||
frontend_session_timeout_scope=dict(type='str', required=False, default="minutes", choices=['days', 'hours', 'minutes']),
|
||||
logout_delegation_urls=dict(type='list', elements='str', required=False, default=[]),
|
||||
logout_mode=dict(type='str', required=False, default="None", choices=['None', 'Delegation']),
|
||||
redirect_to_requested_url=dict(type='bool', required=False, default=False, choices=[True, False])
|
||||
redirect_to_requested_url=dict(type='bool', required=False, default=False)
|
||||
)
|
||||
)
|
||||
try:
|
||||
|
|
|
@ -62,7 +62,7 @@ EXAMPLES = '''
|
|||
name: rpool/myfs
|
||||
state: present
|
||||
extra_zfs_properties:
|
||||
setuid: off
|
||||
setuid: 'off'
|
||||
|
||||
- name: Create a new volume called myvol in pool rpool.
|
||||
community.general.zfs:
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
device: en1
|
||||
attributes:
|
||||
mtu: 900
|
||||
arp: off
|
||||
arp: 'off'
|
||||
state: present
|
||||
|
||||
- name: Configure IP, netmask and set en1 up.
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
- include_tasks: tests.yml
|
||||
with_nested:
|
||||
- [ True, False ] # with_link
|
||||
- [ True, False ] # with_alternatives
|
||||
- [ true, false ] # with_link
|
||||
- [ true, false ] # with_alternatives
|
||||
- [ 'auto', 'manual' ] # mode
|
||||
loop_control:
|
||||
loop_var: test_conf
|
||||
|
@ -34,7 +34,7 @@
|
|||
- include_tasks: tests_set_priority.yml
|
||||
with_sequence: start=3 end=4
|
||||
vars:
|
||||
with_alternatives: True
|
||||
with_alternatives: true
|
||||
mode: auto
|
||||
|
||||
- block:
|
||||
|
@ -44,7 +44,7 @@
|
|||
- include_tasks: tests_set_priority.yml
|
||||
with_sequence: start=3 end=4
|
||||
vars:
|
||||
with_alternatives: False
|
||||
with_alternatives: false
|
||||
mode: auto
|
||||
|
||||
# Test that path is checked: alternatives must fail when path is nonexistent
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
name: dummy
|
||||
path: '/non/existent/path/there'
|
||||
link: '/usr/bin/dummy'
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
register: alternative
|
||||
|
||||
- name: Check previous task failed
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
- name: Execute the current dummysubcmd command
|
||||
command: dummysubcmd
|
||||
register: cmd
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: Ensure that the subcommand is gone
|
||||
assert:
|
||||
|
@ -166,7 +166,7 @@
|
|||
- name: Execute the current dummysubcmd command
|
||||
command: dummysubcmd
|
||||
register: cmd
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: Ensure that the subcommand is gone
|
||||
assert:
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
community.general.apache2_module:
|
||||
name: autoindex
|
||||
state: absent
|
||||
force: True
|
||||
force: true
|
||||
|
||||
- name: reenable autoindex
|
||||
community.general.apache2_module:
|
||||
|
@ -93,7 +93,7 @@
|
|||
community.general.apache2_module:
|
||||
name: dump_io
|
||||
state: present
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
register: enable_dumpio_wrong
|
||||
|
||||
- name: disable dump_io
|
||||
|
@ -132,7 +132,7 @@
|
|||
community.general.apache2_module:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
ignore_configcheck: True
|
||||
ignore_configcheck: true
|
||||
with_items:
|
||||
- mpm_worker
|
||||
- mpm_event
|
||||
|
@ -142,7 +142,7 @@
|
|||
community.general.apache2_module:
|
||||
name: mpm_event
|
||||
state: present
|
||||
ignore_configcheck: True
|
||||
ignore_configcheck: true
|
||||
register: enabledmpmevent
|
||||
|
||||
- name: ensure changed mpm_event
|
||||
|
@ -154,7 +154,7 @@
|
|||
community.general.apache2_module:
|
||||
name: "{{ item.name }}"
|
||||
state: "{{ item.state }}"
|
||||
ignore_configcheck: True
|
||||
ignore_configcheck: true
|
||||
with_items:
|
||||
- name: mpm_event
|
||||
state: absent
|
||||
|
@ -193,7 +193,7 @@
|
|||
community.general.apache2_module:
|
||||
name: "{{item}}"
|
||||
state: absent
|
||||
ignore_configcheck: True
|
||||
ignore_configcheck: true
|
||||
with_items:
|
||||
- mpm_worker
|
||||
- mpm_event
|
||||
|
@ -203,5 +203,5 @@
|
|||
community.general.apache2_module:
|
||||
name: mpm_event
|
||||
state: present
|
||||
ignore_configcheck: True
|
||||
ignore_configcheck: true
|
||||
register: enabledmpmevent
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
# Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a
|
||||
# proper solution can be found
|
||||
environment:
|
||||
HOMEBREW_NO_AUTO_UPDATE: True
|
||||
HOMEBREW_NO_AUTO_UPDATE: "True"
|
||||
when:
|
||||
- ansible_python_version.split('.')[0] == '2'
|
||||
- ansible_os_family == 'Darwin'
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
- name: search created session
|
||||
set_fact:
|
||||
test_session_found: True
|
||||
test_session_found: true
|
||||
loop: "{{ result['sessions'] }}"
|
||||
when: "item.get('ID') == session_id and item.get('Name') == 'testsession'"
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
|||
state: info
|
||||
name: test
|
||||
register: result
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
@ -81,7 +81,7 @@
|
|||
id: '{{ session_id }}'
|
||||
scheme: non_existent
|
||||
register: result
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
@ -94,7 +94,7 @@
|
|||
port: 8501
|
||||
scheme: https
|
||||
register: result
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: previous task should fail since certificate is not known
|
||||
assert:
|
||||
|
@ -108,7 +108,7 @@
|
|||
id: '{{ session_id }}'
|
||||
port: 8501
|
||||
scheme: https
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
register: result
|
||||
|
||||
- name: previous task should succeed since certificate isn't checked
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
tested_filesystems:
|
||||
# key: fstype
|
||||
# fssize: size (Mo)
|
||||
# grow: True if resizefs is supported
|
||||
# grow: true if resizefs is supported
|
||||
# Other minimal sizes:
|
||||
# - XFS: 20Mo
|
||||
# - Btrfs: 150Mo (50Mo when "--metadata single" is used and 100Mb when on newer Fedora versions)
|
||||
|
@ -15,19 +15,19 @@ tested_filesystems:
|
|||
# - 1.7.0 requires at least 30Mo
|
||||
# - 1.10.0 requires at least 38Mo
|
||||
# - resizefs asserts when initial fs is smaller than 60Mo and seems to require 1.10.0
|
||||
ext4: {fssize: 10, grow: True}
|
||||
ext4dev: {fssize: 10, grow: True}
|
||||
ext3: {fssize: 10, grow: True}
|
||||
ext2: {fssize: 10, grow: True}
|
||||
xfs: {fssize: 300, grow: False} # grow requires a mounted filesystem
|
||||
btrfs: {fssize: 150, grow: False} # grow requires a mounted filesystem
|
||||
reiserfs: {fssize: 33, grow: False} # grow not implemented
|
||||
vfat: {fssize: 20, grow: True}
|
||||
ocfs2: {fssize: '{{ ocfs2_fssize }}', grow: False} # grow not implemented
|
||||
ext4: {fssize: 10, grow: true}
|
||||
ext4dev: {fssize: 10, grow: true}
|
||||
ext3: {fssize: 10, grow: true}
|
||||
ext2: {fssize: 10, grow: true}
|
||||
xfs: {fssize: 300, grow: false} # grow requires a mounted filesystem
|
||||
btrfs: {fssize: 150, grow: false} # grow requires a mounted filesystem
|
||||
reiserfs: {fssize: 33, grow: false} # grow not implemented
|
||||
vfat: {fssize: 20, grow: true}
|
||||
ocfs2: {fssize: '{{ ocfs2_fssize }}', grow: false} # grow not implemented
|
||||
f2fs: {fssize: '{{ f2fs_fssize|default(60) }}', grow: 'f2fs_version is version("1.10.0", ">=")'}
|
||||
lvm: {fssize: 20, grow: True}
|
||||
swap: {fssize: 10, grow: False} # grow not implemented
|
||||
ufs: {fssize: 10, grow: True}
|
||||
lvm: {fssize: 20, grow: true}
|
||||
swap: {fssize: 10, grow: false} # grow not implemented
|
||||
ufs: {fssize: 10, grow: true}
|
||||
|
||||
|
||||
get_uuid_any: "blkid -c /dev/null -o value -s UUID {{ dev }}"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
dev: '{{ dev }}'
|
||||
fstype: '{{ fstype }}'
|
||||
register: fs_result
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: 'Get UUID of the filesystem'
|
||||
ansible.builtin.shell:
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
debug:
|
||||
var: "invalid_comma_separated | community.general.from_csv(strict=True)"
|
||||
register: _invalid_csv_strict_true
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: Test invalid csv input when strict=True is failed
|
||||
assert:
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
state: present
|
||||
bindir: "{{ remote_tmp_dir }}/custom_bindir"
|
||||
norc: true
|
||||
user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL
|
||||
user_install: false # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL
|
||||
register: install_gem_result
|
||||
|
||||
- name: Get stats of gem executable
|
||||
|
@ -198,7 +198,7 @@
|
|||
state: absent
|
||||
bindir: "{{ remote_tmp_dir }}/custom_bindir"
|
||||
norc: true
|
||||
user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL
|
||||
user_install: false # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL
|
||||
register: install_gem_result
|
||||
|
||||
- name: Get stats of gem executable
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
issue: "{{ non_existent_issue }}"
|
||||
action: get_status
|
||||
register: get_status_0003
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
- name: Create {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
initialize_with_readme: True
|
||||
initialize_with_readme: true
|
||||
state: present
|
||||
|
||||
- name: Create branch {{ gitlab_branch }}
|
||||
|
@ -63,7 +63,7 @@
|
|||
- name: Clean up {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: absent
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- name: Create {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
group: "{{ gitlab_group_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
|
||||
- name: add a variable value in check_mode
|
||||
gitlab_group_variable:
|
||||
|
@ -73,7 +73,7 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
protected: True
|
||||
protected: true
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: state must be changed
|
||||
|
@ -89,7 +89,7 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
protected: False
|
||||
protected: false
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: state must be changed
|
||||
|
@ -105,7 +105,7 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
masked: True
|
||||
masked: true
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: state must be changed
|
||||
|
@ -151,8 +151,8 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
masked: True
|
||||
protected: True
|
||||
masked: true
|
||||
protected: true
|
||||
variable_type: env_var
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
|
@ -169,8 +169,8 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
masked: True
|
||||
protected: True
|
||||
masked: true
|
||||
protected: true
|
||||
variable_type: env_var
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
|
@ -187,7 +187,7 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
protected: False
|
||||
protected: false
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: state must be changed
|
||||
|
@ -265,7 +265,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
group: "{{ gitlab_group_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
|
||||
- name: set two test variables
|
||||
gitlab_group_variable:
|
||||
|
@ -312,7 +312,7 @@
|
|||
group: "{{ gitlab_group_name }}"
|
||||
vars:
|
||||
ACCESS_KEY_ID: changed
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: edit one variable state must be changed
|
||||
|
@ -332,7 +332,7 @@
|
|||
group: "{{ gitlab_group_name }}"
|
||||
vars:
|
||||
some: value
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: append one variable state must be changed
|
||||
|
@ -372,7 +372,7 @@
|
|||
group: "{{ gitlab_group_name }}"
|
||||
vars:
|
||||
some: value
|
||||
purge: True
|
||||
purge: true
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: set one variables and purge all others state must be changed
|
||||
|
@ -391,7 +391,7 @@
|
|||
group: "{{ gitlab_group_name }}"
|
||||
vars:
|
||||
some: value
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: only one variable is left state must not be changed
|
||||
|
@ -411,7 +411,7 @@
|
|||
group: "{{ gitlab_group_name }}"
|
||||
vars:
|
||||
some: 42
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: only one variable is left state must be changed
|
||||
|
@ -430,7 +430,7 @@
|
|||
group: "{{ gitlab_group_name }}"
|
||||
vars:
|
||||
some: 42.23
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: only one variable is left state must be changed
|
||||
|
@ -471,7 +471,7 @@
|
|||
- name: my_test_var
|
||||
value: my_test_value
|
||||
variable_type: file
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: append one variable state must be changed
|
||||
|
@ -562,7 +562,7 @@
|
|||
page1_var18: value
|
||||
page1_var19: value
|
||||
page1_var20: value
|
||||
purge: True
|
||||
purge: true
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: complete page added state must be changed
|
||||
|
@ -598,7 +598,7 @@
|
|||
page2_var18: value
|
||||
page2_var19: value
|
||||
page2_var20: value
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: existing page untouched state must be changed
|
||||
|
@ -613,7 +613,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
group: "{{ gitlab_group_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
register: gitlab_group_variable_state
|
||||
|
||||
- name: check that no variables are untouched state must be changed
|
||||
|
@ -630,7 +630,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
group: "{{ gitlab_group_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
variables:
|
||||
- name: SECRET_ACCESS_KEY
|
||||
value: 3214cbad
|
||||
|
@ -678,7 +678,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
group: "{{ gitlab_group_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
variables:
|
||||
- name: delete_me
|
||||
value: ansible
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- name: Create {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- name: Clean up {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: absent
|
||||
|
@ -24,10 +24,10 @@
|
|||
- name: Create {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
initialize_with_readme: True
|
||||
initialize_with_readme: true
|
||||
state: present
|
||||
register: gitlab_project_state
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
|||
- name: Create {{ gitlab_project_name }} (Test idempotency)
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
|
|
@ -16,17 +16,17 @@
|
|||
- name: Create {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
initialize_with_readme: True
|
||||
initialize_with_readme: true
|
||||
state: present
|
||||
|
||||
- name: Create Badge (check)
|
||||
check_mode: true
|
||||
gitlab_project_badge:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
@ -46,7 +46,7 @@
|
|||
- name: Create Badge
|
||||
gitlab_project_badge:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
@ -66,7 +66,7 @@
|
|||
- name: Create Badge (confirmation)
|
||||
gitlab_project_badge:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
@ -87,7 +87,7 @@
|
|||
check_mode: true
|
||||
gitlab_project_badge:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
@ -107,7 +107,7 @@
|
|||
- name: Update Badge
|
||||
gitlab_project_badge:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
@ -127,7 +127,7 @@
|
|||
- name: Update Badge (confirmation)
|
||||
gitlab_project_badge:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
@ -148,7 +148,7 @@
|
|||
check_mode: true
|
||||
gitlab_project_badge:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
state: absent
|
||||
|
@ -168,7 +168,7 @@
|
|||
- name: Delete Badge
|
||||
gitlab_project_badge:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
state: absent
|
||||
|
@ -188,7 +188,7 @@
|
|||
- name: Delete Badge (confirmation)
|
||||
gitlab_project_badge:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
state: absent
|
||||
|
@ -208,7 +208,7 @@
|
|||
- name: Clean up {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
api_url: "{{ gitlab_api_url }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: absent
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
|
||||
- name: add a variable value in check_mode
|
||||
gitlab_project_variable:
|
||||
|
@ -73,7 +73,7 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
protected: True
|
||||
protected: true
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: state must be changed
|
||||
|
@ -89,7 +89,7 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
protected: False
|
||||
protected: false
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: state must be changed
|
||||
|
@ -105,7 +105,7 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
masked: True
|
||||
masked: true
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: state must be changed
|
||||
|
@ -151,8 +151,8 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
masked: True
|
||||
protected: True
|
||||
masked: true
|
||||
protected: true
|
||||
variable_type: env_var
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
|
@ -169,8 +169,8 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
masked: True
|
||||
protected: True
|
||||
masked: true
|
||||
protected: true
|
||||
variable_type: env_var
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
|
@ -187,7 +187,7 @@
|
|||
vars:
|
||||
ACCESS_KEY_ID:
|
||||
value: checkmode
|
||||
protected: False
|
||||
protected: false
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: state must be changed
|
||||
|
@ -261,7 +261,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
|
||||
- name: set two test variables
|
||||
gitlab_project_variable:
|
||||
|
@ -308,7 +308,7 @@
|
|||
project: "{{ gitlab_project_name }}"
|
||||
vars:
|
||||
ACCESS_KEY_ID: changed
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: edit one variable state must be changed
|
||||
|
@ -328,7 +328,7 @@
|
|||
project: "{{ gitlab_project_name }}"
|
||||
vars:
|
||||
some: value
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: append one variable state must be changed
|
||||
|
@ -368,7 +368,7 @@
|
|||
project: "{{ gitlab_project_name }}"
|
||||
vars:
|
||||
some: value
|
||||
purge: True
|
||||
purge: true
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: set one variables and purge all others state must be changed
|
||||
|
@ -387,7 +387,7 @@
|
|||
project: "{{ gitlab_project_name }}"
|
||||
vars:
|
||||
some: value
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: only one variable is left state must not be changed
|
||||
|
@ -407,7 +407,7 @@
|
|||
project: "{{ gitlab_project_name }}"
|
||||
vars:
|
||||
some: 42
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: only one variable is left state must be changed
|
||||
|
@ -426,7 +426,7 @@
|
|||
project: "{{ gitlab_project_name }}"
|
||||
vars:
|
||||
some: 42.23
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: only one variable is left state must be changed
|
||||
|
@ -467,7 +467,7 @@
|
|||
- name: my_test_var
|
||||
value: my_test_value
|
||||
variable_type: file
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: append one variable state must be changed
|
||||
|
@ -559,7 +559,7 @@
|
|||
page1_var18: value
|
||||
page1_var19: value
|
||||
page1_var20: value
|
||||
purge: True
|
||||
purge: true
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: complete page added state must be changed
|
||||
|
@ -595,7 +595,7 @@
|
|||
page2_var18: value
|
||||
page2_var19: value
|
||||
page2_var20: value
|
||||
purge: False
|
||||
purge: false
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: existing page untouched state must be changed
|
||||
|
@ -610,7 +610,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
register: gitlab_project_variable_state
|
||||
|
||||
- name: check that no variables are untouched state must be changed
|
||||
|
@ -627,7 +627,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
variables:
|
||||
- name: SECRET_ACCESS_KEY
|
||||
value: 3214cbad
|
||||
|
@ -673,7 +673,7 @@
|
|||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
project: "{{ gitlab_project_name }}"
|
||||
purge: True
|
||||
purge: true
|
||||
variables:
|
||||
- name: delete_me
|
||||
value: ansible
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- name: Create {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
name: "{{ gitlab_user }}"
|
||||
username: "{{ gitlab_user }}"
|
||||
password: "{{ gitlab_user_pass }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
state: present
|
||||
register: gitlab_user_state
|
||||
|
@ -49,7 +49,7 @@
|
|||
name: ansible_test_user
|
||||
username: ansible_test_user
|
||||
password: Secr3tPassw00rd
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
state: present
|
||||
register: gitlab_user_state_again
|
||||
|
@ -68,7 +68,7 @@
|
|||
name: "{{ gitlab_user }}"
|
||||
username: "{{ gitlab_user }}"
|
||||
isadmin: true
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
state: present
|
||||
register: gitlab_user_state
|
||||
|
@ -86,7 +86,7 @@
|
|||
name: "{{ gitlab_user }}"
|
||||
username: "{{ gitlab_user }}"
|
||||
isadmin: true
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
state: present
|
||||
register: gitlab_user_state
|
||||
|
@ -104,7 +104,7 @@
|
|||
name: "{{ gitlab_user }}"
|
||||
username: "{{ gitlab_user }}"
|
||||
isadmin: false
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
state: present
|
||||
register: gitlab_user_state
|
||||
|
@ -122,8 +122,8 @@
|
|||
email: foo@bar.baz
|
||||
name: "{{ gitlab_user }}"
|
||||
username: "{{ gitlab_user }}"
|
||||
confirm: True
|
||||
validate_certs: False
|
||||
confirm: true
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
state: present
|
||||
register: gitlab_user_state
|
||||
|
@ -141,7 +141,7 @@
|
|||
name: "{{ gitlab_user }}"
|
||||
username: "{{ gitlab_user }}"
|
||||
confirm: false
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
state: present
|
||||
register: gitlab_user_state
|
||||
|
@ -159,7 +159,7 @@
|
|||
name: "{{ gitlab_user }}"
|
||||
username: "{{ gitlab_user }}"
|
||||
confirm: false
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
state: present
|
||||
register: gitlab_user_state
|
||||
|
@ -177,7 +177,7 @@
|
|||
name: "{{ gitlab_user }}"
|
||||
username: "{{ gitlab_user }}"
|
||||
confirm: false
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
state: present
|
||||
register: gitlab_user_state
|
||||
|
@ -192,7 +192,7 @@
|
|||
- name: Update User Test => Change User Password
|
||||
gitlab_user:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
|
||||
# note: the only way to check if a password really is what it is expected
|
||||
# to be is to use it for login, so we use it here instead of the
|
||||
|
@ -218,7 +218,7 @@
|
|||
- name: Update User Test => Reset User Password
|
||||
gitlab_user:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
|
||||
api_username: "{{ gitlab_user }}"
|
||||
api_password: new-super-password
|
||||
|
@ -238,7 +238,7 @@
|
|||
- name: Update User Test => Check that password was reset
|
||||
gitlab_user:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
validate_certs: false
|
||||
|
||||
api_username: "{{ gitlab_user }}"
|
||||
api_password: "{{ gitlab_user_pass }}"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
hwc_vpc_subnet:
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
vpc_id: "{{ vpc.id }}"
|
||||
cidr: "192.168.100.0/26"
|
||||
state: present
|
||||
|
@ -177,7 +177,7 @@
|
|||
hwc_vpc_subnet:
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
vpc_id: "{{ vpc.id }}"
|
||||
cidr: "192.168.100.0/26"
|
||||
state: absent
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
hwc_vpc_subnet:
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
vpc_id: "{{ vpc.id }}"
|
||||
cidr: "192.168.100.0/26"
|
||||
state: present
|
||||
|
@ -128,7 +128,7 @@
|
|||
hwc_vpc_subnet:
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
vpc_id: "{{ vpc.id }}"
|
||||
cidr: "192.168.100.0/26"
|
||||
state: absent
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
hwc_vpc_subnet:
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
vpc_id: "{{ vpc.id }}"
|
||||
cidr: "192.168.100.0/26"
|
||||
state: present
|
||||
|
@ -129,7 +129,7 @@
|
|||
hwc_vpc_subnet:
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
vpc_id: "{{ vpc.id }}"
|
||||
cidr: "192.168.100.0/26"
|
||||
state: absent
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
state: absent
|
||||
#----------------------------------------------------------
|
||||
- name: create a subnet (check mode)
|
||||
|
@ -30,7 +30,7 @@
|
|||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
state: present
|
||||
check_mode: true
|
||||
register: result
|
||||
|
@ -46,7 +46,7 @@
|
|||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
state: present
|
||||
register: result
|
||||
- name: assert changed is true
|
||||
|
@ -60,7 +60,7 @@
|
|||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
state: present
|
||||
check_mode: true
|
||||
register: result
|
||||
|
@ -75,7 +75,7 @@
|
|||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
state: present
|
||||
register: result
|
||||
- name: assert changed is false
|
||||
|
@ -90,7 +90,7 @@
|
|||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
state: absent
|
||||
check_mode: true
|
||||
register: result
|
||||
|
@ -105,7 +105,7 @@
|
|||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
state: absent
|
||||
register: result
|
||||
- name: assert changed is true
|
||||
|
@ -119,7 +119,7 @@
|
|||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
state: absent
|
||||
check_mode: true
|
||||
register: result
|
||||
|
@ -134,7 +134,7 @@
|
|||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
name: "ansible_network_subnet_test"
|
||||
dhcp_enable: True
|
||||
dhcp_enable: true
|
||||
state: absent
|
||||
register: result
|
||||
- name: assert changed is false
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
src_files:
|
||||
- "{{ remote_tmp_dir }}/test1.cfg"
|
||||
dest_iso: "{{ output_test_dir }}/test5.iso"
|
||||
udf: True
|
||||
udf: true
|
||||
register: iso_result
|
||||
- debug: var=iso_result
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
- "{{ test_dir }}/test01.cfg"
|
||||
- "{{ test_dir }}/test02.cfg"
|
||||
dest_iso: "{{ test_dir }}/test.iso"
|
||||
udf: True
|
||||
udf: true
|
||||
|
||||
- include_tasks: iso_customize.yml
|
||||
vars:
|
||||
|
|
|
@ -51,4 +51,4 @@
|
|||
# Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a
|
||||
# proper solution can be found
|
||||
environment:
|
||||
HOMEBREW_NO_AUTO_UPDATE: True
|
||||
HOMEBREW_NO_AUTO_UPDATE: "True"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
auth_password: "{{ admin_password }}"
|
||||
realm: "{{ realm }}"
|
||||
client_id: "{{ client_id }}"
|
||||
service_accounts_enabled: True
|
||||
service_accounts_enabled: true
|
||||
state: present
|
||||
register: client
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: Is the locale we're going to test against installed?
|
||||
shell: locale -a | grep pt_BR
|
||||
register: initial_state
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: Make sure the locale is not installed
|
||||
locale_gen:
|
||||
|
@ -16,7 +16,7 @@
|
|||
- name: Is the locale present?
|
||||
shell: locale -a | grep pt_BR
|
||||
register: cleaned
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: Make sure the locale is not present
|
||||
assert:
|
||||
|
@ -32,7 +32,7 @@
|
|||
- name: Is the locale present?
|
||||
shell: locale -a | grep pt_BR
|
||||
register: post_check_output
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: Make sure the locale is present and we say we installed it
|
||||
assert:
|
||||
|
@ -49,7 +49,7 @@
|
|||
- name: Is the locale present?
|
||||
shell: locale -a | grep pt_BR
|
||||
register: post_check_output
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: Make sure the locale is present and we reported no change
|
||||
assert:
|
||||
|
@ -66,7 +66,7 @@
|
|||
- name: Is the locale present?
|
||||
shell: locale -a | grep pt_BR
|
||||
register: post_check_output
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: Make sure the locale is absent and we reported a change
|
||||
assert:
|
||||
|
@ -83,7 +83,7 @@
|
|||
- name: Is the locale present?
|
||||
shell: locale -a | grep pt_BR
|
||||
register: post_check_output
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- name: Make sure the locale is absent and we reported no change
|
||||
assert:
|
||||
|
|
|
@ -81,4 +81,4 @@
|
|||
# Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a
|
||||
# proper solution can be found
|
||||
environment:
|
||||
HOMEBREW_NO_AUTO_UPDATE: True
|
||||
HOMEBREW_NO_AUTO_UPDATE: "True"
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
- name: Create a user to run the tests with
|
||||
shell: echo "CREATE USER {{ my_user }} SUPERUSER PASSWORD '{{ my_pass }}'" | psql postgres
|
||||
become_user: "{{ pg_user }}"
|
||||
become: True
|
||||
become: true
|
||||
|
||||
- name: Create a table
|
||||
odbc:
|
||||
|
@ -68,7 +68,7 @@
|
|||
len interval hour to minute
|
||||
);
|
||||
become_user: "{{ pg_user }}"
|
||||
become: True
|
||||
become: true
|
||||
register: results
|
||||
|
||||
- assert:
|
||||
|
@ -83,7 +83,7 @@
|
|||
dsn: "{{ dsn }}"
|
||||
query: "INSERT INTO films (code, title, did, date_prod, kind, len) VALUES ('asdfg', 'My First Movie', 1, '2019-01-12', 'SyFi', '02:00')"
|
||||
become_user: "{{ pg_user }}"
|
||||
become: True
|
||||
become: true
|
||||
register: results
|
||||
|
||||
- assert:
|
||||
|
@ -102,7 +102,7 @@
|
|||
- 'Comedy'
|
||||
- '01:30'
|
||||
become_user: "{{ pg_user }}"
|
||||
become: True
|
||||
become: true
|
||||
register: results
|
||||
|
||||
- assert:
|
||||
|
@ -135,7 +135,7 @@
|
|||
- 'asdfg'
|
||||
- 'qwert'
|
||||
register: results
|
||||
changed_when: False
|
||||
changed_when: false
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
dsn: "t1"
|
||||
query: "SELECT * FROM nothing"
|
||||
register: results
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
odbc:
|
||||
dsn: "Test"
|
||||
query: "SELECT * FROM nothing"
|
||||
ignore_errors: True
|
||||
ignore_errors: true
|
||||
register: results
|
||||
|
||||
- assert:
|
||||
|
|
|
@ -185,8 +185,8 @@
|
|||
- { type: 'int', value: 1, key: 'sample_int'}
|
||||
- { type: 'integer', value: 1, key: 'sample_int_2'}
|
||||
- { type: 'integer', value: -1, key: 'negative_int'}
|
||||
- { type: 'bool', value: True, key: 'sample_bool'}
|
||||
- { type: 'boolean', value: True, key: 'sample_bool_2'}
|
||||
- { type: 'bool', value: true, key: 'sample_bool'}
|
||||
- { type: 'boolean', value: true, key: 'sample_bool_2'}
|
||||
- { type: 'date', value: "2019-02-19 10:10:10", key: 'sample_date'}
|
||||
- { type: 'float', value: 1.2, key: 'sample_float'}
|
||||
- { type: 'string', value: 'sample', key: 'sample_string'}
|
||||
|
|
|
@ -66,14 +66,14 @@
|
|||
- '{{reg_pkg}}'
|
||||
- '{{url_pkg_url}}'
|
||||
- '{{file_pkg_path}}'
|
||||
check_mode: True
|
||||
check_mode: true
|
||||
register: install_1
|
||||
|
||||
- name: Install packages from url (check mode, cached)
|
||||
pacman:
|
||||
name:
|
||||
- '{{url_pkg_url}}'
|
||||
check_mode: True
|
||||
check_mode: true
|
||||
register: install_1c
|
||||
- name: Delete cached {{url_pkg}}
|
||||
file:
|
||||
|
@ -141,14 +141,14 @@
|
|||
- '{{reg_pkg}}'
|
||||
- '{{url_pkg_url}}'
|
||||
- '{{file_pkg_path}}'
|
||||
check_mode: True
|
||||
check_mode: true
|
||||
register: uninstall_1
|
||||
- name: Uninstall packages - url (check mode, cached)
|
||||
pacman:
|
||||
state: absent
|
||||
name:
|
||||
- '{{url_pkg_url}}'
|
||||
check_mode: True
|
||||
check_mode: true
|
||||
register: uninstall_1c
|
||||
- name: Delete cached {{url_pkg}}
|
||||
file:
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
- '{{url_pkg_url.stdout}}'
|
||||
- '{{file_pkg_path}}'
|
||||
reason: dependency
|
||||
check_mode: True
|
||||
check_mode: true
|
||||
register: install_1
|
||||
|
||||
- name: Install packages from mixed sources as explicit
|
||||
|
|
|
@ -285,7 +285,7 @@
|
|||
interface: net5
|
||||
bridge: vmbr0
|
||||
tag: 24
|
||||
firewall: True
|
||||
firewall: true
|
||||
register: results
|
||||
|
||||
- assert:
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
job_id: "{{ rundeck_job_id }}"
|
||||
job_options:
|
||||
sleep: "5"
|
||||
wait_execution: False
|
||||
wait_execution: false
|
||||
register: rundeck_job_run_forget
|
||||
|
||||
- name: Assert that Rundeck job test_job is running
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
path: /tmp/foo
|
||||
substitute: /home
|
||||
state: present
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_first
|
||||
|
||||
- assert:
|
||||
|
@ -124,7 +124,7 @@
|
|||
path: /tmp/foo
|
||||
substitute: /home
|
||||
state: present
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_second
|
||||
|
||||
- assert:
|
||||
|
@ -137,7 +137,7 @@
|
|||
path: /tmp/foo
|
||||
substitute: /boot
|
||||
state: present
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_third
|
||||
|
||||
- assert:
|
||||
|
@ -150,7 +150,7 @@
|
|||
path: /tmp/foo
|
||||
substitute: /boot
|
||||
state: present
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_fourth
|
||||
|
||||
- assert:
|
||||
|
@ -163,7 +163,7 @@
|
|||
path: /tmp/foo
|
||||
substitute: /dev
|
||||
state: absent
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_fifth
|
||||
|
||||
- assert:
|
||||
|
@ -176,7 +176,7 @@
|
|||
path: /tmp/foo
|
||||
substitute: /boot
|
||||
state: absent
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_sixth
|
||||
|
||||
- assert:
|
||||
|
@ -189,7 +189,7 @@
|
|||
path: /tmp/foo
|
||||
substitute: /boot
|
||||
state: absent
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_seventh
|
||||
|
||||
- assert:
|
||||
|
@ -202,7 +202,7 @@
|
|||
path: /tmp/foo
|
||||
substitute: /home
|
||||
state: present
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_eighth
|
||||
|
||||
- assert:
|
||||
|
@ -214,7 +214,7 @@
|
|||
sefcontext:
|
||||
path: /tmp/foo
|
||||
state: absent
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_ninth
|
||||
|
||||
- assert:
|
||||
|
@ -225,7 +225,7 @@
|
|||
sefcontext:
|
||||
path: /tmp/foo
|
||||
state: absent
|
||||
reload: no
|
||||
reload: false
|
||||
register: subst_tenth
|
||||
|
||||
- assert:
|
||||
|
|
|
@ -14,25 +14,25 @@
|
|||
include_vars: '{{ ansible_os_family }}.yml'
|
||||
|
||||
- name: Install OpenLDAP server and tools
|
||||
become: True
|
||||
become: true
|
||||
package:
|
||||
name: '{{ item }}'
|
||||
loop: '{{ openldap_packages_name }}'
|
||||
|
||||
- name: Install python-ldap (Python 3)
|
||||
become: True
|
||||
become: true
|
||||
package:
|
||||
name: '{{ python_ldap_package_name_python3 }}'
|
||||
when: ansible_python_version is version('3.0', '>=')
|
||||
|
||||
- name: Install python-ldap (Python 2)
|
||||
become: True
|
||||
become: true
|
||||
package:
|
||||
name: '{{ python_ldap_package_name }}'
|
||||
when: ansible_python_version is version('3.0', '<')
|
||||
|
||||
- name: Make sure OpenLDAP service is stopped
|
||||
become: True
|
||||
become: true
|
||||
shell: 'cat /var/run/slapd/slapd.pid | xargs -r kill -9 '
|
||||
|
||||
- name: Debconf
|
||||
|
@ -45,14 +45,14 @@
|
|||
creates: "/root/slapd_configured"
|
||||
|
||||
- name: Start OpenLDAP service
|
||||
become: True
|
||||
become: true
|
||||
service:
|
||||
name: '{{ openldap_service_name }}'
|
||||
enabled: True
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
- name: Copy initial config ldif file
|
||||
become: True
|
||||
become: true
|
||||
copy:
|
||||
src: 'files/{{ item }}'
|
||||
dest: '/tmp/{{ item }}'
|
||||
|
@ -67,6 +67,6 @@
|
|||
shell: "ldapmodify -Y EXTERNAL -H ldapi:/// -f /tmp/rootpw_cnconfig.ldif"
|
||||
|
||||
- name: Add initial config
|
||||
become: True
|
||||
become: true
|
||||
shell: 'ldapadd -H ldapi:/// -x -D "cn=admin,dc=example,dc=com" -w Test1234! -f /tmp/initial_config.ldif'
|
||||
when: ansible_os_family in ['Ubuntu', 'Debian']
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
- vars
|
||||
|
||||
- name: Install OpenSSL
|
||||
become: True
|
||||
become: true
|
||||
package:
|
||||
name: '{{ openssl_package_name }}'
|
||||
when: not ansible_os_family == 'Darwin'
|
||||
|
@ -49,13 +49,13 @@
|
|||
when: cryptography_from_pip
|
||||
|
||||
- name: Install pyOpenSSL (Python 3)
|
||||
become: True
|
||||
become: true
|
||||
package:
|
||||
name: '{{ pyopenssl_package_name_python3 }}'
|
||||
when: pyopenssl_package_name_python3 is defined and ansible_python_version is version('3.0', '>=')
|
||||
|
||||
- name: Install pyOpenSSL (Python 2)
|
||||
become: True
|
||||
become: true
|
||||
package:
|
||||
name: '{{ pyopenssl_package_name }}'
|
||||
when: pyopenssl_package_name is defined and ansible_python_version is version('3.0', '<')
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
- name: check hello with rpm
|
||||
shell: rpm -q hello
|
||||
failed_when: False
|
||||
failed_when: false
|
||||
register: rpm_result
|
||||
|
||||
- debug: var=zypper_result
|
||||
|
@ -55,7 +55,7 @@
|
|||
|
||||
- name: check hello with rpm
|
||||
shell: rpm -q hello
|
||||
failed_when: False
|
||||
failed_when: false
|
||||
register: rpm_result
|
||||
|
||||
- debug: var=zypper_result
|
||||
|
@ -91,12 +91,12 @@
|
|||
|
||||
- name: check hello with rpm
|
||||
shell: rpm -q hello
|
||||
failed_when: False
|
||||
failed_when: false
|
||||
register: rpm_hello_result
|
||||
|
||||
- name: check metamail with rpm
|
||||
shell: rpm -q metamail
|
||||
failed_when: False
|
||||
failed_when: false
|
||||
register: rpm_metamail_result
|
||||
|
||||
- name: verify packages uninstalled
|
||||
|
@ -115,12 +115,12 @@
|
|||
|
||||
- name: check hello with rpm
|
||||
shell: rpm -q hello
|
||||
failed_when: False
|
||||
failed_when: false
|
||||
register: rpm_hello_result
|
||||
|
||||
- name: check metamail with rpm
|
||||
shell: rpm -q metamail
|
||||
failed_when: False
|
||||
failed_when: false
|
||||
register: rpm_metamail_result
|
||||
|
||||
- name: verify packages installed
|
||||
|
@ -224,7 +224,7 @@
|
|||
|
||||
- name: check empty with rpm
|
||||
shell: rpm -q empty
|
||||
failed_when: False
|
||||
failed_when: false
|
||||
register: rpm_result
|
||||
|
||||
- name: verify installation of empty
|
||||
|
@ -406,15 +406,15 @@
|
|||
zypper:
|
||||
name: hello
|
||||
state: present
|
||||
update_cache: True
|
||||
update_cache: true
|
||||
register: zypper_result_update_cache
|
||||
|
||||
- name: run updatecache in check mode
|
||||
zypper:
|
||||
name: hello
|
||||
state: present
|
||||
update_cache: True
|
||||
check_mode: True
|
||||
update_cache: true
|
||||
check_mode: true
|
||||
register: zypper_result_update_cache_check
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue