AIStoreHub Package Vault: Ansible
Package Slug: ansible
Archetype: agent
Upstream Repository: https://github.com/ansible/ansible
Workspace Files & Specifications (68 files)
- .claude/skills/azp-logs/SKILL.md (3298 bytes)
--- name: azp-logs description: Download Azure Pipelines CI logs for analysis argument-hint: <pr_number|build_id|build_url> allowed-tools: [Bash(gh pr view:*), Bash(gh pr checks:*), Bash(ls:*), Read, Grep] user-invocable: true --- Azure Pipelines Logs Downloader ================================ Download Azure Pipelines CI logs for analyzing test failures and CI issues. **IMPORTANT**: Always ask the user before downloading logs. The download may take 5-10 minutes (or longer for large CI runs) depending on the number of jobs and log size. Usage ----- ```bash /azp-logs <pr_number|build_id|build_url> ``` Arguments --------- - `pr_number`: GitHub PR number (will extract build ID from latest CI run) - `build_id`: Azure Pipelines build ID (numeric) - `build_url`: Full Azure Pipelines URL (e.g., <https://dev.azure.com/ansible/ansible/_build/results?buildId=12345>) Implementation -------------- This command uses the existing `hacking/azp/download.py` script to download CI logs. **Before running**: Always confirm with the user before downloading logs. Inform them that: - The download may take 5-10 minutes for a full CI run (potentially longer for very large runs) - Logs will be saved to a directory named after the build ID - The download size can be 10-50MB depending on the number of jobs Process Steps ------------- 1. **Ask user for confirmation**: Explain what will be downloaded and estimated time 2. **Determine build ID**: - If given a PR number: Use `gh pr checks <number>` to get the Azure Pipelines URL - If given a URL: Pass it directly to download.py (it extracts buildId automatically) - If given a build ID: Use directly 3. **Download logs**: Run `hacking/azp/download.py` with appropriate flags: ```bash ./hacking/azp/download.py <build_id_or_url> --console-logs -v ``` 4. **Analyze logs**: After download completes, examine logs in `<build_id>/` directory: - Grep for common failure patterns: `FAILED`, `ERROR`, `Traceback` - Focus on logs from failed jobs (check job names) - Compare with ansibot comments for context Download Script Options ----------------------- The `hacking/azp/download.py` script supports: - `--console-logs`: Download console logs (recommended for CI failure analysis) - `--artifacts`: Download test artifacts - `--run-metadata`: Download run metadata JSON - `--all`: Download everything - `--match-job-name <regex>`: Filter to specific jobs - `--match-artifact-name <regex>`: Filter to specific artifacts - `-v, --verbose`: Show what is being downloaded - `-t, --test`: Dry run (show what would be downloaded) For most CI failure analysis, use `--console-logs` to get the log files. Common Analysis Patterns ------------------------ After downloading logs to `<build_id>/` directory: ```bash # Find all errors and failures grep -r "FAILED\|ERROR\|Traceback" <build_id>/ # Find specific test failures grep -r "FAILED test" <build_id>/ # Find sanity test failures grep -r "The test" <build_id>/ | grep -i "failed" # List all downloaded log files ls -lh <build_id>/ ``` Notes ----- - Logs are downloaded to a directory named after the build ID - Console logs are named after the job hierarchy (e.g., "Job Name Stage Name.log") - The Ansible project is public, so no authentication is required
- .claude/skills/context/SKILL.md (1708 bytes)
--- name: context description: Load Ansible project development guidelines, testing conventions, PR review processes, and code structure reference into context user-invocable: true --- # System Instructions When this skill is invoked, read the AGENTS.md file from the repository root (`@../../../AGENTS.md`) and load its content into context. This provides comprehensive Ansible development guidelines. After loading AGENTS.md, provide the user with confirmation that the context has been loaded and is available for answering questions or guiding development work. If AGENTS.md cannot be found, inform the user and suggest they may be in a directory without the full ansible-core repository. ## Usage Invoke this skill to load Ansible development context: ```claude /context ``` The skill provides all guidelines and conventions that would normally be in AGENTS.md, making them available even when working outside the ansible-core repository or in environments where AGENTS.md is not accessible. ## When to Use - Working on Ansible-related code outside the main repository - Skills that need Ansible context but run in plugin marketplace - Quick reference for Ansible testing/PR conventions - Ensuring consistent approach to Ansible development ## What This Skill Does This skill is informational only - it loads comprehensive Ansible development knowledge into context but performs no actions. After invocation, all subsequent responses will have access to: - Testing commands - PR review processes and checklists - Licensing requirements - Code style conventions - Repository structure - CI workflows All this knowledge becomes available for answering questions or guiding development work.
- .claude/skills/creating-backports/SKILL.md (4759 bytes)
--- name: creating-backports description: Create backports of a GitHub pull request that has merged into the devel branch in the upstream repository user-invocable: true --- Creating Backports ================== Backport creation workflow --------------------------- ```text Backporting Progress: - [ ] Step 1: Verify the referenced pull request - [ ] Step 2: Identify the git remote for the upstream repository - [ ] Step 3: Determine the stable branches for the backport - [ ] Step 4: Create the backport branches - [ ] Step 5: Create pull requests - [ ] Step 6: Summarize the work ``` Step 1: Verify the referenced pull request ------------------------------------------- Use `gh pr view <number>` to verify the PR is merged into devel and get the merge commit SHA: `gh pr view <number> --json mergeCommit -q .mergeCommit.oid` Abort if the PR is not merged or merged to wrong branch. Step 2: Identify the git remote for the upstream repository ------------------------------------------------------------ Identify the upstream remote (typically named `upstream`). If it doesn't exist, offer to create it. Sync the local devel branch with the identified upstream remote: - `git fetch <upstream_remote>` - `git checkout devel` - `git pull --rebase <upstream_remote> devel` Step 3: Determine the stable branches for the backport ------------------------------------------------------- Refer to the backport policy in `context/contributing.md`: - Bug fixes: backported to latest stable only - Critical bug fixes: backported to latest and previous stable - Security issues: must be reported to [email protected] privately (not via GitHub) Ask the user what type of fix this is and confirm the target branches before proceeding. To identify available stable branches, run: `git ls-remote --heads <upstream_remote> 'refs/heads/stable-*'` Step 4: Create the backport branches ------------------------------------- Before creating backport branches, verify you're not on a branch you want to keep (the workflow will create and switch between multiple branches). First, ensure stable branches are up to date: - Run `git fetch <upstream_remote>` to get latest stable branch refs The backport process consists of these steps: 1. Create a new branch for each stable branch: `git checkout -b backport/VERSION/PR_NUMBER <upstream_remote>/STABLE_BRANCH` Example: `git checkout -b backport/2.20/1234 upstream/stable-2.20` (if upstream remote is named `upstream`) 2. Cherry-pick the MERGE commit from the referenced pull request into each branch using the `-x` option. (The merge commit SHA was obtained in Step 1 with `gh pr view`) Example: `git cherry-pick -x <merge_commit_sha>` If merge conflicts are encountered: - Run `git cherry-pick --abort` to abort the cherry-pick - Notify the user that manual conflict resolution is required for this stable branch - Explain the user can either: a) Manually resolve conflicts (you can help guide them) b) Skip this stable branch backport - Do NOT continue with remaining branches if conflicts occur - wait for user direction 3. Before pushing, identify the user's fork remote: - Typically named `origin` - Verify with `git remote -v` that it points to the user's fork, not upstream - Confirm the remote name before pushing 4. Push each backport branch to the user's fork remote (identified in step 3, typically `origin`): `git push <fork_remote> backport/VERSION/PR_NUMBER` Example: `git push origin backport/2.20/1234` (if fork remote is named `origin`) Never push to the upstream remote - this would push directly to the upstream repository. Step 5: Create pull requests ----------------------------- Confirm with the user that they would like to create a pull request for each backport branch. Use `gh pr create` for each branch: - `--base STABLE_BRANCH_NAME` (the stable branch being backported to) - `--title "[STABLE_BRANCH_NAME] ORIGINAL_PR_TITLE"` - `--body "Backport of PR #XXXX\n\n(cherry picked from commit COMMIT_HASH)"` Example: `gh pr create --base stable-2.20 --title "[stable-2.20] Fix bug in module" --body "Backport of PR #1234\n\n(cherry picked from commit abc123)"` Step 6: Summarize the work --------------------------- Give the user a summary of the backports that were created. The summary must provide a list of the URL links to all pull requests that were created. Error Recovery -------------- If errors occur during the backport process: - **Cherry-pick conflicts**: List which branches succeeded and which failed due to conflicts - **PR creation failures**: Clean up any orphaned branches that weren't converted to PRs - **Partial success**: Summarize what succeeded and offer to retry failed branches individually
- .claude/skills/review/SKILL.md (2277 bytes)
--- name: review description: Review an Ansible PR following the project's standardized process from CLAUDE.md argument-hint: <pr_number> allowed-tools: [TodoWrite, Bash(gh pr view:*), Bash(gh pr diff:*), Bash(gh pr checkout:*), Bash(gh pr checks:*), Read, Grep, Glob, Search] user-invocable: true --- PR Review Command ================= Review an Ansible PR following the project's standardized process from `CLAUDE.md`. Usage ----- ```bash /review <pr_number> ``` Arguments --------- - `pr_number` (required): The GitHub PR number to review Implementation -------------- This command implements the PR Review Guidelines documented in the `PR Review Guidelines` section of CLAUDE.md. Review Process Steps -------------------- The command follows these numbered steps from CLAUDE.md: 1. **Create TodoWrite list** for systematic review tracking 2. **Get PR details**: `gh pr view <number>` to understand scope, motivation and the desired outcome 3. **Get PR diff**: `gh pr diff <number>` to see all changes 4. **Check required components FIRST**: - Verify changelog fragment exists in `changelogs/fragments/` - Verify changelog uses correct section (check `changelogs/config.yaml`) - Verify tests exist and specifically cover the changed code paths - Unit tests should be pytest style, and functional rather than tightly coupled to mocking - Integration tests required for almost all plugin changes 5. **Checkout PR branch**: `gh pr checkout <number>` to examine code holistically 6. **Review existing feedback**: `gh pr view <number> --comments` for all comments and previous reviews 7. **Verify all issues addressed**: Ensure bot failures, reviewer requests, and discussion points are resolved 8. **Call out unresolved feedback**: Explicitly mention any discussions/requests that remain unaddressed Critical Review Elements ------------------------ - **Licensing**: Verify GPLv3/BSD-2-Clause compatibility for any new dependencies - **Test scope**: Tests must exercise actual changed code, not just add random coverage - **Changelog validation**: Fragment structure follows sections defined in `changelogs/config.yaml` Each step is tracked in TodoWrite for visibility and systematic completion. A review round should not exceed 20 feedback items.
- AGENTS.md (7212 bytes)
# AGENTS.md This file provides guidance to Claude Code (claude.ai/code) and other compatible agentic tools when working with code in this repository. **Note:** This file is for AI assistant use only. For human developers, see the [Ansible Developer Guide](https://docs.ansible.com/ansible-core/devel/dev_guide/index.html). ## ⚠️ IMPORTANT: Always Start Here **BEFORE starting any PR review or development task:** 1. **Read this file first** - Don't work from memory or assumptions 2. **Read all [context](context) files** for the project's coding conventions and policies 3. **Use TodoWrite** to create a task list and track progress systematically 4. **Follow the numbered steps** in the relevant process sections 5. **Reference Quick Reference** for correct commands and patterns ## ⚠️ CRITICAL: Licensing Requirements **NEVER suggest, recommend, or approve code that violates the project's [licensing requirements](context/licensing.md).** Always verify any new dependencies or suggested libraries are license-compatible. This is non-negotiable -- licensing violations can create serious legal issues for the project. ## General Principles When reviewing code, don't flag issues that `ansible-test sanity` already catches. Focus review effort on things automated checks can't verify. ## Attribution Agents should disclose their involvement in contributions. We recommend using an `Assisted-by:` commit trailer identifying the AI tool that assisted. ## Quick Reference ```bash # PR Review and CI gh pr view <number> # Get PR details gh pr view <number> --comments # Check for ansibot CI failures gh pr checks <number> # Get Azure Pipelines URLs gh pr checkout <number> # Switch to PR branch gh pr diff <number> # See all changes /azp-logs <number> # Download CI logs for PR ``` **Critical Reminders:** - **Licensing**: See [Licensing Requirements](context/licensing.md) - GPLv3/BSD-2-Clause only - **Testing**: See [running-tests](context/running-tests.md) for `ansible-test` commands and container selection ## Helping Developers with CI Failures When developers submit PRs and encounter CI failures, use these approaches to help diagnose and resolve issues: **1. Check for ansibot comments:** ```bash # Get all PR comments to find ansibot CI failure reports gh pr view <number> --comments ``` Look for comments from `ansibot` that contain: - Test failure details with specific error messages - File paths and line numbers for failures - Links to sanity test documentation (e.g., `[explain](https://docs.ansible.com/...`) **2. Get CI check status and URLs:** ```bash # See all CI check results with Azure Pipelines URLs gh pr checks <number> ``` This shows: - Overall CI status (pass/fail) with timing - Direct links to Azure DevOps build results - Individual job results (Sanity Test 1/2, Docker tests, Units, etc.) **3. CI failure analysis workflow:** 1. Check ansibot comments first for immediate error details 2. Use `gh pr checks <number>` to get Azure Pipelines URLs for detailed logs 3. Focus on failed jobs (marked as `fail`) and examine their specific error output 4. For sanity test failures, the error messages usually indicate exactly what needs to be fixed 5. For test failures, run the same tests locally using `ansible-test` to reproduce and debug **4. Downloading Azure Pipelines logs for analysis:** When CI failures need deeper investigation beyond what's visible in ansibot comments or the web UI, use the `/azp-logs` skill: ```bash # Download logs using PR number (automatically finds latest build) /azp-logs <pr_number> # Or use build ID directly from gh pr checks output /azp-logs <build_id> # Or use the full Azure Pipelines URL /azp-logs https://dev.azure.com/ansible/ansible/_build/results?buildId=12345 ``` The skill uses `hacking/azp/download.py` to download console logs into a directory named after the build ID. **After downloading, analyze the logs:** - Grep for common failure patterns: `grep -r "FAILED\|ERROR\|Traceback" <build_id>/` - Focus on logs from failed jobs identified in `gh pr checks` output - Compare error messages with ansibot comments to get full context - Sanity test failures usually have clear error messages with file:line references - Integration/unit test failures may require examining full test output and tracebacks **Advanced usage:** The download script supports filtering and customization: ```bash # Download only logs matching specific job names ./hacking/azp/download.py <build_id> --console-logs --match-job-name "Sanity.*" # Download artifacts and metadata too ./hacking/azp/download.py <build_id> --all ``` See `.claude/skills/azp-logs/SKILL.md` for complete documentation. ## PR Review Guidelines ### PR Review Checklist Use this checklist for EVERY PR review: ```text □ Created TodoWrite list for review steps □ Step 1: Get PR details with gh pr view <number> □ Step 2: Get PR diff with gh pr diff <number> □ Step 3: Check required components (changelog, tests) □ Step 4: Checkout PR branch with gh pr checkout <number> □ Step 5: Review existing feedback with gh pr view <number> --comments □ Step 6: Verify all issues addressed □ Step 7: Call out any unresolved feedback □ Mark each TodoWrite item as completed when done ``` When assisting with PR reviews, verify: - Changelog fragment exists (see [changelog requirements](context/documentation-standards.md#changelog-requirements)) - Appropriate tests are included (see [test expectations](context/writing-tests.md#test-expectations-for-pull-requests)) ### Review Process Follow these steps in order for thorough PR reviews: 1. **Get PR details**: Use `gh pr view <number>` to understand the PR scope and description 2. **Get PR diff**: Use `gh pr diff <number>` to see all changes 3. **Check required components FIRST** (changelog and tests -- see links above) 4. **Checkout PR branch**: Use `gh pr checkout <number>` to examine code holistically with changes applied 5. **Review existing feedback**: Use `gh pr view <number> --comments` to see all comments and previous review feedback 6. **Verify all issues addressed**: Ensure all bot failures, reviewer requests, and discussion points are resolved 7. **Call out any unresolved review feedback**: Explicitly mention any discussions or requests that remain unaddressed ### Review Task Management - Use TodoWrite tool to track review steps for complex PRs - Mark tasks as in_progress when actively working on them - Complete tasks immediately after finishing each step - This provides visibility to users about review progress ### Review Tools - `gh pr view <number>` - Get PR details and description - `gh pr view <number> --comments` - See all comments and review feedback - `gh pr diff <number>` - Get complete diff of changes - `gh pr checkout <number>` - Switch to PR branch for holistic examination - `Read` tool - Examine specific changed files in detail - `Grep` tool - Search for related code patterns or test coverage (uses ripgrep/rg)
- aistorehub.json (693 bytes)
{ "name": "Ansible", "slug": "ansible", "version": "1.0.0", "type": "agent", "description": "Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.", "owner": "community", "repository": "catalog", "github_repo_url": "https://github.com/ansible/ansible", "tags": [ "trending", "ansible", "python", "github", "open-source" ], "imported_at": "2026-11-21T23:56:32.967Z" } - changelogs/changelog.yaml (30 bytes)
ancestor: 2.22.0 releases: {} - changelogs/config.yaml (737 bytes)
--- title: ansible-core release_tag_re: '(v(?:[\d.ab\-]|rc)+)' pre_release_tag_re: '(?P<pre_release>(?:[ab]|rc)+\d*)$' changes_file: changelog.yaml changes_format: combined keep_fragments: true always_refresh: true ignore_other_fragment_extensions: true mention_ancestor: false notesdir: fragments prelude_section_name: release_summary new_plugins_after_name: removed_features sections: - ['major_changes', 'Major Changes'] - ['minor_changes', 'Minor Changes'] - ['breaking_changes', 'Breaking Changes / Porting Guide'] - ['deprecated_features', 'Deprecated Features'] - ['removed_features', 'Removed Features (previously deprecated)'] - ['security_fixes', 'Security Fixes'] - ['bugfixes', 'Bugfixes'] - ['known_issues', 'Known Issues']
- changelogs/fragments/84793-map-restart-to-onerestart-for-freebsd.yml (199 bytes)
bugfixes: - service - disabled services were not restarting. Using ``state=restarted`` on FreeBSD and DragonflyBSD now restarts disabled services (https://github.com/ansible/ansible/issues/84793).
- changelogs/fragments/85703-pause-tcgetpgrp-oserror.yml (198 bytes)
bugfixes: - pause - Fix ``[Errno 25] Inappropriate ioctl for device`` failures by treating a tty with no controlling terminal as non-interactive (https://github.com/ansible/ansible/issues/85703).
- changelogs/fragments/86741-acme.yml (577 bytes)
minor_changes: - "ansible-test acme cloud plugin - update to the 2.4.1 ACME test image, and add new variables ``acme_endpoint_root_ca_certificate_content``, ``acme_endpoint_root_ca_certificate_filename``, and ``acme_directory`` to the ACME cloud plugin. The ``acme_host`` variable is now consistently set to ``pebble``, which is covered by the certificate the ACME endpoint is using. There are now also module defaults set for ``group/acme``, which define ``acme_version``, ``acme_directory``, and ``ca_path`` (https://github.com/ansible/ansible/pull/86741)." - changelogs/fragments/87415-set-host-facts-copy.yml (144 bytes)
bugfixes: - ansible_facts - initial facts from ``run_once`` tasks no longer reference the same object and can be updated for individual hosts
- changelogs/fragments/87508-freebsd-jail-virtualization-detection.yml (494 bytes)
bugfixes: - ansible_virtualization_role and ansible_virtualization_type facts - do not misreport FreeBSD jails running on a bhyve host as ``bhyve``/``host``. The kldstat(8) hypervisor probe now only runs when the target is not itself a guest, since a jail shares the host kernel and ``kldstat -q -m vmm`` succeeds inside the jail, previously overwriting the jail facts (``jails``/``guest``) with the host's bhyve facts (https://github.com/ansible/ansible/pull/85767). - changelogs/fragments/87557-double-spaces.yml (508 bytes)
minor_changes: - pip - remove double spaces in output message (https://github.com/ansible/ansible/pull/87557). - service - remove double spaces in output message (https://github.com/ansible/ansible/pull/87557). - ansible.utils.hashing.md5, ansible.utils.hashing.md5s - remove double spaces in exception message (https://github.com/ansible/ansible/pull/87557). - ansible.module_utils.basic.AnsibleModule.md5 - remove double spaces in exception message (https://github.com/ansible/ansible/pull/87557).
- changelogs/fragments/87624-no-log-non-string-defaults.yml (182 bytes)
bugfixes: - argspec validation - fix a crash when an option with ``no_log`` had a default or fallback value that is not a string (https://github.com/ansible/ansible/issues/87623).
- changelogs/fragments/87652-find-prune.yml (135 bytes)
minor_changes: - find - add ``prune`` option to skip directories during traversal (https://github.com/ansible/ansible/issues/87652).
- changelogs/fragments/87719-urls-follow-redirects-yes-no.yml (263 bytes)
bugfixes: - "``module_utils.urls`` - restore support for the ``yes`` and ``no`` values of ``follow_redirects`` which were accidentally removed for direct callers of ``open_url``, ``fetch_url`` and ``Request`` (https://github.com/ansible/ansible/issues/87719)"
- changelogs/fragments/87841-distribution-facts.yml (326 bytes)
bugfixes: - setup - classify Anolis OS as part of the ``RedHat`` OS family while preserving the reported distribution name and version. - setup - classify Alibaba Cloud Linux as part of the ``RedHat`` OS family while preserving the reported distribution name and version (https://github.com/ansible/ansible/issues/87841).
- changelogs/fragments/87912-crypt-data-struct-size.yml (215 bytes)
bugfixes: - password hashing - correct the size of the ``crypt_data`` structure passed to ``crypt_r``, which was too small for the glibc definition and could allow the library to write past the end of the buffer.
- changelogs/fragments/ansible-controller-python-version-check.yml (182 bytes)
minor_changes: - CLI - Removed the minimum Python version check. - ansible - Added a minimum and maximum Python version check which can be bypassed with an environment variable.
- changelogs/fragments/ansible-doc-list-non-string-short-description.yml (259 bytes)
bugfixes: - ansible-doc - ``--list`` no longer fails for every plugin when one plugin's ``short_description`` is not a string; it warns and lists that plugin as ``INVALID SHORT DESCRIPTION`` (https://github.com/ansible-collections/google.cloud/issues/789).
- changelogs/fragments/ansible-galaxy-collection-check-path-containment.yml (174 bytes)
security_fixes: - >- ``ansible-galaxy collection install`` - fix validating ``FILES.json`` entries are contained in the collection before creating them. (CVE-2026-89091)
- changelogs/fragments/ansible-galaxy-role-name-containment.yml (146 bytes)
security_fixes: - >- ``ansible-galaxy role install`` - fix validating the role name is contained to the configured role path. (CVE-2026-105929)
- changelogs/fragments/ansible-test-default-containers.yml (75 bytes)
minor_changes: - ansible-test - Updated the base and default containers.
- changelogs/fragments/ansible-test-distro-containers.yml (60 bytes)
minor_changes: - ansible-test - Update distro containers.
- changelogs/fragments/ansible-test-fedora.yml (89 bytes)
minor_changes: - ansible-test - Replace Fedora 44 remote and container with Fedora 45.
- changelogs/fragments/ansible-test-integration-include-arg.yml (242 bytes)
bugfixes: - ansible-test - Fix the ``--include`` option for integration tests. Previously this option accepted an argument but could be overridden by positional argument processing. (https://github.com/ansible/ansible/issues/87839) - changelogs/fragments/ansible-test-pip.yml (73 bytes)
minor_changes: - ansible-test - Update the pip version used to 26.2.2.
- changelogs/fragments/ansible-test-pytest-plugins.yml (101 bytes)
bugfixes: - ansible-test - Load pytest plugins using full package names to avoid naming conflicts.
- changelogs/fragments/ansible-test-sanity-import-stub.yml (217 bytes)
bugfixes: - ansible-test - A stub for the ``ansible`` module is now generated for non-controller code before it is imported. Previously it was replaced with a stub after initially being imported. - changelogs/fragments/ansible-test-sanity-pylint-plugins.yml (112 bytes)
bugfixes: - ansible-test - Load pylint plugins using their full name to avoid conflicts with code under test.
- changelogs/fragments/ansible-test-sanity-requirements.yml (71 bytes)
minor_changes: - ansible-test - Update the sanity test requirements.
- changelogs/fragments/ansible-test-utility-containers.yml (61 bytes)
minor_changes: - ansible-test - Update utility containers.
- changelogs/fragments/cron-executable.yml (197 bytes)
minor_changes: - cron - add an ``executable`` option to allow specifying an explicit executable or pathname for the ``crontab`` command (https://github.com/ansible/ansible/issues/85584). - changelogs/fragments/distribution-sl-micro-transactional.yml (234 bytes)
bugfixes: - >- distribution facts - report SLES Immutable and openSUSE Leap Immutable under their own name instead of ``SL-Micro``. Only SUSE Linux Micro is reported as ``SL-Micro`` when ``VARIANT_ID`` is ``transactional``. - changelogs/fragments/ensure_conn_cli_dir_perms.yml (227 bytes)
bugfixes: - ansible-connection - ensure that the connection persistent directory has private permissions. This covers the corner case in which the preceding directories do not exist or do not have private enough permissions.
- changelogs/fragments/git_fixes.yml (117 bytes)
bugfixes: - git module - updated to avoid possible incorrect parameters read from the repo targets. CVE-2026-84503
- changelogs/fragments/mask_url_except.yml (100 bytes)
bugfixes: - module_utils.mask_url - handle exceptions on parseurl to avoid disclosing url itself.
- changelogs/fragments/network-ipv6-prefix-short-zero-run.yml (319 bytes)
bugfixes: - module_utils.common.network - ``to_ipv6_subnet()`` and ``to_ipv6_network()`` no longer drop the groups that follow ``::`` when ``::`` replaces fewer zero groups than the prefix needs. For example, ``to_ipv6_subnet('2001:db8::1:2:3:4:5')`` now returns ``2001:db8:0:1::`` instead of ``2001:db8::``. - changelogs/fragments/pkg-mgr-rosa-mos-dnf.yml (256 bytes)
--- bugfixes: - pkg_mgr fact - detect dnf as the default package manager on ROSA Linux and its derivative MOS. The legacy urpmi may still be installed and used to win the generic package manager detection (https://github.com/ansible/ansible/pull/87687).
- changelogs/fragments/python-support.yml (106 bytes)
major_changes: - ansible - Drop support for Python 3.9. - ansible-test - Drop support for Python 3.9.
- changelogs/fragments/rc_fail_inference.yml (411 bytes)
deprecated_features: - task result - Inferred task failure from a non-zero ``rc`` key and absence of a ``failed`` key emits a runtime deprecation warning. Actions and modules must explicitly communicate failure by setting the ``failed`` key, using APIs that do so, or raising an unhandled exception. In ansible-core 2.24, the ``rc`` key will receive no special handling during task result processing. - changelogs/fragments/redact-already-decrypted.yml (252 bytes)
bugfixes: - transform_to_native_types - Redaction behavior now applies to individually vaulted values that have already been decrypted. Previously it only applied to values not yet decrypted. (https://github.com/ansible/ansible/issues/85783) - changelogs/fragments/shellbase_update.yml (206 bytes)
minor_changes: - ShellBase class - Switched to use uuid for the remote temporary directory bugfixes: - ShellBase class - The basename method no longer trims the left side (significant) of the path base
- changelogs/fragments/show-content-redact-chain.yml (498 bytes)
bugfixes: - >- errors - when any exception in an error's cause chain was raised with ``show_content=False``, the annotated source lines are now redacted for every exception in the chain, not just the one that requested it. Previously the outer exceptions wrapping it, such as the task or template error, still displayed the source lines and could reveal the content the inner error deemed sensitive. The origin (file, line, and column) is still shown so the error can be located. - changelogs/fragments/sudo_moar_rs.yml (84 bytes)
bugfixes: - sudo become plugin, sudo-rs compatibility fix for non english locales
- changelogs/fragments/user-busybox-empty-groups.yml (113 bytes)
bugfixes: - user - properly remove all group memberships when ``groups`` is set to an empty string on BusyBox.
- changelogs/fragments/user-busybox-password-lock.yml (119 bytes)
bugfixes: - user - On BusyBox systems, preserve the existing password lock marker when ``password_lock`` is omitted.
- changelogs/fragments/validate-collection-name-from-artifact-metadata.yml (157 bytes)
security_fixes: - ansible-galaxy collection install - fix validating the collection name before using it to build the installation path. (CVE-2026-130644)
- changelogs/fragments/winrm-extras.yml (572 bytes)
minor_changes: - winrm - Removed the connection plugin extras variable lookup. All ``ansible_winrm_*`` variables that were previously passed through to pywinrm are now explicitly documented connection plugin options with the same variable names. Existing inventories should continue to work unchanged. deprecated_features: - winrm - The ``credssp_disable_tlsv1_2`` option (``ansible_winrm_credssp_disable_tlsv1_2``) is deprecated and will be removed in ansible-core 2.26. All supported Windows versions support TLSv1.2 so there is no reason to disable it. - changelogs/README.md (383 bytes)
Changelogs ========== As part of the release process a version-specific `CHANGELOG-vX.Y.rst` will be generated from fragments in the `fragments` directory. On release branches once a release has been created, consult the branch's version-specific file for changes that have occurred in that branch. The `devel` branch does not have a generated changelog, only changelog fragments.
- CLAUDE.md (56 bytes)
- @AGENTS.md - @~/.claude/ansible.md - @CLAUDE.local.md
- context/ci.md (325 bytes)
# Continuous integration ## Common failure patterns - **Sanity failures**: Usually have specific fixes (trailing whitespace, import errors, etc.). - **Integration test failures**: May require platform-specific containers or test adjustments. - **Unit test failures**: Often indicate actual code issues that need debugging.
- context/code-structure.md (2436 bytes)
# Core structure - `lib/ansible/` - Main Ansible library code. - `cli/` - Command-line interface implementations (ansible, ansible-playbook, etc.). - `executor/` - Task execution engine and strategies (includes PowerShell support in `powershell/`). - `inventory/` - Inventory management and parsing. - `modules/` - Core modules (built-in automation modules). - `module_utils/` - Shared utilities for modules (includes C# in `csharp/` and PowerShell in `powershell/`). - `plugins/` - Plugin framework (filters, tests, lookups, etc.). - `vars/` - Variable management. - `config/` - Configuration handling. - `collections/` - Ansible Collections framework. ## Key components - **CLI Layer**: Entry points in `lib/ansible/cli/` handle command parsing and dispatch. - **Executor**: `lib/ansible/executor/` contains the core execution engine that runs tasks and plays. - **Module System**: Modules in `lib/ansible/modules/` are the units of work; they're executed remotely. - **Plugin Architecture**: `lib/ansible/plugins/` provides extensibility through filters, tests, lookups, etc. - **Inventory**: `lib/ansible/inventory/` manages host and group definitions. - **Collections**: Modern packaging format for distributing Ansible content. ## Plugin development - New plugins should go into collections, not ansible-core. - ansible-core rarely accepts new plugins; core team makes these decisions. ## Import restrictions - `lib/ansible/modules/` can only import from `lib/ansible/module_utils/` (modules are packaged for remote execution). - `lib/ansible/module_utils/` cannot import from outside itself. ## Resource embedding Modules that need to execute code on Python versions outside the normal module_utils range can use `EmbedManager.embed()` from `ansible.module_utils.embed` to bundle standalone scripts into the AnsiballZ payload. Embedded resources go in `lib/ansible/module_utils/_embed/`. ## Testing infrastructure - `test/units/` - Unit tests mirroring the lib structure. - `test/integration/` - Integration tests organized by target (named after plugin/functionality being tested). - Some targets have `context/controller` or `context/target` in their `aliases` file when not easily inferable. - Only modules run on target hosts; all other plugins execute locally in the ansible process. - `test/lib/` - Test utilities and frameworks. - `ansible-test` - Unified testing tool for all test types.
- context/coding-style.md (3192 bytes)
# Coding style and syntax For new code and updates to existing code, including unit tests. In general, prefer newer Python features as they become available. A feature is available when the minimum supported Python version for the code being written supports it, and it doesn't conflict with other supported versions. ## Python version support - Controller code: minimum version defined in `pyproject.toml` (`requires-python`). - Modules/module_utils: minimum version in `lib/ansible/module_utils/basic.py` (`_PY_MIN`). - Modules support a wider Python version range than controller code. - Supported Python versions for testing are defined within `ansible-test`. ## Dependencies - Prefer Python stdlib over external dependencies. - Use existing code from within the Ansible project. ## Markdown Markdown files use [GitHub Flavored Markdown](https://github.github.com/gfm/) (verified by the "pymarkdown" sanity test). Use dashes (`-`) for unordered list items, not asterisks. End list items with periods. ## ASCII characters - Use ASCII quotes (`'` and `"`) instead of Unicode smart quotes (verified by the "no-smart-quotes" sanity test). - Use ASCII dashes (`-` or `--`) instead of em dashes. ## Line length The line limit is 160 characters. ## Trailing whitespace Don't leave trailing whitespace on lines. ## Docstrings Explain what the annotated code does, but don't create structured entries for parameters. Don't document parameter types in docstrings -- use type hints instead. Anything considered a public API must have a docstring. Internal code should, and it often makes sense for unit tests, too. ## Line breaks in source text Try to stick to one sentence per line in text like docstrings, comments and changelog fragments. ## Native type annotations Use native type hints with `from __future__ import annotations` (verified by the "boilerplate" sanity test). Include type annotations on function/method arguments and return types, unless the annotation becomes too complex (e.g. `TypedDict`). The "mypy" sanity test only performs type checking on annotated functions/methods. Prefer PEP 695 type parameter syntax over `TypeVar` and `ParamSpec` declarations. For example, use `def foo[T](x: T) -> T` instead of declaring `T = TypeVar('T')` separately. This does not apply to `module_utils/` code, which must support older Python versions that lack the feature. ## Format strings Use f-strings instead of `%` strings or `str.format`, except for logging where formatting is deferred. ## Quoting strings Use the `!r` format qualifier to quote a value instead of manually quoting. Example: `f"A string with a {quoted!r} value."` ## Code formatting check/fix for internals The `black` sanity test runs against all `_internal` packages, using default settings with an increased line length of 160 and no quote conversion. Use `ansible-test` to automatically apply required formatting changes. Example: `ansible-test sanity --test black --fix` ## Import ordering in modules The E402 pycodestyle rule (module level import not at top) is ignored. In `lib/ansible/modules/`, imports must come after the `DOCUMENTATION`, `EXAMPLES`, and `RETURN` definitions. - context/contributing.md (1037 bytes)
# Contributing ## Keep changes focused Changes should be limited to what's necessary to solve the problem at hand. Avoid unrelated reformatting, refactoring, or style adjustments in the same change. Unfocused changes make review harder by increasing the diff size and obscuring the important parts. They can also lead to unnecessary back-and-forth around style and preferences. ## Branch and release management - All PRs target the `devel` branch. - Use GitHub templates when creating issues/PRs (`.github/ISSUE_TEMPLATE/` and `.github/PULL_REQUEST_TEMPLATE/`). - For issues: fill out the `component` field with project root relative file path. - For PRs: adjust the issue type in the template as listed in `.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md`. - Validate issues are fixed in `devel` before reporting against stable releases. - Bug fixes: backported to latest stable only. - Critical bug fixes: backported to latest and previous stable. - Security issues: contact [email protected] privately, not via GitHub.
- context/data-tagging.md (810 bytes)
# Data tagging ## How not to break things Avoid unnecessary mutation of values, such as calling `str.strip` or `to_text`, etc. as these will drop tags, losing things like origin and trust for templating. When mutation of a value is necessary, carefully consider which tags, if any, need to be propagated to the resulting value. ## When tags must be removed Some APIs don't understand tagged types and can't automatically treat them as their untagged equivalents. This includes C-implemented Python APIs that perform exact type checks, serialization libraries that reject derived types, and any interface where the consumer expects or requires plain types. In these cases, use `transform_to_native_types()` from `ansible.utils.vars` to convert tagged values to native types before passing them to the API.
- context/deprecation.md (426 bytes)
# Backward compatibility and deprecation Backward compatibility is prioritized over most other concerns. ## Deprecation cycle - Deprecation cycle: 4 releases (deprecation + 2 releases + removal). - Removal version: current version in `lib/ansible/release.py` plus 3. - Example: deprecating in 2.19 means removal in 2.22. ## Deprecating code Use `Display.deprecated` or `AnsibleModule.deprecate` with the removal version.
- context/dev-environment.md (658 bytes)
# Development environment setup ansible-core and all CLIs (including ansible-test) require a POSIX OS. On Windows, use WSL (Windows Subsystem for Linux). ## Editable install Ansible development typically uses an editable installation after forking and cloning: ```bash pip install -e . ``` ## Hacking script An alternative to an editable installation is to source the `hacking/env-setup` script: ```bash source hacking/env-setup ``` ## Running tests without installation If you only need to run tests, you can invoke `ansible-test` directly without installing or sourcing the hacking script: ```bash bin/ansible-test sanity -v --docker default ```
- context/documentation-standards.md (2574 bytes)
# Documentation standards ## Module and plugin documentation - Modules and plugins require `DOCUMENTATION`, `EXAMPLES`, and `RETURN` blocks as static YAML string variables. - These blocks cannot be dynamically generated -- they are parsed via AST/token parsing. - Alternative: "sidecar" documentation as `.yml` files with same stem name adjacent to plugin files. - All modules should have a `main()` function and `if __name__ == '__main__':` block. - Use `version_added` fields in documentation following existing version format patterns. - Filter, test, and lookup plugins should declare positional arguments using the `positional` key in `DOCUMENTATION`. ## Markup in plugin documentation blocks Plugin `DOCUMENTATION`, `EXAMPLES`, and `RETURN` blocks use Ansible-specific markup, not reStructuredText or Markdown. ### Semantic markup - `O(name)` -- option name, optionally with a value: `O(state=present)`. - `V(value)` -- option value mentioned alone: `V(present)`. - `RV(name)` -- return value name, optionally with a value: `RV(changed=true)`. - `E(name)` -- environment variable: `E(ANSIBLE_CONFIG)`. Suboptions use dot-separated paths: `O(foo.bar)`. Backslash escaping is supported inside these macros. ### Formatting - `C()` -- monospace/code text. Example: `This works like the unix command C(grep).`. - `B()` -- bold text. - `I()` -- italic text. `C()`, `B()`, and `I()` do not support escaping, so they cannot contain `)`. Use `V()` instead of `C()` when the value may contain `)`. ### Linking - `M(ansible.builtin.copy)` -- link to a module (FQCN required). - `P(ansible.builtin.file#lookup)` -- link to a plugin (FQCN and type required). - `L(title,https://example.com)` -- link with custom title. - `U(https://example.com)` -- bare URL. - `R(title,rst_anchor)` -- cross-reference to an RST anchor. `O()` and `RV()` can also link to options/return values in other plugins using the syntax `O(ansible.builtin.copy#module:src)`. ## Changelog requirements - Changes require entries in `changelogs/fragments/` as YAML files. - Create a new fragment file per PR (never reuse existing fragments to avoid merge conflicts). - Fragment structure follows sections defined in `changelogs/config.yaml` under the `sections` key. - Verify changelog fragments use a valid section from `changelogs/config.yaml`. - Naming: `{issue_number}-{short-description}.yml` or `{component}-{description}.yml` if no issue. - Format: `- {component} - {description} ({optional URL to GH issue})`. - Content supports Sphinx markup (use double backticks for code references). - context/error-handling.md (4244 bytes)
# Error handling ## Tracebacks Do not manually generate tracebacks for errors or warnings. Standardized traceback capture is included for errors, warnings and deprecation warnings for both controller and module code (Python). See the `DISPLAY_TRACEBACK` config option for details on how to enable traceback capture and display. ## In modules In most cases, just raise an exception. The AnsiballZ wrapper now provides a general exception handler for Python modules, making use of `fail_json` unnecessary, unless the module result needs to be customized. Calls to the various Python-module-side `warn` and `deprecate` methods/functions will also capture and marshal tracebacks to the controller when enabled. When using `fail_json` to customize a module failure result, passing the `exception` argument to provide the currently active exception is unnecessary. ## Deferred exceptions in modules When deferring exceptions in modules using `try/except` and `fail_json`, pass the captured `Exception` instance to `fail_json` using the `exception` argument. The error handling infrastructure will handle collection of error details and traceback formatting. ## Exception context Raising exceptions while another exception is active will cause the active exception to become the `__context__` for the newly raised exception. This is usually not the intended behavior, and should be reserved for unexpected errors while handling the original exception. In most cases a `raise from` is desired, either with `None` to suppress the original exception if it's not helpful, or with the captured exception to set it as the `__cause__` for the newly raised exception. Suppression example: `raise Exception("something") from None` Cause example: `raise Exception("something") from ex` ## Raising new exceptions Don't catch exceptions just to re-raise them, unless there's additional information that can be added in the newly raised exception. In most cases, particularly for plugin/module failures, contextual information is automatically added, making granular `try/except/raise` within the plugin or module unnecessary. ## Error messages Do not repeat previous exception messages when constructing new exceptions. Anti-pattern: `raise Exception("it broke: {ex}") from ex` The built-in error chain handling mechanisms in Ansible will include the messages from cause/context exceptions automatically. In general, error messages passed to exceptions should be a fairly terse description of what happened, and not contain extra diagnostic, contextual, or prescriptive correction advice (see `obj` and `help_text` below for more on that). ## When and how to use AnsibleError The `AnsibleError` exception type provides support for improved error reporting. However, if no arguments other than a message are given, there's usually no benefit over using built-in exception types. So what are those other arguments? - `obj` - Usually a variable responsible for the error being raised -- not an `Exception` instance. If this value is `Origin` tagged, then the error message shown to the user will be able to provide context showing what content triggered the error. - `help_text` - Instructions and additional detail that helps the user understand how to resolve the error. By putting that information here, it allows the `message` to be shorter and focus on the problem. This information will be shown *after* the contextual error details provided by `obj`, if any. ## Display warnings and errors The existing `warning` and `deprecated` methods on the `Display` object now support passing optional `help_text` and `obj` arguments, matching those on `AnsibleError` for prescriptive guidance and source context from `Origin`-tagged values. Additionally, the new `error_as_warning` method accepts an exception object and an optional contextual message directly, allowing for a caught exception to be converted to a warning automatically while still preserving the exception detail, traceback, and source object context (where applicable). ## Jinja plugin errors In Jinja plugins, the `AnsibleFilterError` and `AnsibleLookupError` exception types are no longer needed. Instead, use whatever exception type is appropriate for the error condition. - context/licensing.md (323 bytes)
# Licensing requirements - **ansible-core**: All code must be **GPLv3 compatible**. - **lib/ansible/module_utils/**: Defaults to **BSD-2-Clause** (more permissive). - **External dependencies**: Only use libraries compatible with these licenses. - **When in doubt**: Ask about licensing compatibility rather than assuming.
- context/README.md (1654 bytes)
# Context for Humans and Agents This directory contains information about developing ansible-core. It should be equally applicable to both humans and agents. This is **not** the place for: - **Documentation on how to use Ansible** -- see the [ansible-documentation](https://github.com/ansible/ansible-documentation/) repository. - **Learning how to develop content for Ansible** (modules, plugins, collections, roles, etc.) -- see the [Ansible Developer Guide](https://docs.ansible.com/ansible/devel/dev_guide/index.html). - **Agent-specific instructions or guidance** -- see [AGENTS.md](../AGENTS.md). ## Table of Contents - [contributing](contributing.md) - Contributing changes to ansible-core. - [licensing](licensing.md) - Licensing requirements. - [dev-environment](dev-environment.md) - Development environment setup. - [code-structure](code-structure.md) - Directory layout, key components, import restrictions, and plugin policy. - [coding-style](coding-style.md) - Python versions, dependencies, code formatting, and syntax conventions. - [error-handling](error-handling.md) - Error and exception handling patterns. - [data-tagging](data-tagging.md) - Working with data tags. - [public-api](public-api.md) - Public surface area and internal-by-default conventions. - [documentation-standards](documentation-standards.md) - Module/plugin documentation and changelog requirements. - [running-tests](running-tests.md) - Running tests with ansible-test. - [writing-tests](writing-tests.md) - Test expectations for pull requests. - [deprecation](deprecation.md) - Backward compatibility and deprecation. - [ci](ci.md) - Continuous integration.
- INSTRUCTIONS.md (2277 bytes)
--- name: review description: Review an Ansible PR following the project's standardized process from CLAUDE.md argument-hint: <pr_number> allowed-tools: [TodoWrite, Bash(gh pr view:*), Bash(gh pr diff:*), Bash(gh pr checkout:*), Bash(gh pr checks:*), Read, Grep, Glob, Search] user-invocable: true --- PR Review Command ================= Review an Ansible PR following the project's standardized process from `CLAUDE.md`. Usage ----- ```bash /review <pr_number> ``` Arguments --------- - `pr_number` (required): The GitHub PR number to review Implementation -------------- This command implements the PR Review Guidelines documented in the `PR Review Guidelines` section of CLAUDE.md. Review Process Steps -------------------- The command follows these numbered steps from CLAUDE.md: 1. **Create TodoWrite list** for systematic review tracking 2. **Get PR details**: `gh pr view <number>` to understand scope, motivation and the desired outcome 3. **Get PR diff**: `gh pr diff <number>` to see all changes 4. **Check required components FIRST**: - Verify changelog fragment exists in `changelogs/fragments/` - Verify changelog uses correct section (check `changelogs/config.yaml`) - Verify tests exist and specifically cover the changed code paths - Unit tests should be pytest style, and functional rather than tightly coupled to mocking - Integration tests required for almost all plugin changes 5. **Checkout PR branch**: `gh pr checkout <number>` to examine code holistically 6. **Review existing feedback**: `gh pr view <number> --comments` for all comments and previous reviews 7. **Verify all issues addressed**: Ensure bot failures, reviewer requests, and discussion points are resolved 8. **Call out unresolved feedback**: Explicitly mention any discussions/requests that remain unaddressed Critical Review Elements ------------------------ - **Licensing**: Verify GPLv3/BSD-2-Clause compatibility for any new dependencies - **Test scope**: Tests must exercise actual changed code, not just add random coverage - **Changelog validation**: Fragment structure follows sections defined in `changelogs/config.yaml` Each step is tracked in TodoWrite for visibility and systematic completion. A review round should not exceed 20 feedback items.
- pyproject.toml (3500 bytes)
[build-system] requires = ["setuptools >= 77.0.3, <= 80.3.1"] # lower bound to support license/license-files (PEP 639), upper bound for latest version tested at release build-backend = "setuptools.build_meta" [project] requires-python = ">=3.13" name = "ansible-core" authors = [ {name = "Ansible Project"}, ] description = "Radically simple IT automation" readme = "README.md" license = "GPL-3.0-or-later" license-files = [ "COPYING", "licenses/*.txt", ] classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.15", "Programming Language :: Python :: 3 :: Only", "Topic :: System :: Installation/Setup", "Topic :: System :: Systems Administration", "Topic :: Utilities", ] dynamic = ["version", "dependencies"] [project.urls] "Homepage" = "https://ansible.com/" "Source Code" = "https://github.com/ansible/ansible/" "Bug Tracker" = "https://github.com/ansible/ansible/issues/" "CI: Azure Pipelines" = "https://dev.azure.com/ansible/ansible/" "Documentation" = "https://docs.ansible.com/ansible-core/" "Code of Conduct" = "https://docs.ansible.com/ansible/latest/community/code_of_conduct.html" [tool.setuptools.dynamic] version = {attr = "ansible.release.__version__"} dependencies = {file = "requirements.txt"} [tool.setuptools] include-package-data = false [tool.setuptools.packages.find] where = ["lib", "test/lib"] [tool.setuptools.package-data] ansible = [ "_internal/ansible_collections/*/*/plugins/*/*.yml", "_internal/ansible_collections/*/*/*.md", "config/*.yml", "executor/powershell/*.ps1", "galaxy/data/COPYING", "galaxy/data/*.yml", "galaxy/data/*/*.j2", "galaxy/data/*/*.md", "galaxy/data/*/*/*.cfg", "galaxy/data/*/*/*.j2", "galaxy/data/*/*/*.md", "galaxy/data/*/*/*/*.j2", "galaxy/data/*/*/*/*.yml", "galaxy/data/*/*/*/.git_keep", "galaxy/data/*/*/*/inventory", "galaxy/data/*/*/.git_keep", "galaxy/data/*/*/inventory", "keyword_desc.yml", "module_utils/csharp/*.cs", "module_utils/powershell/*.psm1", "plugins/*/*.yml", ] ansible_test = [ "_data/*/*.in", "_data/*/*.ps1", "_data/*/*.txt", "_data/*/*.yml", "_data/*/*/*.ini", "_data/ansible.cfg", "_data/coveragerc", "_util/*/*/*.ps1", "_util/*/*/*.py", "_util/*/*/*.sh", "_util/*/*/*/*.ini", "_util/*/*/*/*.json", "_util/*/*/*/*.ps1", "_util/*/*/*/*.psd1", "_util/*/*/*/*.py", "_util/*/*/*/*.txt", "_util/*/*/*/*/*.cfg", "_util/*/*/*/*/*.ps1", "_util/*/*/*/*/*.py", "_util/*/*/*/*/*.yml", "config/*.template", "config/*.yml", ] [project.scripts] ansible = "ansible.cli.adhoc:main" ansible-config = "ansible.cli.config:main" ansible-console = "ansible.cli.console:main" ansible-doc = "ansible.cli.doc:main" ansible-galaxy = "ansible.cli.galaxy:main" ansible-inventory = "ansible.cli.inventory:main" ansible-playbook = "ansible.cli.playbook:main" ansible-pull = "ansible.cli.pull:main" ansible-vault = "ansible.cli.vault:main" ansible-test = "ansible_test._util.target.cli.ansible_test_cli_stub:main" - README.md (6154 bytes)
[](https://pypi.org/project/ansible-core) [](https://docs.ansible.com/ansible/latest/) [](https://docs.ansible.com/ansible/devel/community/communication.html#real-time-chat) [](https://docs.ansible.com/ansible/devel/community/communication.html#forum) [](https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=devel) [](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html) [][copying] [](https://bestpractices.coreinfrastructure.org/projects/2372) # Ansible Ansible is a radically simple IT automation system. It handles configuration management, application deployment, cloud provisioning, ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex changes like zero-downtime rolling updates with load balancers easy. More information on the Ansible [website](https://ansible.com/). ## Design Principles * Have an extremely simple setup process with a minimal learning curve. * Manage machines quickly and in parallel. * Avoid custom-agents and additional open ports, be agentless by leveraging the existing SSH daemon. * Describe infrastructure in a language that is both machine and human friendly. * Focus on security and easy auditability/review/rewriting of content. * Manage new remote machines instantly, without bootstrapping any software. * Allow module development in any dynamic language, not just Python. * Be usable as non-root. * Be the easiest IT automation system to use, ever. ## Use Ansible You can install a released version of Ansible with `pip` or a package manager. See our [installation guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for details on installing Ansible on a variety of platforms. Power users and developers can run the `devel` branch, which has the latest features and fixes, directly. Although it is reasonably stable, you are more likely to encounter breaking changes when running the `devel` branch. We recommend getting involved in the Ansible community if you want to run the `devel` branch. ## Communication Join the Ansible forum to ask questions, get help, and interact with the community. * [Get Help](https://forum.ansible.com/c/help/6): Find help or share your Ansible knowledge to help others. Use tags to filter and subscribe to posts, such as the following: * Posts tagged with [ansible](https://forum.ansible.com/tag/ansible) * Posts tagged with [ansible-core](https://forum.ansible.com/tag/ansible-core) * Posts tagged with [playbook](https://forum.ansible.com/tag/playbook) * [Social Spaces](https://forum.ansible.com/c/chat/4): Meet and interact with fellow enthusiasts. * [News & Announcements](https://forum.ansible.com/c/news/5): Track project-wide announcements including social events. * [Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn): Get release announcements and important changes. For more ways to get in touch, see [Communicating with the Ansible community](https://docs.ansible.com/ansible/devel/community/communication.html). ## Contribute to Ansible * Check out the [Contributor's Guide](https://github.com/ansible/ansible/blob/devel/.github/CONTRIBUTING.md). * Read [Community Information](https://docs.ansible.com/ansible/devel/community) for all kinds of ways to contribute to and interact with the project, including how to submit bug reports and code to Ansible. * Submit a proposed code update through a pull request to the `devel` branch. * Talk to us before making larger changes to avoid duplicate efforts. This not only helps everyone know what is going on, but it also helps save time and effort if we decide some changes are needed. ## Coding Guidelines Development context for ansible-core can be found in the [context](context/) directory. We also document our Coding Guidelines in the [Developer Guide](https://docs.ansible.com/ansible/devel/dev_guide/). We particularly suggest you review: * [Contributing your module to Ansible](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_checklist.html) * [Conventions, tips, and pitfalls](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_best_practices.html) ## Branch Info * The `devel` branch corresponds to the release actively under development. * The `stable-2.X` branches correspond to stable releases. * Create a branch based on `devel` and set up a [dev environment](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_general.html#common-environment-setup) if you want to open a PR. * See the [Ansible release and maintenance](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) page for information about active branches. ## Roadmap Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8). The [Ansible Roadmap page](https://docs.ansible.com/ansible/devel/roadmap/) details what is planned and how to influence the roadmap. ## Authors Ansible was created by [Michael DeHaan](https://github.com/mpdehaan) and has contributions from over 5000 users (and growing). Thanks everyone! This project is substantially coded by humans. [Ansible](https://www.ansible.com) is sponsored by [Red Hat, Inc.](https://www.redhat.com) ## License GNU General Public License v3.0 or later See [COPYING] to see the full text. [copying]: https://github.com/ansible/ansible/blob/devel/COPYING
- requirements.txt (884 bytes)
# Note: this requirements.txt file is used to specify what dependencies are # needed to make the package run rather than for deployment of a tested set of # packages. Thus, this should be the loosest set possible (only required # packages, not optional ones, and with the widest range of versions that could # be suitable) jinja2 >= 3.1.0 # Jinja2 native macro support fixed in 3.1.0 PyYAML >= 5.1 # PyYAML 5.1 is required for Python 3.8+ support cryptography packaging # NOTE: resolvelib 0.x version bumps should be considered major/breaking # NOTE: and we should update the upper cap with care, at least until 1.0 # NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69 # NOTE: When updating the upper bound, also update the latest version used # NOTE: in the ansible-galaxy-collection test suite. resolvelib >= 0.8.0, < 2.0.0 # dependency resolver used by ansible-galaxy
- SKILL.md (3298 bytes)
--- name: azp-logs description: Download Azure Pipelines CI logs for analysis argument-hint: <pr_number|build_id|build_url> allowed-tools: [Bash(gh pr view:*), Bash(gh pr checks:*), Bash(ls:*), Read, Grep] user-invocable: true --- Azure Pipelines Logs Downloader ================================ Download Azure Pipelines CI logs for analyzing test failures and CI issues. **IMPORTANT**: Always ask the user before downloading logs. The download may take 5-10 minutes (or longer for large CI runs) depending on the number of jobs and log size. Usage ----- ```bash /azp-logs <pr_number|build_id|build_url> ``` Arguments --------- - `pr_number`: GitHub PR number (will extract build ID from latest CI run) - `build_id`: Azure Pipelines build ID (numeric) - `build_url`: Full Azure Pipelines URL (e.g., <https://dev.azure.com/ansible/ansible/_build/results?buildId=12345>) Implementation -------------- This command uses the existing `hacking/azp/download.py` script to download CI logs. **Before running**: Always confirm with the user before downloading logs. Inform them that: - The download may take 5-10 minutes for a full CI run (potentially longer for very large runs) - Logs will be saved to a directory named after the build ID - The download size can be 10-50MB depending on the number of jobs Process Steps ------------- 1. **Ask user for confirmation**: Explain what will be downloaded and estimated time 2. **Determine build ID**: - If given a PR number: Use `gh pr checks <number>` to get the Azure Pipelines URL - If given a URL: Pass it directly to download.py (it extracts buildId automatically) - If given a build ID: Use directly 3. **Download logs**: Run `hacking/azp/download.py` with appropriate flags: ```bash ./hacking/azp/download.py <build_id_or_url> --console-logs -v ``` 4. **Analyze logs**: After download completes, examine logs in `<build_id>/` directory: - Grep for common failure patterns: `FAILED`, `ERROR`, `Traceback` - Focus on logs from failed jobs (check job names) - Compare with ansibot comments for context Download Script Options ----------------------- The `hacking/azp/download.py` script supports: - `--console-logs`: Download console logs (recommended for CI failure analysis) - `--artifacts`: Download test artifacts - `--run-metadata`: Download run metadata JSON - `--all`: Download everything - `--match-job-name <regex>`: Filter to specific jobs - `--match-artifact-name <regex>`: Filter to specific artifacts - `-v, --verbose`: Show what is being downloaded - `-t, --test`: Dry run (show what would be downloaded) For most CI failure analysis, use `--console-logs` to get the log files. Common Analysis Patterns ------------------------ After downloading logs to `<build_id>/` directory: ```bash # Find all errors and failures grep -r "FAILED\|ERROR\|Traceback" <build_id>/ # Find specific test failures grep -r "FAILED test" <build_id>/ # Find sanity test failures grep -r "The test" <build_id>/ | grep -i "failed" # List all downloaded log files ls -lh <build_id>/ ``` Notes ----- - Logs are downloaded to a directory named after the build ID - Console logs are named after the job hierarchy (e.g., "Job Name Stage Name.log") - The Ansible project is public, so no authentication is required