Skip to content

Commit

Permalink
Use collection equinix.metal (#5813)
Browse files Browse the repository at this point in the history
  • Loading branch information
agonzalezrh committed Jan 18, 2023
1 parent 8303023 commit ec0cc23
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 24 deletions.
6 changes: 0 additions & 6 deletions ansible/cloud_providers/equinix_metal_destroy_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
gather_facts: false
become: false
tasks:
- name: Install community.general collection for packet modules
command: >-
ansible-galaxy collection install
-p {{ playbook_dir }}/../collections community.general
--force-with-deps
- name: Run infra-dns Role
when: cluster_dns_server is defined
include_role:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
- infra
- infra_tasks
tasks:
- name: Install community.general collection for packet modules
command: >-
ansible-galaxy collection install
-p collections community.general
--force-with-deps
args:
chdir: "{{ playbook_dir }}/.."
creates: "{{ playbook_dir }}/../collections/ansible_collections/community/general"

- name: Run infra-equinix-metal-resources Role
include_role:
name: infra-equinix-metal-resources
Expand Down
4 changes: 2 additions & 2 deletions ansible/configs/just-a-bunch-of-nodes/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
collections:
- name: openstack.cloud
version: 1.5.3
- name: amazon.aws
version: 2.1.0
- name: community.general
version: 4.0.2
- name: ansible.posix
version: 1.3.0
- name: equinix.metal
version: 1.4.1
...
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
delay: "{{ equinix_metal_api_delay }}"
until: r_projects is succeeded

- name: Test packet_project module
community.general.packet_project:
- name: Test project module
equinix.metal.project:
auth_token: "{{ equinix_metal_api_token }}"
name: ThisProjectDoesntExist
state: absent
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
loop_var: _instance
label: _instance.name
vars:
community.general.packet_device:
equinix.metal.device:
wait_for_public_IPv: 4
auth_token: "{{ equinix_metal_api_token }}"
project_id: "{{ equinix_metal_project_id }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Create Equinix Metal project
community.general.packet_project:
equinix.metal.project:
auth_token: "{{ equinix_metal_api_token }}"
name: "{{ equinix_metal_project_name }}"
org_id: "{{ equinix_metal_organization_id }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

- name: Delete all devices
when: r_equinix_metal_devices.json.devices | default([]) | length > 0
community.general.packet_device:
equinix.metal.device:
auth_token: "{{ equinix_metal_api_token }}"
project_id: "{{ equinix_metal_project_ids[0] }}"
state: absent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Delete Equinix Metal project
community.general.packet_project:
equinix.metal.project:
auth_token: "{{ equinix_metal_api_token }}"
id: "{{ equinix_metal_project_id }}"
org_id: "{{ equinix_metal_organization_id }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

- when: ACTION == 'provision'
block:
- include_tasks: create_project.yaml
Expand Down

0 comments on commit ec0cc23

Please sign in to comment.