community.general.packet_project – Create/delete a project in Packet host.¶
This plugin is part of the community.general collection (version 1.3.6).
To install it use:
ansible-galaxy collection install community.general.
To use it in a playbook, specify:
New in version 0.2.0: of community.general
Create/delete a project in Packet host.
API is documented at https://www.packet.com/developers/api/#projects.
The below requirements are needed on the host that executes this module.
python >= 2.6
packet-python >= 1.40
# All the examples assume that you have your Packet API token in env var PACKET_API_TOKEN. # You can also pass the api token in module param auth_token. - name: Create new project hosts: localhost tasks: community.general.packet_project: name: "new project" - name: Create new project within non-default organization hosts: localhost tasks: community.general.packet_project: name: "my org project" org_id: a4cc87f9-e00f-48c2-9460-74aa60beb6b0 - name: Remove project by id hosts: localhost tasks: community.general.packet_project: state: absent id: eef49903-7a09-4ca1-af67-4087c29ab5b6 - name: Create new project with non-default billing method hosts: localhost tasks: community.general.packet_project: name: "newer project" payment_method: "the other visa"
Common return values are documented here, the following are the fields unique to this module:
True if a project was created or removed.
UUID of addressed project.
Name of addressed project.