-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Improvements on "ansiblegate" module #60056
Improvements on "ansiblegate" module #60056
Conversation
44295aa
to
4f7c596
Compare
0f8ee2c
to
eb0b3ae
Compare
@s0undt3ch maybe you can take a look at this one? Thanks in advance! BTW, just wondering what is the propose of using |
It's a failed implementation at separate copies of the same original list.... >>> a = b = [1, 2, 3]
>>> a
[1, 2, 3]
>>> b
[1, 2, 3]
>>> a.remove(2)
>>> a
[1, 3]
>>> b
[1, 3]
>>> a = b = [1, 2, 3][:]
>>> a
[1, 2, 3]
>>> b
[1, 2, 3]
>>> a.remove(2)
>>> a
[1, 3]
>>> b
[1, 3]
>>> a = b[:] = [1, 2, 3][:]
>>> a
[1, 2, 3]
>>> b
[1, 2, 3]
>>> a.remove(2)
>>> a
[1, 3]
>>> b
[1, 2, 3] ie, a bug. 😭 |
The correct code should
The correct code should be: >>> a = b[:] = [1, 2, 3]
>>> a
[1, 2, 3]
>>> b
[1, 2, 3]
>>> a.remove(2)
>>> a
[1, 3]
>>> b
[1, 2, 3]
>>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an initial review
@s0undt3ch thanks for the review! 👍 I've pushed the changes you suggested on the review |
@meaksh Looks like this one has some merge conflicts. |
dbcbb94
to
b8f9adb
Compare
Thanks for the review @garethgreenaway ! I've have rebased with latest |
there is a merge conflict that needs to be resolved. |
@Ch3LL conflicts are now fixed 👍 |
@Ch3LL thanks again for the review. I've addressed your comments and I think this is now ready. I hope it can gets into 3005! |
Unfortunately I was not able to get this into 3005 since we were on a tight timeline. I'll go ahead and update the versionadded versions to 3006 and help get this merged in. I'll also label it 3006 so it for sure makes it into that release. |
So we actually ended up rebasing master with the release, so this will actually end up in 3005 ! yay! I also updated the versionadded to 3005: #62331 |
What does this PR do?
This PR adds some improvements to the "Ansiblegate" module of Salt:
ansible.targets
method to gather Ansible inventoryansible.discover_playbooks
method to help collecting playbooks.ansible-playbook
CLI output is not the expected JSON.Merge requirements satisfied?
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.