mirror of
https://github.com/ansible/ansible.git
synced 2026-02-03 20:40:24 -05:00
Spelling and grammar fixes (#86417)
This commit is contained in:
parent
869088b959
commit
d37cec2ea8
86 changed files with 141 additions and 141 deletions
|
|
@ -1,2 +1,2 @@
|
|||
bugfixes:
|
||||
- deb822_repository - Remove ``Install-Python-Debian`` from files outputed by the ``deb822_repository`` module (https://github.com/ansible/ansible/issues/86395)
|
||||
- deb822_repository - Remove ``Install-Python-Debian`` from files outputted by the ``deb822_repository`` module (https://github.com/ansible/ansible/issues/86395)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
minor_changes:
|
||||
- password hashing - Add support back for using the ``crypt`` implmentation from the C library used to build Python, or with expanded functionality using ``libxcrypt``
|
||||
- password hashing - Add support back for using the ``crypt`` implementation from the C library used to build Python, or with expanded functionality using ``libxcrypt``
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
bugfixes:
|
||||
- dnf5 - return failure message which occured while running RPM scriptlet (https://github.com/ansible/ansible/issues/86117).
|
||||
- dnf5 - return failure message which occurred while running RPM scriptlet (https://github.com/ansible/ansible/issues/86117).
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
minor_changes:
|
||||
- slurp module get's new C(armor) option to allow user to disable base64 encoding.
|
||||
- slurp module gets new C(armor) option to allow user to disable base64 encoding.
|
||||
|
|
|
|||
|
|
@ -782,7 +782,7 @@ class TaskExecutor:
|
|||
if _INJECT_FACTS:
|
||||
if _INJECT_FACTS_ORIGIN == 'default':
|
||||
# This happens x2 due to loops and being able to use values in subsequent iterations
|
||||
# these copies are later discared in favor of 'total/final' one on loop end.
|
||||
# these copies are later discarded in favor of 'total/final' one on loop end.
|
||||
cleaned_toplevel = {k: _deprecate_top_level_fact(v) for k, v in clean_facts(af).items()}
|
||||
else:
|
||||
cleaned_toplevel = clean_facts(af)
|
||||
|
|
|
|||
|
|
@ -747,7 +747,7 @@ class DnfModule(YumDnf):
|
|||
# result in naive/inferior solution.
|
||||
# NOTE this has historically never worked even before https://github.com/ansible/ansible/pull/82725
|
||||
# where our (buggy) custom code ignored wildcards for the installed checks.
|
||||
# TODO reasearch how feasible it is to implement the above
|
||||
# TODO research how feasible it is to implement the above
|
||||
if upgrade:
|
||||
# for upgrade we pass the spec to both upgrade and install, to satisfy both available and installed
|
||||
# packages evaluated from the glob spec
|
||||
|
|
|
|||
|
|
@ -724,7 +724,7 @@ class Dnf5Module(YumDnf):
|
|||
# package specs that evaluate to a single package, trying to mimic what would the dnf machinery do
|
||||
# for glob package specs and then filtering those for allow_downgrade appears to always
|
||||
# result in naive/inferior solution.
|
||||
# TODO reasearch how feasible it is to implement the above
|
||||
# TODO research how feasible it is to implement the above
|
||||
if upgrade:
|
||||
# for upgrade we pass the spec to both upgrade and install, to satisfy both available and installed
|
||||
# packages evaluated from the glob spec
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ def add_fragments(doc, filename, fragment_loader, is_module=False, section='DOCU
|
|||
add_collection_to_versions_and_dates(fragment, real_collection_name, is_module=is_module, return_docs=(section == 'RETURN'))
|
||||
|
||||
if section == 'DOCUMENTATION':
|
||||
# notes, seealso, options and attributes entries are specificly merged, but only occur in documentation section
|
||||
# notes, seealso, options and attributes entries are specifically merged, but only occur in documentation section
|
||||
for doc_key in ['notes', 'seealso']:
|
||||
if doc_key in fragment:
|
||||
entries = fragment.pop(doc_key)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
DOCUMENTATION:
|
||||
name: ultimatequestion
|
||||
author: Terry Prachet
|
||||
version_added: 'histerical'
|
||||
version_added: 'hysterical'
|
||||
short_description: Ask any question but it will only respond with the answer to the ultimate one
|
||||
description:
|
||||
- read the book
|
||||
options:
|
||||
_input:
|
||||
description: Anything you want, goign to ignore it anywayss ...
|
||||
description: Anything you want, going to ignore it anyways ...
|
||||
type: raw
|
||||
required: true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
DOCUMENTATION:
|
||||
name: donothing
|
||||
author: lazy
|
||||
version_added: 'histerical'
|
||||
version_added: 'hysterical'
|
||||
short_description: noop
|
||||
description:
|
||||
- don't do anything
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ echo "testing no duplicates for plugins that only exist in ansible.builtin when
|
|||
[ "$(ansible-doc -l -t filter --playbook-dir ./ |grep -c 'b64encode')" -eq "1" ]
|
||||
|
||||
echo "testing with playbook dir, legacy should override"
|
||||
ansible-doc -t filter split --playbook-dir ./ -v|grep "${GREP_OPTS[@]}" histerical
|
||||
ansible-doc -t filter split --playbook-dir ./ -v|grep "${GREP_OPTS[@]}" hysterical
|
||||
|
||||
pyc_src="$(pwd)/filter_plugins/other.py"
|
||||
pyc_1="$(pwd)/filter_plugins/split.pyc"
|
||||
|
|
@ -281,14 +281,14 @@ trap 'rm -rf "$pyc_1" "$pyc_2"' EXIT
|
|||
|
||||
echo "testing pyc files are not used as adjacent documentation"
|
||||
python -c "import py_compile; py_compile.compile('$pyc_src', cfile='$pyc_1')"
|
||||
ansible-doc -t filter split --playbook-dir ./ -v|grep "${GREP_OPTS[@]}" histerical
|
||||
ansible-doc -t filter split --playbook-dir ./ -v|grep "${GREP_OPTS[@]}" hysterical
|
||||
|
||||
echo "testing pyc files are not listed as plugins"
|
||||
python -c "import py_compile; py_compile.compile('$pyc_src', cfile='$pyc_2')"
|
||||
test "$(ansible-doc -l -t module --playbook-dir ./ 2>&1 1>/dev/null |grep -c "notaplugin")" == 0
|
||||
|
||||
echo "testing without playbook dir, builtin should return"
|
||||
ansible-doc -t filter split -v 2>&1 |grep "${GREP_OPTS[@]}" -v histerical
|
||||
ansible-doc -t filter split -v 2>&1 |grep "${GREP_OPTS[@]}" -v hysterical
|
||||
|
||||
echo "test 'sidecar' for no extension module with .py doc"
|
||||
[ "$(ansible-doc -M ./library -l ansible.legacy |grep -v 'UNDOCUMENTED' |grep -c bogus_facts)" == "1" ]
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ for python in "${pythons[@]}"; do
|
|||
cat output.log
|
||||
echo "Unit tests on Python ${python} failed as expected. See output above. Checking for expected output ..."
|
||||
|
||||
# Verify that the appropriate tests pased, failed or xfailed.
|
||||
# Verify that the appropriate tests passed, failed or xfailed.
|
||||
grep 'PASSED tests/unit/plugins/modules/test_ansible_forked.py::test_passed' output.log
|
||||
grep 'PASSED tests/unit/plugins/modules/test_ansible_forked.py::test_warning' output.log
|
||||
grep 'XFAIL tests/unit/plugins/modules/test_ansible_forked.py::test_kill_xfail' output.log
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ WRONG_RC=$?
|
|||
echo "rc was $WRONG_RC (5 is expected)"
|
||||
[ $WRONG_RC -eq 5 ]
|
||||
|
||||
# try to view the file encrypted with the vault-password we didnt specify
|
||||
# to verify we didnt choose the wrong vault-id
|
||||
# try to view the file encrypted with the vault-password we didn't specify
|
||||
# to verify we didn't choose the wrong vault-id
|
||||
ansible-vault view "$@" --vault-id vault-password encrypted-vault-password
|
||||
|
||||
FORMAT_1_1_HEADER="\$ANSIBLE_VAULT;1.1;AES256"
|
||||
|
|
@ -215,7 +215,7 @@ WRONG_RC=$?
|
|||
echo "rc was $WRONG_RC (1 is expected)"
|
||||
[ $WRONG_RC -eq 1 ]
|
||||
|
||||
# try specifying a --encrypt-vault-id that doesnt exist, should exit with an error indicating
|
||||
# try specifying a --encrypt-vault-id that doesn't exist, should exit with an error indicating
|
||||
# that --encrypt-vault-id and the known vault-ids
|
||||
ansible-vault encrypt "$@" --vault-password-file vault-password --encrypt-vault-id doesnt_exist "${TEST_FILE}" && :
|
||||
WRONG_RC=$?
|
||||
|
|
@ -383,7 +383,7 @@ head -1 "${TEST_FILE_EDIT}" | grep "${FORMAT_1_1_HEADER}"
|
|||
ansible-vault encrypt "$@" --vault-id vault_password@vault-password "${TEST_FILE_EDIT2}"
|
||||
|
||||
# verify that we aren't prompted for a new vault password on edit if we are running interactively (ie, with prompts)
|
||||
# have to use setsid nd --ask-vault-pass to force a prompt to simulate.
|
||||
# have to use setsid and --ask-vault-pass to force a prompt to simulate.
|
||||
# See https://github.com/ansible/ansible/issues/35834
|
||||
setsid sh -c 'tty; echo password |ansible-vault edit --ask-vault-pass vault_test.yml' < /dev/null > log 2>&1 && :
|
||||
grep 'New Vault password' log && :
|
||||
|
|
@ -411,8 +411,8 @@ echo "rc was $WRONG_RC (5 is expected)"
|
|||
# but this time specify with --encrypt-vault-id, but specifying vault-id names (instead of default)
|
||||
# ansible-vault encrypt "$@" --vault-id from_vault_password@vault-password --vault-id from_encrypted_vault_password@encrypted-vault-password --encrypt-vault-id from_encrypted_vault_password "${TEST_FILE(_ENC_PASSWORD}"
|
||||
|
||||
# try to view the file encrypted with the vault-password we didnt specify
|
||||
# to verify we didnt choose the wrong vault-id
|
||||
# try to view the file encrypted with the vault-password we didn't specify
|
||||
# to verify we didn't choose the wrong vault-id
|
||||
# ansible-vault view "$@" --vault-id vault-password "${TEST_FILE_ENC_PASSWORD}" && :
|
||||
# WRONG_RC=$?
|
||||
# echo "rc was $WRONG_RC (1 is expected)"
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
tasks:
|
||||
- name: EXPECTED FAILURE include_role that doesn't exist
|
||||
include_role:
|
||||
name: 'non-existant-role'
|
||||
name: 'non-existent-role'
|
||||
when:
|
||||
- inventory_hostname == 'testhost2'
|
||||
- test_name == 'test_include_role'
|
||||
|
||||
- name: EXPECTED FAILURE include_tasks that don't exist
|
||||
include_tasks: non-existant.yml
|
||||
include_tasks: non-existent.yml
|
||||
when:
|
||||
- inventory_hostname == 'testhost2'
|
||||
- test_name == 'test_include_tasks'
|
||||
|
|
|
|||
|
|
@ -712,7 +712,7 @@
|
|||
register: dpkg_result
|
||||
ignore_errors: true
|
||||
|
||||
- name: Verify that package removal was succesfull
|
||||
- name: Verify that package removal was successful
|
||||
assert:
|
||||
that:
|
||||
- package_removed is success
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@
|
|||
# The literal 0600 can be interpreted as octal correctly. Note that
|
||||
# a decimal 644 is octal 420. The default perm is 0644 so a misinterpretation
|
||||
# of 644 was previously resulting in a default file mode of 0420.
|
||||
# 'mode: 600' is likely not what a user meant but there isnt enough info
|
||||
# 'mode: 600' is likely not what a user meant but there isn't enough info
|
||||
# to determine that. Note that a string arg of '600' will be interpreted as 0600.
|
||||
# See https://github.com/ansible/ansible/issues/16370
|
||||
- name: Assert mode_given_yaml_literal_600 is correct
|
||||
|
|
|
|||
|
|
@ -222,10 +222,10 @@
|
|||
|
||||
- name: ensure that arg-splatted expressions that are template-wrapped provide a deprecation warning
|
||||
assert:
|
||||
that: '{{ thats }}'
|
||||
that: '{{ that_list }}'
|
||||
vars:
|
||||
ansible_deprecation_warnings: true
|
||||
thats:
|
||||
that_list:
|
||||
- '{{ 1 == 1 }}'
|
||||
register: result
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class CallbackModule(CallbackBase):
|
|||
'v2_playbook_on_include', 'v2_runner_on_start',
|
||||
}
|
||||
|
||||
# we're abusing runtime assertions to signify failure in this integration test component; ensure they're not disabled by opimizations
|
||||
# we're abusing runtime assertions to signify failure in this integration test component; ensure they're not disabled by optimizations
|
||||
try:
|
||||
assert False
|
||||
except AssertionError:
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
# valid(list): does nothihng, just for testing values
|
||||
# valid(list): does nothing, just for testing values
|
||||
ANSIBLE_TYPES_VALID=
|
||||
|
||||
# mustunquote(list): does nothihng, just for testing values
|
||||
# mustunquote(list): does nothing, just for testing values
|
||||
ANSIBLE_TYPES_MUSTUNQUOTE=
|
||||
|
||||
# notvalid(list): does nothihng, just for testing values
|
||||
# notvalid(list): does nothing, just for testing values
|
||||
ANSIBLE_TYPES_NOTVALID=
|
||||
|
||||
# totallynotvalid(list): does nothihng, just for testing values
|
||||
# totallynotvalid(list): does nothing, just for testing values
|
||||
ANSIBLE_TYPES_TOTALLYNOTVALID=
|
||||
|
||||
# str_mustunquote(string): does nothihng, just for testing values
|
||||
# str_mustunquote(string): does nothing, just for testing values
|
||||
ANSIBLE_TYPES_STR_MUSTUNQUOTE=
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
[list_values]
|
||||
# (list) does nothihng, just for testing values
|
||||
# (list) does nothing, just for testing values
|
||||
mustunquote=
|
||||
|
||||
# (list) does nothihng, just for testing values
|
||||
# (list) does nothing, just for testing values
|
||||
notvalid=
|
||||
|
||||
# (list) does nothihng, just for testing values
|
||||
# (list) does nothing, just for testing values
|
||||
totallynotvalid=
|
||||
|
||||
# (list) does nothihng, just for testing values
|
||||
# (list) does nothing, just for testing values
|
||||
valid=
|
||||
|
||||
|
||||
[string_values]
|
||||
# (string) does nothihng, just for testing values
|
||||
# (string) does nothing, just for testing values
|
||||
str_mustunquote=
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
# valid(list): does nothihng, just for testing values
|
||||
# valid(list): does nothing, just for testing values
|
||||
ansible_types_valid: ''
|
||||
|
||||
|
||||
# mustunquote(list): does nothihng, just for testing values
|
||||
# mustunquote(list): does nothing, just for testing values
|
||||
ansible_types_mustunquote: ''
|
||||
|
||||
|
||||
# notvalid(list): does nothihng, just for testing values
|
||||
# notvalid(list): does nothing, just for testing values
|
||||
ansible_types_notvalid: ''
|
||||
|
||||
|
||||
# totallynotvalid(list): does nothihng, just for testing values
|
||||
# totallynotvalid(list): does nothing, just for testing values
|
||||
ansible_types_totallynotvalid: ''
|
||||
|
||||
|
||||
# str_mustunquote(string): does nothihng, just for testing values
|
||||
# str_mustunquote(string): does nothing, just for testing values
|
||||
ansible_types_str_mustunquote: ''
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from __future__ import annotations
|
|||
DOCUMENTATION = """
|
||||
name: bogus
|
||||
author: Ansible Core Team
|
||||
version_added: histerical
|
||||
version_added: hysterical
|
||||
short_description: returns what you gave it
|
||||
description:
|
||||
- this is mostly a noop
|
||||
|
|
@ -15,7 +15,7 @@ DOCUMENTATION = """
|
|||
_terms:
|
||||
description: stuff to pass through
|
||||
test_list:
|
||||
description: does nothihng, just for testing values
|
||||
description: does nothing, just for testing values
|
||||
type: list
|
||||
choices:
|
||||
- Dan
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from __future__ import annotations
|
|||
DOCUMENTATION = """
|
||||
name: casting
|
||||
author: Ansible Core Team
|
||||
version_added: histerical
|
||||
version_added: hysterical
|
||||
short_description: returns what you gave it
|
||||
description:
|
||||
- this is mostly a noop
|
||||
|
|
@ -15,16 +15,16 @@ DOCUMENTATION = """
|
|||
_terms:
|
||||
description: stuff to pass through
|
||||
test_list:
|
||||
description: does nothihng, just for testing values
|
||||
description: does nothing, just for testing values
|
||||
type: list
|
||||
test_int:
|
||||
description: does nothihng, just to test casting
|
||||
description: does nothing, just to test casting
|
||||
type: int
|
||||
test_bool:
|
||||
description: does nothihng, just to test casting
|
||||
description: does nothing, just to test casting
|
||||
type: bool
|
||||
test_str:
|
||||
description: does nothihng, just to test casting
|
||||
description: does nothing, just to test casting
|
||||
type: str
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from __future__ import annotations
|
|||
DOCUMENTATION = """
|
||||
name: casting_individual
|
||||
author: Ansible Core Team
|
||||
version_added: histerical
|
||||
version_added: hysterical
|
||||
short_description: returns what you gave it
|
||||
description:
|
||||
- this is mostly a noop
|
||||
|
|
@ -15,16 +15,16 @@ DOCUMENTATION = """
|
|||
_terms:
|
||||
description: stuff to pass through
|
||||
test_list:
|
||||
description: does nothihng, just for testing values
|
||||
description: does nothing, just for testing values
|
||||
type: list
|
||||
test_int:
|
||||
description: does nothihng, just to test casting
|
||||
description: does nothing, just to test casting
|
||||
type: int
|
||||
test_bool:
|
||||
description: does nothihng, just to test casting
|
||||
description: does nothing, just to test casting
|
||||
type: bool
|
||||
test_str:
|
||||
description: does nothihng, just to test casting
|
||||
description: does nothing, just to test casting
|
||||
type: str
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from __future__ import annotations
|
|||
DOCUMENTATION = """
|
||||
name: types
|
||||
author: Ansible Core Team
|
||||
version_added: histerical
|
||||
version_added: hysterical
|
||||
short_description: returns what you gave it
|
||||
description:
|
||||
- this is mostly a noop
|
||||
|
|
@ -15,7 +15,7 @@ DOCUMENTATION = """
|
|||
_terms:
|
||||
description: stuff to pass through
|
||||
valid:
|
||||
description: does nothihng, just for testing values
|
||||
description: does nothing, just for testing values
|
||||
type: list
|
||||
ini:
|
||||
- section: list_values
|
||||
|
|
@ -25,7 +25,7 @@ DOCUMENTATION = """
|
|||
vars:
|
||||
- name: ansible_types_valid
|
||||
mustunquote:
|
||||
description: does nothihng, just for testing values
|
||||
description: does nothing, just for testing values
|
||||
type: list
|
||||
ini:
|
||||
- section: list_values
|
||||
|
|
@ -35,7 +35,7 @@ DOCUMENTATION = """
|
|||
vars:
|
||||
- name: ansible_types_mustunquote
|
||||
notvalid:
|
||||
description: does nothihng, just for testing values
|
||||
description: does nothing, just for testing values
|
||||
type: list
|
||||
ini:
|
||||
- section: list_values
|
||||
|
|
@ -45,7 +45,7 @@ DOCUMENTATION = """
|
|||
vars:
|
||||
- name: ansible_types_notvalid
|
||||
totallynotvalid:
|
||||
description: does nothihng, just for testing values
|
||||
description: does nothing, just for testing values
|
||||
type: list
|
||||
ini:
|
||||
- section: list_values
|
||||
|
|
@ -55,7 +55,7 @@ DOCUMENTATION = """
|
|||
vars:
|
||||
- name: ansible_types_totallynotvalid
|
||||
str_mustunquote:
|
||||
description: does nothihng, just for testing values
|
||||
description: does nothing, just for testing values
|
||||
type: string
|
||||
ini:
|
||||
- section: string_values
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@
|
|||
name: "integration test cron"
|
||||
state: absent
|
||||
|
||||
- name: Check file succesfull deletion
|
||||
- name: Check file successful deletion
|
||||
stat:
|
||||
path: /etc/cron.d/cron_remove_name
|
||||
register: cron_file_stats
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
name: "integration test cron"
|
||||
state: absent
|
||||
|
||||
- name: Check file succesfull deletion
|
||||
- name: Check file successful deletion
|
||||
stat:
|
||||
path: /etc/cron.d/cron_remove_whitespace
|
||||
register: cron_file_stats
|
||||
|
|
@ -280,7 +280,7 @@
|
|||
name: "cron job that contain non-ascii chars in job (これは日本語です; This is Japanese)"
|
||||
state: absent
|
||||
|
||||
- name: Check file succesfull deletion
|
||||
- name: Check file successful deletion
|
||||
stat:
|
||||
path: /etc/cron.d/cron_nonascii
|
||||
register: cron_file_stats
|
||||
|
|
@ -312,7 +312,7 @@
|
|||
name: "integration test cron"
|
||||
state: absent
|
||||
|
||||
- name: Check file succesfull deletion
|
||||
- name: Check file successful deletion
|
||||
stat:
|
||||
path: "/etc/cron.d/なせば大抵なんとかなる👊"
|
||||
register: cron_file_stats
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ DOCUMENTATION = """
|
|||
description:
|
||||
- This connection plugin just verifies parameters passed in
|
||||
author: ansible (@core)
|
||||
version_added: histerical
|
||||
version_added: hysterical
|
||||
options:
|
||||
password:
|
||||
description: Authentication password for the C(remote_user). Can be supplied as CLI option.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
delegate_facts: true
|
||||
loop: "{{ groups['all'] | difference(['localhost']) }}"
|
||||
|
||||
- name: ensure we didnt create it on current host
|
||||
- name: ensure we didn't create it on current host
|
||||
assert:
|
||||
that:
|
||||
- test is undefined
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
loop: "{{ groups['all'] | difference(['localhost'])}}"
|
||||
|
||||
|
||||
- name: test that we don't polute whole group with one value
|
||||
- name: test that we don't pollute whole group with one value
|
||||
hosts: localhost
|
||||
gather_facts: no
|
||||
vars:
|
||||
|
|
|
|||
|
|
@ -45,6 +45,6 @@
|
|||
that:
|
||||
- bad_args_ping is failed or bad_args_ping is unreachable
|
||||
|
||||
- name: this should work by ignoring the bad ags for orig host
|
||||
- name: this should work by ignoring the bad args for orig host
|
||||
ping:
|
||||
delegate_to: delegatetome
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from __future__ import annotations
|
|||
DOCUMENTATION = r"""
|
||||
---
|
||||
module: willremove
|
||||
version_added: histerical
|
||||
version_added: hysterical
|
||||
short_description: does nothing
|
||||
description: does nothing, this is deprecation test
|
||||
deprecated:
|
||||
|
|
|
|||
|
|
@ -711,7 +711,7 @@
|
|||
name: dinginessentail
|
||||
state: absent
|
||||
|
||||
- name: Test failures occured during loading repositories are properly handled
|
||||
- name: Test failures occurred during loading repositories are properly handled
|
||||
vars:
|
||||
repo_name: test-non-existing-gpgkey-file
|
||||
block:
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
- hosts: testhost
|
||||
tasks:
|
||||
- name: ensure we still have facts, but didnt pickup new local ones
|
||||
- name: ensure we still have facts, but didn't pickup new local ones
|
||||
assert:
|
||||
that:
|
||||
- ansible_facts is defined and 'fqdn' in ansible_facts
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class CacheModule(BaseCacheModule):
|
|||
return key in self.empty
|
||||
|
||||
def delete(self, key):
|
||||
del self.emtpy[key]
|
||||
del self.empty[key]
|
||||
|
||||
def flush(self):
|
||||
self.empty = {}
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@
|
|||
- ohai
|
||||
gather_facts: yes
|
||||
tasks:
|
||||
- name: Test that retrieving facter and ohai doesnt fail
|
||||
- name: Test that retrieving facter and ohai doesn't fail
|
||||
assert:
|
||||
# not much to assert here, aside from not crashing, since test images dont have
|
||||
# facter/ohai
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
command: 'ls -1a {{ checkout_dir }}/submodule2'
|
||||
register: submodule2
|
||||
|
||||
- name: SUBMODULES | Enusre submodule2 is at the appropriate commit
|
||||
- name: SUBMODULES | Ensure submodule2 is at the appropriate commit
|
||||
assert:
|
||||
that: submodule2.stdout_lines | length == 4
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
changed_when: true
|
||||
notify: another_listen
|
||||
|
||||
- name: nofity another handler 2
|
||||
- name: notify another handler 2
|
||||
debug:
|
||||
changed_when: true
|
||||
notify: another_listen
|
||||
|
|
|
|||
|
|
@ -4,17 +4,17 @@
|
|||
|
||||
# These tasks can be changed to a loop once https://github.com/ansible/ansible/issues/71031
|
||||
# is fixed
|
||||
- name: macOS | Set hostname specifiying macos strategy
|
||||
- name: macOS | Set hostname specifying macos strategy
|
||||
hostname:
|
||||
name: bugs.acme.example.com
|
||||
use: macos
|
||||
|
||||
- name: macOS | Set hostname specifiying macosx strategy
|
||||
- name: macOS | Set hostname specifying macosx strategy
|
||||
hostname:
|
||||
name: bugs.acme.example.com
|
||||
use: macosx
|
||||
|
||||
- name: macOS | Set hostname specifiying darwin strategy
|
||||
- name: macOS | Set hostname specifying darwin strategy
|
||||
hostname:
|
||||
name: bugs.acme.example.com
|
||||
use: darwin
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
- name: Import task inside always
|
||||
import_tasks: tasks4.yml
|
||||
|
||||
- name: Validate that variables set in previously improted tasks are passed down.
|
||||
- name: Validate that variables set in previously imported tasks are passed down.
|
||||
import_tasks: validate3.yml
|
||||
|
||||
- name: Assert that tasks4 was included
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
- name: Include task inside always
|
||||
include_tasks: tasks4.yml
|
||||
|
||||
- name: Validate that variables set in previously improted tasks are passed down
|
||||
- name: Validate that variables set in previously imported tasks are passed down
|
||||
include_tasks: validate3.yml
|
||||
|
||||
- name: Assert that tasks4 was included
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
- name: >-
|
||||
verify that multiple level of nested statements and
|
||||
include+meta doesnt mess included files mecanisms
|
||||
include+meta doesn't mess included files mechanisms
|
||||
hosts: testhost
|
||||
tasks:
|
||||
- include_tasks: ./tasks/nested/nested.yml
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
- name: >-
|
||||
verify that multiple level of nested statements and
|
||||
include+meta doesnt mess included files mecanisms
|
||||
include+meta doesn't mess included files mechanisms
|
||||
hosts: testhost
|
||||
tasks:
|
||||
- ansible.builtin.include_tasks: ./tasks/nested/nested.yml
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from __future__ import annotations
|
|||
DOCUMENTATION = """
|
||||
name: bogus
|
||||
author: Ansible Core Team
|
||||
version_added: histerical
|
||||
version_added: hysterical
|
||||
short_description: returns what you gave it
|
||||
description:
|
||||
- this is mostly a noop
|
||||
|
|
@ -15,7 +15,7 @@ DOCUMENTATION = """
|
|||
_terms:
|
||||
description: stuff to pass through
|
||||
test_list:
|
||||
description: does nothihng, just for testing values
|
||||
description: does nothing, just for testing values
|
||||
type: string
|
||||
required: True
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@
|
|||
- "{{role_path}}/vars"
|
||||
|
||||
- name: ensure vars subdir is searched for var-named actions
|
||||
# DTFIX5: the following *should* work, but since task.action is not templated by TE, it does not
|
||||
# DTFIX5: the following *should* work, but since task.action is not templated by TaskExecutor, it does not
|
||||
# action: '{{ "debug_v" ~ "ar_alias" }}'
|
||||
# args:
|
||||
# var: item
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
loop: "{{ l }}"
|
||||
register: passwords_noseed
|
||||
|
||||
- name: verify they are all different, this is not guaranteed, but statisically almost impossible
|
||||
- name: verify they are all different, this is not guaranteed, but statistically almost impossible
|
||||
assert:
|
||||
that:
|
||||
- pns[0]['msg'] != pns[1]['msg']
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ plugin_routing:
|
|||
module_uses_action_defaults:
|
||||
redirect: testns.testcoll.module
|
||||
|
||||
# Not "eos_facts" to ensure TE is not finding handler via prefix
|
||||
# Not "eos_facts" to ensure TaskExecutor is not finding handler via prefix
|
||||
# eosfacts tasks should not get eos module_defaults (or defaults for other modules that use eos action plugin)
|
||||
eosfacts:
|
||||
action_plugin: testns.testcoll.eos
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
register: ouch
|
||||
ignore_errors: true
|
||||
|
||||
- name: no log wont obscure booleans when True, but still hide in msg
|
||||
- name: no log won't obscure booleans when True, but still hide in msg
|
||||
assert:
|
||||
that:
|
||||
- ouch['changed'] is boolean
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
register: ouch
|
||||
ignore_errors: true
|
||||
|
||||
- name: no log wont obscure booleans when False, but still hide in msg
|
||||
- name: no log won't obscure booleans when False, but still hide in msg
|
||||
assert:
|
||||
that:
|
||||
- ouch['changed'] is boolean
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ $tests = [Ordered]@{
|
|||
$failed = $false
|
||||
try {
|
||||
$h_process = [Ansible.AccessToken.TokenUtil]::OpenProcess(4, "QueryInformation", $false)
|
||||
$h_process.Dispose() # Incase this doesn't fail, make sure we still dispose of it
|
||||
$h_process.Dispose() # In case this doesn't fail, make sure we still dispose of it
|
||||
}
|
||||
catch [Ansible.AccessToken.Win32Exception] {
|
||||
$failed = $true
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace Ansible
|
|||
|
||||
public enum SECURITY_LOGON_TYPE
|
||||
{
|
||||
System = 0, // Used only by the Sytem account
|
||||
System = 0, // Used only by the System account
|
||||
Interactive = 2,
|
||||
Network,
|
||||
Batch,
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ Assert-Equal -actual $actual -expected $false
|
|||
$actual = Test-AnsiblePath -Path C:\fakedirectory
|
||||
Assert-Equal -actual $actual -expected $false
|
||||
|
||||
# Test-AnsiblePath file in non-existant directory
|
||||
# Test-AnsiblePath file in non-existent directory
|
||||
$actual = Test-AnsiblePath -Path C:\fakedirectory\fakefile.txt
|
||||
Assert-Equal -actual $actual -expected $false
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ $tests = @{
|
|||
$actual.SeIncreaseWorkingSetPrivilege -band [Ansible.Privilege.PrivilegeAttributes]::Enabled | Assert-Equal -Expected 0
|
||||
$actual.ContainsKey("SeTcbPrivilege") | Assert-Equal -Expected $false
|
||||
|
||||
# Now verify a no-op enabler will not rever back to disabled
|
||||
# Now verify a no-op enabler will not revert back to disabled
|
||||
$enabler2 = New-Object -TypeName Ansible.Privilege.PrivilegeEnabler -ArgumentList $false, "SeTimeZonePrivilege", "SeShutdownPrivilege", "SeTcbPrivilege"
|
||||
$enabler2.Dispose()
|
||||
$actual = [Ansible.Privilege.PrivilegeUtil]::GetAllPrivilegeInfo($process)
|
||||
|
|
@ -217,7 +217,7 @@ $tests = @{
|
|||
Assert-Equal -Expected ([Ansible.Privilege.PrivilegeAttributes]::Enabled)
|
||||
$actual.SeIncreaseWorkingSetPrivilege -band [Ansible.Privilege.PrivilegeAttributes]::Enabled | Assert-Equal -Expected 0
|
||||
|
||||
# Now verify a no-op enabler will not rever back to disabled
|
||||
# Now verify a no-op enabler will not revert back to disabled
|
||||
$enabler2 = New-Object -TypeName Ansible.Privilege.PrivilegeEnabler -ArgumentList $true, "SeTimeZonePrivilege", "SeShutdownPrivilege"
|
||||
$enabler2.Dispose()
|
||||
$actual = [Ansible.Privilege.PrivilegeUtil]::GetAllPrivilegeInfo($process)
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ $tests = [Ordered]@{
|
|||
|
||||
}
|
||||
|
||||
"Modfiy ServiceType" = {
|
||||
"Modify ServiceType" = {
|
||||
$service = New-Object -TypeName Ansible.Service.Service -ArgumentList $serviceName
|
||||
$service.ServiceType = [Ansible.Service.ServiceType]::Win32ShareProcess
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@
|
|||
virtualenv: "{{ remote_tmp_dir }}/pipenv"
|
||||
register: req_installed
|
||||
|
||||
- name: "check that a change didn't occurr this time (bug ansible#1705)"
|
||||
- name: "check that a change didn't occur this time (bug ansible#1705)"
|
||||
assert:
|
||||
that:
|
||||
- "not (req_installed is changed)"
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
editable: True
|
||||
register: url_installed
|
||||
|
||||
- name: "check that a change didn't occurr (bug ansible-modules-core#1645)"
|
||||
- name: "check that a change didn't occur (bug ansible-modules-core#1645)"
|
||||
assert:
|
||||
that:
|
||||
- "not (url_installed is changed)"
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class CacheModule(BaseCacheModule):
|
|||
return key in self.empty
|
||||
|
||||
def delete(self, key):
|
||||
del self.emtpy[key]
|
||||
del self.empty[key]
|
||||
|
||||
def flush(self):
|
||||
self.empty = {}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
- replace_cat3.stdout_lines[1] == 'We promptly judg3d antiqu3 ivory buckl3s for th3 n3xt priz3.'
|
||||
|
||||
|
||||
## test ^$ behavior in MULTILINE, and . behavior in absense of DOTALL
|
||||
## test ^$ behavior in MULTILINE, and . behavior in absence of DOTALL
|
||||
- name: quote everything between bof and eof
|
||||
replace:
|
||||
path: "{{ remote_tmp_dir_test }}/pangrams.04.txt"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
- name: test tempating corner cases
|
||||
- name: test templating corner cases
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
vars:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
owner: "{{ t_username }}"
|
||||
group: "{{ t_groupname }}"
|
||||
|
||||
- name: failsafe attr change incase underlying system does not support it
|
||||
- name: failsafe attr change in case underlying system does not support it
|
||||
shell: chattr =j "{{ t_dest }}"
|
||||
ignore_errors: True
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
- "'http://admin:secret@example.com' is uri"
|
||||
- "'ftps://admin:secret@example.com' is uri"
|
||||
- "'admin:secret@example.com' is uri" # scheme is implied
|
||||
- "'http://admin:secret@example.com/myfile?parm=1¶m=2' is uri"
|
||||
- "'http://admin:secret@example.com/myfile?param=1¶m=2' is uri"
|
||||
- "'urn:isbn:9780307476463' is uri" # book ref
|
||||
|
||||
- name: Assert url tests
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
- "'http://admin:secret@example.com' is url"
|
||||
- "'ftps://admin:secret@example.com' is url"
|
||||
- "'admin:secret@example.com' is not url"
|
||||
- "'http://admin:secret@example.com/myfile?parm=1¶m=2' is url"
|
||||
- "'http://admin:secret@example.com/myfile?param=1¶m=2' is url"
|
||||
- "'urn:isbn:9780307476463' is not url" # book ref
|
||||
- name: assert urn
|
||||
assert:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
- '{{ssh_key_file}}'
|
||||
- '{{pub_file}}'
|
||||
block:
|
||||
- name: Ensure clean/non existsing ansibulluser
|
||||
- name: Ensure clean/non existing ansibulluser
|
||||
user: name=ansibulluser state=absent
|
||||
|
||||
- name: Test creating ssh key creation
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
file: path={{ home ~ item }} state=absent
|
||||
loop: '{{ key_files }}'
|
||||
|
||||
- name: Ensure clean/non existsing ansibulluser
|
||||
- name: Ensure clean/non existing ansibulluser
|
||||
user: name=ansibulluser state=absent
|
||||
|
||||
- name: Ensure we don't break on conflicts
|
||||
|
|
@ -96,5 +96,5 @@
|
|||
file: path={{ home ~ item }} state=absent
|
||||
loop: '{{ key_files + [flagfile.path] }}'
|
||||
|
||||
- name: Ensure clean/non existsing ansibulluser
|
||||
- name: Ensure clean/non existing ansibulluser
|
||||
user: name=ansibulluser state=absent
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
- "user_test1.results[3]['state'] == 'present'"
|
||||
- "user_test1.results[4]['state'] == 'present'"
|
||||
|
||||
- name: register user informations
|
||||
- name: register user information
|
||||
when: ansible_facts.system == 'Darwin'
|
||||
command: dscl . -read /Users/ansibulluser
|
||||
register: user_test2
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@
|
|||
|
||||
- name: Create user home directory with /dev/null as skeleton, https://github.com/ansible/ansible/issues/75063
|
||||
# create_homedir is mostly used by linux, rest of OSs take care of it themselves via -k option (which fails this task)
|
||||
# OS X actuall breaks since it does not implement getpwnam()
|
||||
# OS X actually breaks since it does not implement getpwnam()
|
||||
when: ansible_system == 'Linux'
|
||||
block:
|
||||
- name: "Create user home directory with /dev/null as skeleton"
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ some tests above about group order. Here are a few more.
|
|||
* -e variables always win
|
||||
* then comes "most everything else"
|
||||
* then comes variables defined in inventory
|
||||
* then "role defaults", which are the most "defaulty" and lose in priority to everything.
|
||||
* then "role defaults", which are the most "default-like" and lose in priority to everything.
|
||||
|
||||
Given the above rules, here's a test that a -e variable overrides inventory,
|
||||
and also defaults, and role vars.
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ some tests above about group order. Here are a few more.
|
|||
* -e variables always win
|
||||
* then comes "most everything else"
|
||||
* then comes variables defined in inventory
|
||||
* then "role defaults", which are the most "defaulty" and lose in priority to everything.
|
||||
* then "role defaults", which are the most "default-like" and lose in priority to everything.
|
||||
|
||||
Given the above rules, here's a test that a -e variable overrides inventory,
|
||||
and also defaults, and role vars.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ set -eux
|
|||
|
||||
ansible-playbook test_var_blending.yml -i inventory -e @test_vars.yml -v "$@"
|
||||
|
||||
# check bad vault file erros
|
||||
# check bad vault file errors
|
||||
[ "$(ansible-playbook error_handling.yml -i inventory --vault-password-file supersecretvaultsecret -e @vars/bad_vault.yml 2>&1 | grep -c 'dummy')" -eq "0" ]
|
||||
[ "$(ansible-playbook error_handling.yml -i inventory --vault-password-file supersecretvaultsecret --tags includevault 2>&1 | grep -c 'dummy')" -eq "0" ]
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Function New-AnsiblePowerShellSignature {
|
|||
|
||||
.PARAMETER Collection
|
||||
The collection(s) to sign. This is set to ansible.builtin by default but
|
||||
can be overriden to include other collections like ansible.windows.
|
||||
can be overridden to include other collections like ansible.windows.
|
||||
|
||||
.PARAMETER Skip
|
||||
A list of plugins to skip by the fully qualified name. Plugins skipped will
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
register: error_module
|
||||
ignore_errors: yes
|
||||
vars:
|
||||
# Running with coverage means the module is run from a script and not as a psuedo script in a pipeline. This
|
||||
# Running with coverage means the module is run from a script and not as a pseudo script in a pipeline. This
|
||||
# results in a different error message being returned so we disable coverage collection for this task.
|
||||
_ansible_coverage_remote_output: ''
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Function Get-AnsibleWindowsWebRequest {
|
|||
The protocol method to use, if omitted, will use the default value for the URI protocol specified.
|
||||
|
||||
.PARAMETER FollowRedirects
|
||||
Whether to follow redirect reponses. This is only valid when using a HTTP URI.
|
||||
Whether to follow redirect responses. This is only valid when using a HTTP URI.
|
||||
all - Will follow all redirects
|
||||
none - Will follow no redirects
|
||||
safe - Will only follow redirects when GET or HEAD is used as the UrlMethod
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ Function ConvertFrom-SafeJson {
|
|||
.SYNOPSIS
|
||||
Safely convert a JSON string to an object, this is like ConvertFrom-Json except it respect -ErrorAction.
|
||||
|
||||
.PAREMTER InputObject
|
||||
.PARAMETER InputObject
|
||||
The input object string to convert from.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
|
|
|
|||
|
|
@ -515,7 +515,7 @@ def _perform_reboot(
|
|||
|
||||
# Test for "A system shutdown has already been scheduled. (1190)" and handle it gracefully
|
||||
if handle_abort and (rc == 1190 or (rc != 0 and stderr and "(1190)" in stderr)):
|
||||
display.warning("A scheduled reboot was pre-empted by Ansible.")
|
||||
display.warning("A scheduled reboot was preempted by Ansible.")
|
||||
|
||||
# Try to abort (this may fail if it was already aborted)
|
||||
rc, stdout, stderr = _execute_command(
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class ActionModule(RebootActionModule, ActionBase):
|
|||
stdout = reboot_result['stdout']
|
||||
stderr = reboot_result['stderr']
|
||||
if reboot_result['rc'] == 1190 or (reboot_result['rc'] != 0 and "(1190)" in reboot_result['stderr']):
|
||||
display.warning('A scheduled reboot was pre-empted by Ansible.')
|
||||
display.warning('A scheduled reboot was preempted by Ansible.')
|
||||
|
||||
# Try to abort (this may fail if it was already aborted)
|
||||
result1 = self._low_level_execute_command(self._connection._shell._encode_script('shutdown /a'),
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Function Get-CustomFacts {
|
|||
|
||||
Function Get-MachineSid {
|
||||
# The Machine SID is stored in HKLM:\SECURITY\SAM\Domains\Account and is
|
||||
# only accessible by the Local System account. This method get's the local
|
||||
# only accessible by the Local System account. This method gets the local
|
||||
# admin account (ends with -500) and lops it off to get the machine sid.
|
||||
|
||||
$machine_sid = $null
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ namespace Ansible
|
|||
|
||||
public enum SECURITY_LOGON_TYPE
|
||||
{
|
||||
System = 0, // Used only by the Sytem account
|
||||
System = 0, // Used only by the System account
|
||||
Interactive = 2,
|
||||
Network,
|
||||
Batch,
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ def test_builtin_alt_names(name: str) -> None:
|
|||
def test_macro_marker_handling(template: str, variables: dict[str, object], expected: object) -> None:
|
||||
"""
|
||||
Ensure that `JinjaCallContext` Marker handling is masked/set correctly for Jinja macro callables.
|
||||
Jinja's generated macro code handles Markers, so pre-emptive raise on retrieval should be disabled for the macro `call()`.
|
||||
Jinja's generated macro code handles Markers, so preemptive raise on retrieval should be disabled for the macro `call()`.
|
||||
"""
|
||||
res = TemplateEngine(variables=variables).template(TRUST.tag(template))
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ class TestFindIniFile:
|
|||
assert u'Ansible is being run in a world writable directory' in warning
|
||||
assert u'ignoring it as an ansible.cfg source' in warning
|
||||
|
||||
# ANSIBLE_CONFIG is sepcified
|
||||
# ANSIBLE_CONFIG is specified
|
||||
@pytest.mark.parametrize('setup_env, expected', (([alt_cfg_file], alt_cfg_file), ([cfg_in_cwd], cfg_in_cwd)), indirect=['setup_env'])
|
||||
# All config files are present
|
||||
@pytest.mark.parametrize('setup_existing_files',
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ another line exceeding 120 chars content content content content content content
|
|||
yet another line exceeding 120 chars content content content content content content content content content content content content content content content content content content EOL
|
||||
short
|
||||
a line of reasonably normal length
|
||||
a line of exactly 118 chars content content content content content content content content content content conten EOL
|
||||
a line of exactly 118 chars content content content content content content content content content content finish EOL
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ another line exceeding 120 chars content content content content content content
|
|||
yet another line exceeding 120 chars content content content content content content content content content content content content content content content content content content EOL
|
||||
short
|
||||
a line of reasonably normal length
|
||||
a line of exactly 118 chars content content content content content content content content content content conten EOL
|
||||
a line of exactly 118 chars content content content content content content content content content content finish EOL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
5 short
|
||||
6 a line of reasonably normal length
|
||||
7 a line of exactly 118 chars content content content content content content content content content content conten EOL
|
||||
7 a line of exactly 118 chars content content content content content content content content content content finish EOL
|
||||
column 118 ^
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
5 short
|
||||
6 a line of reasonably normal length
|
||||
7 a line of exactly 118 chars content content content content content content content content content content conten EOL
|
||||
7 a line of exactly 118 chars content content content content content content content content content content finish EOL
|
||||
^ column 1
|
||||
|
|
|
|||
|
|
@ -858,7 +858,7 @@ def test_get_collection_versions(api_version, token_type, token_ins, monkeypatch
|
|||
},
|
||||
{
|
||||
'version': '1.0.1',
|
||||
'href': '/api/v3/plugin/ansible/content/pubished/collections/index/ns/col/versions/1.0.1/',
|
||||
'href': '/api/v3/plugin/ansible/content/published/collections/index/ns/col/versions/1.0.1/',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ def test_no_tty_fallback(atomic_am, atomic_mocks, fake_stat, mocker):
|
|||
|
||||
@pytest.mark.parametrize('stdin', [{}], indirect=['stdin'])
|
||||
def test_existing_file_stat_failure(atomic_am, atomic_mocks, mocker):
|
||||
"""Failure to stat an existing file in order to copy permissions propogates the error (unless EPERM)"""
|
||||
"""Failure to stat an existing file in order to copy permissions propagates the error (unless EPERM)"""
|
||||
atomic_mocks['copystat'].side_effect = FileNotFoundError('testing os copystat with non EPERM error')
|
||||
atomic_mocks['path_exists'].return_value = True
|
||||
|
||||
|
|
|
|||
|
|
@ -106,8 +106,8 @@ class TestAnsibleModuleExitValuesRemoved:
|
|||
|
||||
DATA = (
|
||||
(
|
||||
dict(username='person', password='$ecret k3y'),
|
||||
dict(one=1, pwd='$ecret k3y', url='https://username:password12345@foo.com/login/',
|
||||
dict(username='person', password='$secret k3y'),
|
||||
dict(one=1, pwd='$secret k3y', url='https://username:password12345@foo.com/login/',
|
||||
not_secret='following the leader', msg='here'),
|
||||
dict(one=1, pwd=OMIT, url='https://username:password12345@foo.com/login/',
|
||||
not_secret='following the leader', msg='here',
|
||||
|
|
@ -115,15 +115,15 @@ class TestAnsibleModuleExitValuesRemoved:
|
|||
),
|
||||
(
|
||||
dict(username='person', password='password12345'),
|
||||
dict(one=1, pwd='$ecret k3y', url='https://username:password12345@foo.com/login/',
|
||||
dict(one=1, pwd='$secret k3y', url='https://username:password12345@foo.com/login/',
|
||||
not_secret='following the leader', msg='here'),
|
||||
dict(one=1, pwd='$ecret k3y', url='https://username:********@foo.com/login/',
|
||||
dict(one=1, pwd='$secret k3y', url='https://username:********@foo.com/login/',
|
||||
not_secret='following the leader', msg='here',
|
||||
invocation=dict(module_args=dict(password=OMIT, token=None, username='person'))),
|
||||
),
|
||||
(
|
||||
dict(username='person', password='$ecret k3y'),
|
||||
dict(one=1, pwd='$ecret k3y', url='https://username:$ecret k3y@foo.com/login/',
|
||||
dict(username='person', password='$secret k3y'),
|
||||
dict(one=1, pwd='$secret k3y', url='https://username:$secret k3y@foo.com/login/',
|
||||
not_secret='following the leader', msg='here'),
|
||||
dict(one=1, pwd=OMIT, url='https://username:********@foo.com/login/',
|
||||
not_secret='following the leader', msg='here',
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ ALL_COLLECTOR_CLASSES = \
|
|||
EnvFactCollector,
|
||||
DnsFactCollector,
|
||||
PythonFactCollector,
|
||||
# FIXME: re-enable when hardware doesnt Hardware() doesnt munge self.facts
|
||||
# FIXME: re-enable when hardware doesn't Hardware() doesn't munge self.facts
|
||||
# HardwareCollector
|
||||
NetworkCollector,
|
||||
VirtualCollector,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,6 @@ class TestGetMountSize(unittest.TestCase):
|
|||
|
||||
@patch('ansible.module_utils.facts.utils.os.statvfs', side_effect=OSError('intentionally induced os error'))
|
||||
def test_oserror_on_statvfs(self, mock_statvfs):
|
||||
mount_info = utils.get_mount_size('/dev/null/doesnt/matter')
|
||||
mount_info = utils.get_mount_size('/dev/null/does/not/matter')
|
||||
self.assertIsInstance(mount_info, dict)
|
||||
self.assertDictEqual(mount_info, {})
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ class TestVaultEditor(unittest.TestCase):
|
|||
|
||||
tmp_path = editor_args[-1]
|
||||
|
||||
# simulate the tmp file being editted
|
||||
# simulate the tmp file being edited
|
||||
with open(tmp_path, 'wb') as tmp_file:
|
||||
tmp_file.write(new_src_contents)
|
||||
|
||||
|
|
@ -399,7 +399,7 @@ class TestVaultEditor(unittest.TestCase):
|
|||
self.assertEqual(src_file_plaintext, new_src_contents)
|
||||
|
||||
# self.assertEqual(src_file_plaintext, new_src_contents,
|
||||
# 'The decrypted plaintext of the editted file is not the expected contents.')
|
||||
# 'The decrypted plaintext of the edited file is not the expected contents.')
|
||||
|
||||
@patch('ansible.parsing.vault.subprocess.call')
|
||||
def test_edit_file_not_encrypted(self, mock_sp_call):
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class TestBase(unittest.TestCase):
|
|||
self.assertIsInstance(self.b, base.Base)
|
||||
self.assertIsInstance(self.b, self.ClassUnderTest)
|
||||
|
||||
# dump me doesnt return anything or change anything so not much to assert
|
||||
# dump me doesn't return anything or change anything so not much to assert
|
||||
def test_dump_me_empty(self):
|
||||
self.b.dump_me()
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ def inventory_module():
|
|||
|
||||
|
||||
def _trust(value):
|
||||
"""Recursively apply TrustedAsTemplate to input (simulating what wuold come out of a trusted input source like the dataloader YAML/JSON/ini parser)"""
|
||||
"""Recursively apply TrustedAsTemplate to input (simulating what would come out of a trusted input source like the dataloader YAML/JSON/ini parser)"""
|
||||
if isinstance(value, dict):
|
||||
return {_trust(k): _trust(v) for k, v in value.items()}
|
||||
|
||||
|
|
|
|||
|
|
@ -759,7 +759,7 @@ def test_fqcr_parsing_valid(ref, ref_type, expected_collection,
|
|||
),
|
||||
)
|
||||
def test_fqcn_validation(fqcn, expected):
|
||||
"""Vefiry that is_valid_collection_name validates FQCN correctly."""
|
||||
"""Verify that is_valid_collection_name validates FQCN correctly."""
|
||||
assert AnsibleCollectionRef.is_valid_collection_name(fqcn) is expected
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue