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

Update no-handler rule to accept 'not changed' #3230

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

jpopelka
Copy link
Contributor

Hello,

I don't know how to convert the following to a handler so I think the no-handler rule should accept it:

      tasks:
        - name: Registering task
          command: echo Hello
          register: r
          changed_when: true

        - name: When task not changed
          command: echo Not changed
          when: not r.changed

@jpopelka jpopelka requested a review from a team as a code owner March 30, 2023 16:39
@jpopelka jpopelka requested review from a team, priyamsahoo, shatakshiiii and Ruchip16 March 30, 2023 16:39
@ssbarnea ssbarnea force-pushed the no-handler-not-changed branch from fa8c79b to 248930c Compare March 31, 2023 11:41
@ssbarnea ssbarnea added the bug label Mar 31, 2023
@ssbarnea
Copy link
Member

@jpopelka Thanks for the fix. I only had to tune to testing but it makes sense as handlers do not have conditions.

@ssbarnea ssbarnea merged commit 5cd8db3 into ansible:main Mar 31, 2023
@jpopelka jpopelka deleted the no-handler-not-changed branch April 3, 2023 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants