{"id":15673578,"url":"https://github.com/alancoding/callback-testing-playbooks","last_synced_at":"2025-10-10T07:20:12.666Z","repository":{"id":144899438,"uuid":"129401352","full_name":"AlanCoding/callback-testing-playbooks","owner":"AlanCoding","description":"Tests that are directly copied from a suite of AWX tests, directly importable into AWX","archived":false,"fork":false,"pushed_at":"2018-04-18T14:05:37.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T08:08:54.773Z","etag":null,"topics":["ansible","ansible-playbook","awx"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlanCoding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-13T12:46:56.000Z","updated_at":"2018-04-18T14:05:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f1c2112-7c1a-4b91-9b46-adec08866705","html_url":"https://github.com/AlanCoding/callback-testing-playbooks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanCoding%2Fcallback-testing-playbooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanCoding%2Fcallback-testing-playbooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanCoding%2Fcallback-testing-playbooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanCoding%2Fcallback-testing-playbooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlanCoding","download_url":"https://codeload.github.com/AlanCoding/callback-testing-playbooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246281216,"owners_count":20752207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-playbook","awx"],"created_at":"2024-10-03T15:41:19.497Z","updated_at":"2025-10-10T07:20:07.645Z","avatar_url":"https://github.com/AlanCoding.png","language":"Python","readme":"### Playbooks from callback plugin tests\n\nThis repo has playbooks that are used in fixtures inside of `awx/lib/tests/`\ninside of the AWX source control.\n\n#### How do I re-generate these?\n\nInsert the following code at the end of the file `test_display_callback.py`\nin that test directory, and then simply run\n`python awx/lib/tests/test_display_callback.py` inside of the AWX container,\nfrom the project root (assuming dev setup).\n\n\n```python\nBASE_DIR = 'callback-testing-playbooks'\nnames = [test_name for test_name in locals().keys() if test_name.startswith('test_')]\nfor name in names:\n    print('')\n    print('Processing test {}'.format(name))\n    bare_name = name[len('test_callback_plugin_'):]\n    if not os.path.exists('{}/{}'.format(BASE_DIR, bare_name)):\n        os.makedirs('{}/{}'.format(BASE_DIR, bare_name))\n    the_test = locals()[name]\n    inputs = the_test.parametrize.args[1]\n    for input in inputs:\n        for k, v in input.items():\n            filename = '{}/{}/{}'.format(BASE_DIR, bare_name, k)\n            print('  Writing file {}'.format(filename))\n            if not os.path.exists(filename):\n                with open(filename, 'w') as f:\n                    f.write(v)\n```\n\nIn order to make a PR against this repo, you probably want to do this\nat the base folder of your AWX clone on your personal computer:\n\n```\ngit clone https://github.com/AlanCoding/callback-testing-playbooks.git\n```\n\nThen, with the above code pasted into the test file, run the python file,\nand assuming `BASE_DIR` is kept the same, it should produce a meaningful\ndiff with updates to the playbooks.\n\n#### How do I run these inside of AWX\n\nYou need to install tower-cli and configure your login.\nYou need a user with a username `admin`, and you must, yourself, be a\nsuperuser.\n\n```\npython run.py\n```\n\nThat should create and run job templates for these playbooks.\n\n(making new commit, ignore)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falancoding%2Fcallback-testing-playbooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falancoding%2Fcallback-testing-playbooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falancoding%2Fcallback-testing-playbooks/lists"}