Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task check_mode=false ignored by awx job template - Playbook Check #15162

Open
5 of 11 tasks
jon-nfc opened this issue May 1, 2024 · 0 comments
Open
5 of 11 tasks

task check_mode=false ignored by awx job template - Playbook Check #15162

jon-nfc opened this issue May 1, 2024 · 0 comments
Labels
community component:ui needs_investigation PRs or issues that need further investigation type:bug

Comments

@jon-nfc
Copy link

jon-nfc commented May 1, 2024

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to security@ansible.com instead.)

Bug Summary

when running a job template with job type Playbook Check, tasks with check_mode: false do not run as intended when on the cli they do.

AWX version

23.9.0

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

kubernetes

Modifications

no

Ansible version

23.9.0

Operating system

k3s 1.29

Web browser

No response

Steps to reproduce

add the following task

- name: Get Hostname
  ansible.builtin.command:
    cmd: hostname
  changed_when: false
  check_mode: false
  register: hostname_to_check
  tags:
    - always

and run the playbook in "check" mode from awx. the task fails to run

Expected results

that a task with check_mode: false runs when the play is run in "check mode". This is what already occurs when the cli is used, i.e. ansible-playboook my-playbook-name.yaml --check.

Actual results

skipping: [<truncated>] => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "cmd": [
        "hostname"
    ],
    "delta": null,
    "end": null,
    "invocation": {
        "module_args": {
            "_raw_params": "hostname",
            "_uses_shell": false,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "expand_argument_vars": true,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true
        }
    },
    "msg": "Command would have run if not in check mode",
  

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community component:ui needs_investigation PRs or issues that need further investigation type:bug
Projects
None yet
Development

No branches or pull requests

2 participants