id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13,500 | mytests2.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/test/mytests2.py | from __future__ import annotations
def testtest(data):
return data == 'from_user2'
class TestModule(object):
def tests(self):
return {
'testtest2': testtest
}
| 199 | Python | .py | 8 | 18.875 | 34 | 0.625668 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,501 | mytests.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/test/mytests.py | from __future__ import annotations
def testtest(data):
return data == 'from_user'
class TestModule(object):
def tests(self):
return {
'testtest': testtest
}
| 197 | Python | .py | 8 | 18.625 | 34 | 0.621622 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,502 | my_subdir_tests.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/test/test_subdir/my_subdir_tests.py | from __future__ import annotations
def subdir_test(data):
return data == 'subdir_from_user'
class TestModule(object):
def tests(self):
return {
'subdir_test': subdir_test
}
| 213 | Python | .py | 8 | 20.625 | 38 | 0.631841 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,503 | custom_vars.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/vars/custom_vars.py | # Copyright 2019 RedHat, inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible i... | 1,651 | Python | .py | 41 | 36.146341 | 101 | 0.700748 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,504 | uses_redirected_import.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/action/uses_redirected_import.py | from __future__ import annotations
from ansible.plugins.action import ActionBase
from ansible.module_utils.formerly_core import thingtocall
class ActionModule(ActionBase):
TRANSFERS_FILES = False
_VALID_ARGS = frozenset()
def run(self, tmp=None, task_vars=None):
if task_vars is None:
... | 489 | Python | .py | 12 | 34.5 | 63 | 0.706383 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,505 | subclassed_normal.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/action/subclassed_normal.py | from __future__ import annotations
from ansible.plugins.action.normal import ActionModule as NormalAction
class ActionModule(NormalAction):
def run(self, *args, **kwargs):
result = super(ActionModule, self).run(*args, **kwargs)
result['hacked'] = 'I got run under a subclassed normal, yay'
... | 335 | Python | .py | 7 | 42.428571 | 70 | 0.72 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,506 | bypass_host_loop.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/action/bypass_host_loop.py | # Copyright: (c) 2020, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
from ansible.plugins.action import ActionBase
class ActionModule(ActionBase):
BYPASS_HOST_LOOP = True
def run(self, tmp=None, task_vars=Non... | 487 | Python | .py | 10 | 43.9 | 92 | 0.730361 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,507 | plugin_lookup.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/action/plugin_lookup.py | from __future__ import annotations
from ansible.plugins.action import ActionBase
from ansible.plugins import loader
class ActionModule(ActionBase):
TRANSFERS_FILES = False
_VALID_ARGS = frozenset(('type', 'name'))
def run(self, tmp=None, task_vars=None):
if task_vars is None:
task_va... | 1,262 | Python | .py | 26 | 38.115385 | 105 | 0.623058 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,508 | subdir_ping_action.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/action/action_subdir/subdir_ping_action.py | from __future__ import annotations
from ansible.plugins.action import ActionBase
class ActionModule(ActionBase):
TRANSFERS_FILES = False
_VALID_ARGS = frozenset()
def run(self, tmp=None, task_vars=None):
if task_vars is None:
task_vars = dict()
result = super(ActionModule, s... | 407 | Python | .py | 11 | 30.272727 | 63 | 0.678663 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,509 | localconn.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/connection/localconn.py | from __future__ import annotations
from ansible.module_utils.common.text.converters import to_native
from ansible.plugins.connection import ConnectionBase
DOCUMENTATION = """
connection: localconn
short_description: do stuff local
description:
- does stuff
options:
connectionvar:
... | 1,087 | Python | .py | 31 | 28.548387 | 91 | 0.674308 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,510 | uses_nested_same_as_func.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_nested_same_as_func.py | #!/usr/bin/python
from __future__ import annotations
import json
import sys
from ansible_collections.testns.testcoll.plugins.module_utils.nested_same.nested_same.nested_same import nested_same
def main():
mu_result = nested_same()
print(json.dumps(dict(changed=False, source='user', mu_result=mu_result)))
... | 374 | Python | .py | 11 | 30.909091 | 116 | 0.730337 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,511 | uses_leaf_mu_flat_import.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_leaf_mu_flat_import.py | #!/usr/bin/python
from __future__ import annotations
import json
import sys
import ansible_collections.testns.testcoll.plugins.module_utils.leaf
def main():
mu_result = ansible_collections.testns.testcoll.plugins.module_utils.leaf.thingtocall()
print(json.dumps(dict(changed=False, source='user', mu_result=m... | 388 | Python | .py | 11 | 32.181818 | 91 | 0.743243 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,512 | win_selfcontained.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/win_selfcontained.py | # docs for Windows module would go here; just ensure we don't accidentally load this instead of the .ps1
| 105 | Python | .py | 1 | 104 | 104 | 0.788462 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,513 | uses_mu_missing_redirect_collection.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_mu_missing_redirect_collection.py | #!/usr/bin/python
from __future__ import annotations
from ..module_utils import missing_redirect_target_collection # pylint: disable=relative-beyond-top-level,unused-import
def main():
raise Exception('should never get here')
if __name__ == '__main__':
main()
| 274 | Python | .py | 7 | 36.285714 | 120 | 0.729008 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,514 | uses_collection_redirected_mu.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_collection_redirected_mu.py | #!/usr/bin/python
from __future__ import annotations
import json
import sys
from ansible_collections.testns.testcoll.plugins.module_utils.moved_out_root import importme
from ..module_utils.formerly_testcoll_pkg import thing as movedthing # pylint: disable=relative-beyond-top-level
from ..module_utils.formerly_testco... | 640 | Python | .py | 13 | 46.461538 | 130 | 0.770968 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,515 | ping.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/ping.py | #!/usr/bin/python
from __future__ import annotations
import json
def main():
print(json.dumps(dict(changed=False, source='user')))
if __name__ == '__main__':
main()
| 178 | Python | .py | 7 | 22.571429 | 57 | 0.662651 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,516 | uses_leaf_mu_module_import_from.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_leaf_mu_module_import_from.py | #!/usr/bin/python
from __future__ import annotations
import json
import sys
from ansible_collections.testns.testcoll.plugins.module_utils import leaf, secondary
# FIXME: this one needs pkginit synthesis to work
# from ansible_collections.testns.testcoll.plugins.module_utils.subpkg import submod
from ansible_collectio... | 1,334 | Python | .py | 23 | 46.26087 | 147 | 0.652607 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,517 | deprecated_ping.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/deprecated_ping.py | #!/usr/bin/python
from __future__ import annotations
import json
def main():
print(json.dumps(dict(changed=False, source='user', is_deprecated=True)))
if __name__ == '__main__':
main()
| 198 | Python | .py | 7 | 25.428571 | 77 | 0.677419 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,518 | uses_mu_missing.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_mu_missing.py | #!/usr/bin/python
from __future__ import annotations
from ..module_utils import bogusmu # pylint: disable=relative-beyond-top-level,unused-import
def main():
raise Exception('should never get here')
if __name__ == '__main__':
main()
| 247 | Python | .py | 7 | 32.428571 | 93 | 0.710638 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,519 | uses_base_mu_granular_nested_import.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_base_mu_granular_nested_import.py | #!/usr/bin/python
from __future__ import annotations
import json
import sys
from ansible_collections.testns.testcoll.plugins.module_utils.base import thingtocall
def main():
mu_result = thingtocall()
print(json.dumps(dict(changed=False, source='user', mu_result=mu_result)))
sys.exit()
if __name__ == ... | 343 | Python | .py | 11 | 28.090909 | 85 | 0.726154 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,520 | uses_core_redirected_mu.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_core_redirected_mu.py | #!/usr/bin/python
from __future__ import annotations
import json
import sys
from ansible.module_utils.formerly_core import thingtocall
def main():
mu_result = thingtocall()
print(json.dumps(dict(changed=False, source='user', mu_result=mu_result)))
sys.exit()
if __name__ == '__main__':
main()
| 316 | Python | .py | 11 | 25.636364 | 78 | 0.711409 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,521 | uses_leaf_mu_granular_import.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_leaf_mu_granular_import.py | #!/usr/bin/python
from __future__ import annotations
import json
import sys
from ansible_collections.testns.testcoll.plugins.module_utils.leaf import thingtocall as aliasedthing
def main():
mu_result = aliasedthing()
print(json.dumps(dict(changed=False, source='user', mu_result=mu_result)))
sys.exit()
... | 360 | Python | .py | 11 | 29.636364 | 101 | 0.733918 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,522 | uses_nested_same_as_module.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_nested_same_as_module.py | #!/usr/bin/python
from __future__ import annotations
import json
import sys
from ansible_collections.testns.testcoll.plugins.module_utils.nested_same.nested_same import nested_same
def main():
mu_result = nested_same.nested_same()
print(json.dumps(dict(changed=False, source='user', mu_result=mu_result)))
... | 374 | Python | .py | 11 | 30.909091 | 104 | 0.730337 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,523 | uses_mu_missing_redirect_module.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_mu_missing_redirect_module.py | #!/usr/bin/python
from __future__ import annotations
from ..module_utils import missing_redirect_target_module # pylint: disable=relative-beyond-top-level,unused-import
def main():
raise Exception('should never get here')
if __name__ == '__main__':
main()
| 270 | Python | .py | 7 | 35.714286 | 116 | 0.724806 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,524 | testmodule.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule.py | #!/usr/bin/python
from __future__ import annotations
import json
DOCUMENTATION = r"""
module: testmodule
description: for testing
extends_documentation_fragment:
- testns.testcoll.frag
- testns.testcoll.frag.other_documentation
"""
def main():
print(json.dumps(dict(changed=False, source='user')))
if __nam... | 350 | Python | .py | 14 | 22.714286 | 57 | 0.736364 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,525 | testmodule_bad_docfrags.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule_bad_docfrags.py | #!/usr/bin/python
from __future__ import annotations
import json
DOCUMENTATION = r"""
module: testmodule
description: for testing
extends_documentation_fragment:
- noncollbogusfrag
- noncollbogusfrag.bogusvar
- bogusns.testcoll.frag
- testns.boguscoll.frag
- testns.testcoll.bogusfrag
- testns.testcoll.fra... | 447 | Python | .py | 18 | 22.388889 | 57 | 0.747045 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,526 | subdir_ping_module.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/module_subdir/subdir_ping_module.py | #!/usr/bin/python
from __future__ import annotations
import json
def main():
print(json.dumps(dict(changed=False, source='user')))
if __name__ == '__main__':
main()
| 179 | Python | .py | 7 | 22.571429 | 57 | 0.662651 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,527 | secondary.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/module_utils/secondary.py | from __future__ import annotations
def thingtocall():
return "thingtocall in secondary"
| 94 | Python | .py | 3 | 28.333333 | 37 | 0.775281 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,528 | subpkg_with_init.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/module_utils/subpkg_with_init.py | # NB: this module should never be loaded, since we'll see the subpkg_with_init package dir first
from __future__ import annotations
def thingtocall():
raise Exception('this should never be called (loaded discrete module instead of package module)')
def anotherthingtocall():
raise Exception('this should neve... | 385 | Python | .py | 6 | 61.166667 | 101 | 0.786667 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,529 | base.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/module_utils/base.py | from __future__ import annotations
from ansible_collections.testns.testcoll.plugins.module_utils import secondary
import ansible_collections.testns.testcoll.plugins.module_utils.secondary
def thingtocall():
if secondary != ansible_collections.testns.testcoll.plugins.module_utils.secondary:
raise Exceptio... | 449 | Python | .py | 7 | 60.285714 | 123 | 0.817352 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,530 | leaf.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/module_utils/leaf.py | from __future__ import annotations
def thingtocall():
return "thingtocall in leaf"
| 89 | Python | .py | 3 | 26.666667 | 34 | 0.761905 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,531 | nested_same.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/module_utils/nested_same/nested_same/nested_same.py | from __future__ import annotations
def nested_same():
return 'hello from nested_same'
| 92 | Python | .py | 3 | 27.666667 | 35 | 0.747126 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,532 | __init__.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/module_utils/subpkg_with_init/__init__.py | from __future__ import annotations
# exercise relative imports in package init; they behave differently
from .mod_in_subpkg_with_init import thingtocall as submod_thingtocall
from ..subpkg.submod import thingtocall as cousin_submod_thingtocall # pylint: disable=relative-beyond-top-level
def thingtocall():
retur... | 356 | Python | .py | 6 | 57.166667 | 113 | 0.815562 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,533 | mod_in_subpkg_with_init.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/module_utils/subpkg_with_init/mod_in_subpkg_with_init.py | from __future__ import annotations
def thingtocall():
return "thingtocall in mod_in_subpkg_with_init"
| 108 | Python | .py | 3 | 33 | 51 | 0.76699 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,534 | submod.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/module_utils/subpkg/submod.py | from __future__ import annotations
def thingtocall():
return "thingtocall in subpkg.submod"
| 98 | Python | .py | 3 | 29.666667 | 41 | 0.774194 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,535 | mylookup.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/lookup/mylookup.py | from __future__ import annotations
from ansible.plugins.lookup import LookupBase
class LookupModule(LookupBase):
def run(self, terms, variables, **kwargs):
return ['mylookup_from_user_dir']
| 207 | Python | .py | 5 | 37 | 46 | 0.756345 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,536 | mylookup2.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/lookup/mylookup2.py | from __future__ import annotations
from ansible.plugins.lookup import LookupBase
class LookupModule(LookupBase):
def run(self, terms, variables, **kwargs):
return ['mylookup2_from_user_dir']
| 209 | Python | .py | 5 | 37.2 | 46 | 0.757576 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,537 | my_subdir_lookup.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/lookup/lookup_subdir/my_subdir_lookup.py | from __future__ import annotations
from ansible.plugins.lookup import LookupBase
class LookupModule(LookupBase):
def run(self, terms, variables, **kwargs):
return ['subdir_lookup_from_user_dir']
| 212 | Python | .py | 5 | 38 | 46 | 0.757426 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,538 | usercallback.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/callback/usercallback.py | from __future__ import annotations
from ansible.plugins.callback import CallbackBase
DOCUMENTATION = """
callback: usercallback
callback_type: notification
short_description: does stuff
description:
- does some stuff
"""
class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBA... | 618 | Python | .py | 18 | 29.277778 | 73 | 0.711636 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,539 | myfilters.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/filter/myfilters.py | from __future__ import annotations
def testfilter(data):
return "{0}_via_testfilter_from_userdir".format(data)
class FilterModule(object):
def filters(self):
return {
'testfilter': testfilter
}
| 235 | Python | .py | 8 | 23.25 | 57 | 0.666667 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,540 | myfilters2.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/filter/myfilters2.py | from __future__ import annotations
def testfilter2(data):
return "{0}_via_testfilter2_from_userdir".format(data)
class FilterModule(object):
def filters(self):
return {
'testfilter2': testfilter2
}
| 239 | Python | .py | 8 | 23.75 | 58 | 0.672566 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,541 | my_subdir_filters.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/filter/filter_subdir/my_subdir_filters.py | from __future__ import annotations
def test_subdir_filter(data):
return "{0}_via_testfilter_from_subdir".format(data)
class FilterModule(object):
def filters(self):
return {
'test_subdir_filter': test_subdir_filter
}
| 258 | Python | .py | 8 | 26.125 | 56 | 0.673469 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,542 | frag.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/doc_fragments/frag.py | from __future__ import annotations
class ModuleDocFragment(object):
DOCUMENTATION = r"""
options:
normal_doc_frag:
description:
- an option
"""
OTHER_DOCUMENTATION = r"""
options:
other_doc_frag:
description:
- another option
"""
| 261 | Python | .py | 14 | 15.428571 | 34 | 0.696721 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,543 | broken_filter.py | ansible_ansible/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testbroken/plugins/filter/broken_filter.py | from __future__ import annotations
class FilterModule(object):
def filters(self):
return {
'broken': lambda x: 'broken',
}
raise Exception('This is a broken filter plugin.')
| 211 | Python | .py | 7 | 23.857143 | 50 | 0.643216 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,544 | ping.py | ansible_ansible/test/integration/targets/collections/ansiballz_dupe/collections/ansible_collections/duplicate/name/plugins/modules/ping.py | #!/usr/bin/python
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
AnsibleModule({}).exit_json(ping='duplicate.name.pong')
| 163 | Python | .py | 4 | 39.5 | 55 | 0.803797 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,545 | override_formerly_core_masked_test.py | ansible_ansible/test/integration/targets/collections/test_plugins/override_formerly_core_masked_test.py | from __future__ import annotations
def override_formerly_core_masked_test(value, *args, **kwargs):
if value != 'hello override':
raise Exception('expected "hello override" only...')
return True
class TestModule(object):
def tests(self):
return {
'formerly_core_masked_test': ... | 365 | Python | .py | 10 | 30.2 | 75 | 0.671429 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,546 | testmodule2.py | ansible_ansible/test/integration/targets/collections/testcoll2/plugins/modules/testmodule2.py | #!/usr/bin/python
from __future__ import annotations
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
DOCUMENTATION = """
---
module: testmodule2
short_description: Test module
description:
- Test module
author:
- Ans... | 501 | Python | .py | 23 | 17.956522 | 56 | 0.616205 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,547 | sys_check.py | ansible_ansible/test/integration/targets/ansiballz_python/library/sys_check.py | #!/usr/bin/python
# https://github.com/ansible/ansible/issues/64664
# https://github.com/ansible/ansible/issues/64479
from __future__ import annotations
import sys
from ansible.module_utils.basic import AnsibleModule
def main():
module = AnsibleModule({})
this_module = sys.modules[__name__]
module.exi... | 438 | Python | .py | 14 | 27.714286 | 63 | 0.706731 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,548 | custom_module.py | ansible_ansible/test/integration/targets/ansiballz_python/library/custom_module.py | #!/usr/bin/python
from __future__ import annotations
from ..module_utils.basic import AnsibleModule # pylint: disable=relative-beyond-top-level
from ..module_utils.custom_util import forty_two # pylint: disable=relative-beyond-top-level
def main():
module = AnsibleModule(
argument_spec=dict()
)
... | 400 | Python | .py | 11 | 32.545455 | 93 | 0.709424 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,549 | check_rlimit_and_maxfd.py | ansible_ansible/test/integration/targets/ansiballz_python/library/check_rlimit_and_maxfd.py | #!/usr/bin/python
#
# Copyright 2018 Red Hat | Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
import resource
import subprocess
from ansible.module_utils.basic import AnsibleModule
def main():
module = AnsibleModule(
... | 640 | Python | .py | 20 | 27.9 | 95 | 0.719672 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,550 | import_pkg_resources.py | ansible_ansible/test/integration/targets/egg-info/lookup_plugins/import_pkg_resources.py | from __future__ import annotations
import pkg_resources # pylint: disable=unused-import
from ansible.plugins.lookup import LookupBase
class LookupModule(LookupBase):
def run(self, terms, variables, **kwargs):
return ['ok']
| 240 | Python | .py | 6 | 36.333333 | 53 | 0.76087 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,551 | dummy.py | ansible_ansible/test/integration/targets/loop-connection/collections/ansible_collections/ns/name/plugins/connection/dummy.py | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
DOCUMENTATION = """
name: dummy
short_description: Used for loop-connection tests
description:
- See above
author: ansible (@core)
"""
from ansible.errors import AnsibleError
from ansible.pl... | 1,209 | Python | .py | 36 | 27.388889 | 92 | 0.645941 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,552 | uninstall-Alpine-3-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/uninstall-Alpine-3-python-3.yml | - name: Uninstall Paramiko for Python 3 on Alpine
command: apk del py3-paramiko
| 82 | Python | .py | 2 | 39 | 49 | 0.7875 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,553 | uninstall-RedHat-8-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/uninstall-RedHat-8-python-3.yml | - name: Uninstall Paramiko for Python 3 on RHEL 8
pip: # no python3-paramiko package exists for RHEL 8
name: paramiko
state: absent
| 142 | Python | .py | 4 | 32 | 54 | 0.73913 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,554 | uninstall-zypper-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/uninstall-zypper-python-3.yml | - name: Uninstall Paramiko for Python 3 using zypper
command: zypper --quiet --non-interactive remove --clean-deps python3-paramiko
| 134 | Python | .py | 2 | 65 | 80 | 0.787879 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,555 | uninstall-Darwin-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/uninstall-Darwin-python-3.yml | - name: Uninstall Paramiko for Python 3 on MacOS
pip:
name: paramiko
state: absent
| 93 | Python | .py | 4 | 19.75 | 48 | 0.719101 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,556 | install-Alpine-3-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/install-Alpine-3-python-3.yml | - name: Install Paramiko for Python 3 on Alpine
command: apk add py3-paramiko
| 80 | Python | .py | 2 | 38 | 47 | 0.782051 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,557 | uninstall-RedHat-9-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/uninstall-RedHat-9-python-3.yml | - name: Uninstall Paramiko for Python 3 on RHEL 9
pip: # no python3-paramiko package exists for RHEL 9
name: paramiko
state: absent
- name: Revert the crypto-policy back to DEFAULT
command: update-crypto-policies --set DEFAULT
| 240 | Python | .py | 6 | 36.833333 | 54 | 0.759657 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,558 | install-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/install-python-3.yml | - name: Install Paramiko for Python 3
package:
name: python3-paramiko
| 76 | Python | .py | 3 | 22.333333 | 37 | 0.753425 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,559 | uninstall-FreeBSD-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/uninstall-FreeBSD-python-3.yml | - name: Uninstall Paramiko for Python 3 on FreeBSD
pip:
name: paramiko
state: absent
| 95 | Python | .py | 4 | 20.25 | 50 | 0.725275 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,560 | install-FreeBSD-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/install-FreeBSD-python-3.yml | - name: Setup remote constraints
include_tasks: setup-remote-constraints.yml
- name: Install Paramiko for Python 3 on FreeBSD
pip: # no package in pkg, just use pip
name: paramiko
extra_args: "-c {{ remote_constraints }}"
environment:
SETUPTOOLS_USE_DISTUTILS: stdlib
| 286 | Python | .py | 8 | 32.5 | 48 | 0.741007 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,561 | install-RedHat-9-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/install-RedHat-9-python-3.yml | - name: Setup remote constraints
include_tasks: setup-remote-constraints.yml
- name: Install Paramiko for Python 3 on RHEL 9
pip: # no python3-paramiko package exists for RHEL 9
name: paramiko
extra_args: "-c {{ remote_constraints }}"
- name: Drop the crypto-policy to LEGACY for these tests
command: upda... | 352 | Python | .py | 8 | 41.125 | 56 | 0.755102 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,562 | uninstall-apt-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/uninstall-apt-python-3.yml | - name: Uninstall Paramiko for Python 3 using apt
apt:
name: python3-paramiko
state: absent
autoremove: yes
| 122 | Python | .py | 5 | 20.6 | 49 | 0.726496 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,563 | install-Darwin-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/install-Darwin-python-3.yml | - name: Setup remote constraints
include_tasks: setup-remote-constraints.yml
- name: Install Paramiko for Python 3 on MacOS
pip: # no homebrew package manager in core, just use pip
name: paramiko
extra_args: "-c {{ remote_constraints }}"
environment:
# Not sure why this fixes the test, but it does.
... | 355 | Python | .py | 9 | 36 | 58 | 0.736994 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,564 | install-RedHat-8-python-3.yml | ansible_ansible/test/integration/targets/setup_paramiko/install-RedHat-8-python-3.yml | - name: Setup remote constraints
include_tasks: setup-remote-constraints.yml
- name: Install Paramiko for Python 3 on RHEL 8
pip: # no python3-paramiko package exists for RHEL 8
name: paramiko
extra_args: "-c {{ remote_constraints }}"
environment:
SETUPTOOLS_USE_DISTUTILS: stdlib
| 299 | Python | .py | 8 | 34.125 | 54 | 0.749141 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,565 | detect_paramiko.py | ansible_ansible/test/integration/targets/setup_paramiko/library/detect_paramiko.py | #!/usr/bin/python
"""Ansible module to detect the presence of both the normal and Ansible-specific versions of Paramiko."""
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
try:
import paramiko
except ImportError:
paramiko = None
try:
import ansible_paramiko
excep... | 630 | Python | .py | 21 | 25.904762 | 105 | 0.72 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,566 | async_test.py | ansible_ansible/test/integration/targets/async_fail/library/async_test.py | from __future__ import annotations
import json
import sys
import time
from ansible.module_utils.basic import AnsibleModule
def main():
if "--interactive" in sys.argv:
import ansible.module_utils.basic
ansible.module_utils.basic._ANSIBLE_ARGS = json.dumps(dict(
ANSIBLE_MODULE_ARGS=dic... | 1,334 | Python | .py | 37 | 27.513514 | 100 | 0.619345 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,567 | normal.py | ansible_ansible/test/integration/targets/async_fail/action_plugins/normal.py | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | 2,513 | Python | .py | 47 | 46.212766 | 105 | 0.691272 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,568 | create_repo.py | ansible_ansible/test/integration/targets/setup_rpm_repo/library/create_repo.py | #!/usr/bin/python
from __future__ import annotations
import tempfile
from dataclasses import dataclass
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.respawn import has_respawned, probe_interpreters_for_module, respawn_module
HAS_RPMFLUFF = True
try:
from rpmfluff.make i... | 3,960 | Python | .py | 96 | 34.927083 | 108 | 0.647535 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,569 | do-not-check-me.py | ansible_ansible/test/integration/targets/ansible-test-sanity-no-get-exception/ansible_collections/ns/col/do-not-check-me.py | from __future__ import annotations
from ansible.module_utils.pycompat24 import get_exception
def do_stuff():
get_exception()
| 132 | Python | .py | 4 | 30.25 | 57 | 0.792 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,570 | check-me.py | ansible_ansible/test/integration/targets/ansible-test-sanity-no-get-exception/ansible_collections/ns/col/plugins/modules/check-me.py | from __future__ import annotations
from ansible.module_utils.pycompat24 import get_exception
def do_stuff():
get_exception()
| 132 | Python | .py | 4 | 30.25 | 57 | 0.792 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,571 | fakelocal.py | ansible_ansible/test/integration/targets/delegate_to/connection_plugins/fakelocal.py | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
DOCUMENTATION = """
connection: fakelocal
short_description: dont execute anything
description:
- This connection plugin just verifies parameters passed in
author: an... | 2,426 | Python | .py | 55 | 36.309091 | 148 | 0.653339 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,572 | detect_interpreter.py | ansible_ansible/test/integration/targets/delegate_to/library/detect_interpreter.py | #!/usr/bin/python
from __future__ import annotations
import sys
from ansible.module_utils.basic import AnsibleModule
def main():
module = AnsibleModule(argument_spec={})
module.exit_json(**dict(found=sys.executable))
if __name__ == '__main__':
main()
| 271 | Python | .py | 9 | 26.888889 | 52 | 0.716535 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,573 | test-pause.py | ansible_ansible/test/integration/targets/pause/test-pause.py | #!/usr/bin/env python
from __future__ import annotations
import os
import pexpect
import sys
import termios
from ansible.module_utils.six import PY2
args = sys.argv[1:]
env_vars = {
'ANSIBLE_ROLES_PATH': './roles',
'ANSIBLE_NOCOLOR': 'True',
'ANSIBLE_RETRY_FILES_ENABLED': 'False'
}
try:
backspace ... | 7,823 | Python | .py | 258 | 28.065891 | 96 | 0.719537 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,574 | with_yml.py | ansible_ansible/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yml.py | # Copyright (c) 2024 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
from ansible.plugins.action import ActionBase
class ActionModule(ActionBase):
def run(self, tmp, task_vars):
return {"changed": False}
| 316 | Python | .py | 7 | 41.857143 | 92 | 0.75082 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,575 | with_py.py | ansible_ansible/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_py.py | # Copyright (c) 2024 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
from ansible.plugins.action import ActionBase
class ActionModule(ActionBase):
def run(self, tmp, task_vars):
return {"changed": False}
| 316 | Python | .py | 7 | 41.857143 | 92 | 0.75082 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,576 | with_yaml.py | ansible_ansible/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yaml.py | # Copyright (c) 2024 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
from ansible.plugins.action import ActionBase
class ActionModule(ActionBase):
def run(self, tmp, task_vars):
return {"changed": False}
| 316 | Python | .py | 7 | 41.857143 | 92 | 0.75082 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,577 | with_py.py | ansible_ansible/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_py.py | # Copyright (c) 2024 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
DOCUMENTATION = r"""
---
module: with_py
short_description: Short description
description: Long description
options: {}
author:
- Ansible Core Team (@ansible)
"""
EXAMPLES = r"""
- name:... | 370 | Python | .py | 16 | 21.6875 | 92 | 0.732194 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,578 | notyaml.py | ansible_ansible/test/integration/targets/rel_plugin_loading/subdir/inventory_plugins/notyaml.py | # Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
DOCUMENTATION = """
inventory: yaml
version_added: "2.4"
short_description: Uses a specific YAML file as an inventory source.
description... | 6,766 | Python | .py | 137 | 36.751825 | 152 | 0.588663 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,579 | ping.py | ansible_ansible/test/integration/targets/module_precedence/multiple_roles/foo/library/ping.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... | 2,181 | Python | .py | 59 | 33.135593 | 96 | 0.697774 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,580 | ping.py | ansible_ansible/test/integration/targets/module_precedence/multiple_roles/bar/library/ping.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... | 2,181 | Python | .py | 59 | 33.135593 | 96 | 0.697774 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,581 | ping.py | ansible_ansible/test/integration/targets/module_precedence/roles_with_extension/foo/library/ping.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... | 2,181 | Python | .py | 59 | 33.135593 | 96 | 0.697774 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,582 | a.py | ansible_ansible/test/integration/targets/module_precedence/roles_with_extension/foo/library/a.py | #!/usr/bin/python
from __future__ import annotations
import json
def main():
print(json.dumps(dict(changed=False, location='role: foo, a.py')))
if __name__ == '__main__':
main()
| 191 | Python | .py | 7 | 24.428571 | 70 | 0.659218 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,583 | ping.py | ansible_ansible/test/integration/targets/module_precedence/lib_with_extension/ping.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... | 2,179 | Python | .py | 59 | 33.101695 | 96 | 0.698435 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,584 | a.py | ansible_ansible/test/integration/targets/module_precedence/lib_with_extension/a.py | #!/usr/bin/python
from __future__ import annotations
import json
def main():
print(json.dumps(dict(changed=False, location='a.py')))
if __name__ == '__main__':
main()
| 180 | Python | .py | 7 | 22.857143 | 59 | 0.660714 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,585 | callback_debug.py | ansible_ansible/test/integration/targets/support-callback_plugins/callback_plugins/callback_debug.py | # (c) 2020 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
import functools
from ansible.plugins.callback import CallbackBase
class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'stdout'
... | 731 | Python | .py | 16 | 40.1875 | 92 | 0.683168 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,586 | legit.py | ansible_ansible/test/integration/targets/module_utils/collections/ansible_collections/testns/testcoll/plugins/module_utils/legit.py | from __future__ import annotations
def importme():
return "successfully imported from testns.testcoll"
| 109 | Python | .py | 3 | 33.333333 | 55 | 0.788462 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,587 | ansible_release.py | ansible_ansible/test/integration/targets/module_utils/module_utils/ansible_release.py | # This file overrides the builtin ansible.module_utils.ansible_release file
# to test that it can be overridden. Previously this was facts.py but caused issues
# with dependencies that may need to execute a module that makes use of facts
data = 'overridden ansible_release.py'
| 277 | Python | .py | 4 | 68.25 | 83 | 0.809524 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,588 | test_override.py | ansible_ansible/test/integration/targets/module_utils/library/test_override.py | #!/usr/bin/python
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
# overridden
from ansible.module_utils.ansible_release import data
results = {"data": data}
AnsibleModule(argument_spec=dict()).exit_json(**results)
| 258 | Python | .py | 7 | 35.428571 | 56 | 0.806452 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,589 | test_network.py | ansible_ansible/test/integration/targets/module_utils/library/test_network.py | #!/usr/bin/python
# Copyright: (c) 2021, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.network import to_subnet
def main():
mod... | 740 | Python | .py | 18 | 36.055556 | 96 | 0.677419 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,590 | test.py | ansible_ansible/test/integration/targets/module_utils/library/test.py | #!/usr/bin/python
# Most of these names are only available via PluginLoader so pylint doesn't
# know they exist
# pylint: disable=no-name-in-module
from __future__ import annotations
results = {}
# Test import with no from
import ansible.module_utils.foo0
results['foo0'] = ansible.module_utils.foo0.data
# Test depth... | 2,992 | Python | .py | 66 | 44.015152 | 94 | 0.787608 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,591 | test_cwd_unreadable.py | ansible_ansible/test/integration/targets/module_utils/library/test_cwd_unreadable.py | #!/usr/bin/python
from __future__ import annotations
import os
from ansible.module_utils.basic import AnsibleModule
def main():
# This module verifies that AnsibleModule works when cwd exists but is unreadable.
# This situation can occur when running tasks as an unprivileged user.
try:
cwd = os... | 746 | Python | .py | 19 | 33.842105 | 86 | 0.688456 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,592 | test_recursive_diff.py | ansible_ansible/test/integration/targets/module_utils/library/test_recursive_diff.py | #!/usr/bin/python
# Copyright: (c) 2020, Matt Martz <matt@sivel.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.dict_transformations import recursi... | 643 | Python | .py | 21 | 24.52381 | 92 | 0.604878 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,593 | test_failure.py | ansible_ansible/test/integration/targets/module_utils/library/test_failure.py | #!/usr/bin/python
from __future__ import annotations
results = {}
# Test that we are rooted correctly
# Following files:
# module_utils/yak/zebra/foo.py
from ansible.module_utils.zebra import foo4
results['zebra'] = foo4.data
from ansible.module_utils.basic import AnsibleModule
AnsibleModule(argument_spec=dict()).... | 341 | Python | .py | 10 | 32.8 | 56 | 0.789634 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,594 | test_optional.py | ansible_ansible/test/integration/targets/module_utils/library/test_optional.py | #!/usr/bin/python
# Most of these names are only available via PluginLoader so pylint doesn't
# know they exist
# pylint: disable=no-name-in-module
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
# internal constants to keep pylint from griping about constant-valued conditional... | 2,643 | Python | .py | 67 | 34.925373 | 119 | 0.751953 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,595 | test_datetime.py | ansible_ansible/test/integration/targets/module_utils/library/test_datetime.py | #!/usr/bin/python
# Most of these names are only available via PluginLoader so pylint doesn't
# know they exist
# pylint: disable=no-name-in-module
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
import datetime
module = AnsibleModule(argument_spec=dict(
datetime=dict(type=... | 606 | Python | .py | 16 | 35.75 | 95 | 0.739796 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,596 | test_env_override.py | ansible_ansible/test/integration/targets/module_utils/library/test_env_override.py | #!/usr/bin/python
# Most of these names are only available via PluginLoader so pylint doesn't
# know they exist
# pylint: disable=no-name-in-module
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.json_utils import data
from ansible.module_utils.mork imp... | 451 | Python | .py | 10 | 43.8 | 75 | 0.796804 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,597 | test_no_log.py | ansible_ansible/test/integration/targets/module_utils/library/test_no_log.py | #!/usr/bin/python
# (c) 2021 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule, env_fallback
def main():
module = AnsibleModule(
argument_spec=dict(
... | 1,144 | Python | .py | 26 | 33.769231 | 113 | 0.577477 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,598 | test_cwd_missing.py | ansible_ansible/test/integration/targets/module_utils/library/test_cwd_missing.py | #!/usr/bin/python
from __future__ import annotations
import os
from ansible.module_utils.basic import AnsibleModule
def main():
# This module verifies that AnsibleModule works when cwd does not exist.
# This situation can occur as a race condition when the following conditions are met:
#
# 1) Execut... | 1,252 | Python | .py | 23 | 50.086957 | 145 | 0.746721 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,599 | test_heuristic_log_sanitize.py | ansible_ansible/test/integration/targets/module_utils/library/test_heuristic_log_sanitize.py | #!/usr/bin/python
from __future__ import annotations
from ansible.module_utils import basic
from ansible.module_utils.basic import AnsibleModule
heuristic_log_sanitize = basic.heuristic_log_sanitize
def heuristic_log_sanitize_spy(*args, **kwargs):
heuristic_log_sanitize_spy.return_value = heuristic_log_sanitiz... | 1,520 | Python | .py | 37 | 35.27027 | 85 | 0.684139 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |