community / community.general / 0.1.4 / module / packet_project Create/delete a project in Packet host. | "added in version" 0.2.0 of community.general" Authors: Tomas Karasek (@t0mk) <tom.to.the.k@gmail.com>, Nurfet Becirevic (@nurfet-becirevic) <nurfet.becirevic@gmail.com>community.general.packet_project (0.1.4) — module
Install with ansible-galaxy collection install community.general:==0.1.4
collections: - name: community.general version: 0.1.4
Create/delete a project in Packet host.
API is documented at U(https://www.packet.com/developers/api/#projects).
# 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: packet_project: name: "new project"
- name: Create new project within non-default organization hosts: localhost tasks: packet_project: name: "my org project" org_id: a4cc87f9-e00f-48c2-9460-74aa60beb6b0
- name: Remove project by id hosts: localhost tasks: packet_project: state: absent id: eef49903-7a09-4ca1-af67-4087c29ab5b6
- name: Create new project with non-default billing method hosts: localhost tasks: packet_project: name: "newer project" payment_method: "the other visa"
id: description: - UUID of the project which you want to remove. type: str name: description: - Name for/of the project. type: str state: choices: - present - absent default: present description: - Indicate desired state of the target. type: str org_id: description: - UUID of the organization to create a project for. - When blank, the API assumes the default organization. type: str auth_token: description: - Packet api token. You can also supply it in env var C(PACKET_API_TOKEN). type: str custom_data: description: - Custom data about the project to create. type: str payment_method: description: - Payment method is name of one of the payment methods available to your user. - When blank, the API assumes the default payment method. type: str
changed: description: True if a project was created or removed. returned: success sample: true type: bool id: description: UUID of addressed project. returned: success type: str name: description: Name of addressed project. returned: success type: str