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

Add auto-fixing implementation for no-handler rule #3732

Closed
wants to merge 5 commits into from

Conversation

audgirka
Copy link
Contributor

@audgirka audgirka commented Sep 9, 2023

Related: #3634

@audgirka audgirka requested a review from a team as a code owner September 9, 2023 16:32
@github-actions github-actions bot added the bug label Sep 9, 2023
@audgirka audgirka added enhancement and removed bug labels Sep 9, 2023
@shatakshiiii shatakshiiii changed the title Added transform functionality for no-handler rule Add auto-fixing implementation for no-handler rule Sep 11, 2023
@audgirka audgirka marked this pull request as draft September 11, 2023 06:52
@cidrblock
Copy link
Contributor

cidrblock commented Sep 12, 2023

This is a tricky one, we need to watch for varialbe reuse, overlapping handler names and playbooks that have an include

- hosts: localhost
  gather_facts: no
  tasks:
  - name: Create a file
    ansible.builtin.file:
      path: /tmp/ansible_1.txt
      state: touch
    register: result
  - name: Print the result
    ansible.builtin.debug:
      msg: "/tmp/ansible_1.txt changed"
    when: result.changed 
  - name: Print the result
    ansible.builtin.debug:
      msg: "/tmp/ansible_1.txt not changed"
    when: not result.changed

  - name: Create a file
    ansible.builtin.file:
      path: /tmp/ansible_2.txt
      state: touch
    register: result
  - name: Print the result
    ansible.builtin.debug:
      msg: "/tmp/ansible_2.txt changed"
    when: result.changed 

@audgirka audgirka temporarily deployed to ack September 26, 2023 14:34 — with GitHub Actions Inactive
@audgirka audgirka temporarily deployed to ack September 26, 2023 15:10 — with GitHub Actions Inactive
@pre-commit-ci pre-commit-ci bot temporarily deployed to ack September 26, 2023 15:11 Inactive
@audgirka audgirka temporarily deployed to ack September 27, 2023 07:51 — with GitHub Actions Inactive
@pre-commit-ci pre-commit-ci bot temporarily deployed to ack September 27, 2023 07:53 Inactive
@audgirka audgirka temporarily deployed to ack September 27, 2023 12:44 — with GitHub Actions Inactive
@ssbarnea ssbarnea closed this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants