-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 tags parameter to packet_device #418
Add tags parameter to packet_device #418
Conversation
The test
|
cc062cd
to
3d98135
Compare
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.
Hey, thanks for the PR
We also need a changelog fragment https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to
minor_changes:
- packet_device - add ``tags`` parameter (https://github.com/ansible-collections/community.general/pull/418).
3d98135
to
bfe69f6
Compare
The test
The test
The test
|
@baldwinSPC @nurfet-becirevic @t0mk @teebes as authors could you look at the changes please? |
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.
Let's wait for the authors a couple of days. If nobody's against, we'll merge it as it is
@Andersson007 I pinged them on slack. Keeping my fingers crossed 🙂 |
Hello!!
How can I checkout this branch? Thanks ResponseAs suggested by @akiselev1 this made the trick: # Checkout the fork and commit you want on /home/vagrant/community.general
export ANSIBLE_LIBRARY=~/.ansible/plugins/modules/:/home/vagrant/community.general/plugins/modules/ And I got my awesome server provisioned and tagged as needed! For me, it is good to go. About the tag limit, from the documentation there is nothing official about it, I am trying to get some more information about it but I think in the meantime we can leave it out and if the number sounds so weird that requires a pre-check we can add it later! Thanks a lot! |
9e7e81e
to
a89f68e
Compare
BTW, this describes how you can properly check out a collection git repo and work with it: https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections |
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.
What I don't understand is how this PR does tag management. If you specify a tag that is not there for a present machine, or remove a tag that is there: how does it make sure that the machine afterwards has the new set of tags? Or does it only sets tags on creation? If that's the case, this must be clearly documented.
a89f68e
to
26a5bcc
Compare
@felixfontein Thanks for review. Great questions! My current goal was to add device tag(s) on device creation only. I updated tags description and the changelog with this statement. Let me know if this clarification is needed anywhere else. |
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.
Looks good to me (without having any clue what packet does ;) ).
@gianarb @andfasano do I understand correctly that you are happy with the current state of the PR? If you don't write otherwise until say mid next week, I'll merge.
(@akiselev1 please ping me if I forget :) ) |
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.
LGTM
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.
LGTM
LGTM |
@akiselev1 thanks for the contribution! |
merged #418 into master |
SUMMARY
packet_device module currently does not handle tags in device creation. Tags are supported by packet.net api. This change is intended to fill this gap.
ISSUE TYPE
COMPONENT NAME
packet_device
ADDITIONAL INFORMATION
Before the change:
Creating devices
hosts: localhost
tasks:
project_id: 89b497ee-5afc-420a-8fb5-56984898f4df
hostnames: myserver
operating_system: ubuntu_16_04
plan: baremetal_0
facility: sjc1
After the change:
Creating devices
hosts: localhost
tasks:
project_id: 89b497ee-5afc-420a-8fb5-56984898f4df
hostnames: myserver
tags: ci-xyz
operating_system: ubuntu_16_04
plan: baremetal_0
facility: sjc1