chore: migrate proxmox module from community.general.proxmox to community.proxmox
This commit is contained in:
@@ -94,6 +94,7 @@ proxmox_node: "pve01"
|
||||
- Ansible >= 2.12
|
||||
- Root/sudo privileges on target hosts
|
||||
- community.general collection
|
||||
- community.proxmox collection
|
||||
- ansible.posix collection
|
||||
|
||||
## License
|
||||
|
||||
@@ -18,6 +18,7 @@ tags:
|
||||
- maintenance
|
||||
dependencies:
|
||||
"community.general": ">=1.0.0"
|
||||
"community.proxmox": ">=1.0.0"
|
||||
"ansible.posix": ">=1.0.0"
|
||||
repository: https://git.jaroszew.ski/ansible/ansible-collection-infrastructure
|
||||
documentation: https://git.jaroszew.ski/ansible/ansible-collection-infrastructure/README.md
|
||||
|
||||
@@ -132,7 +132,7 @@ When using individual task files via `tasks_from`, you must set `module_defaults
|
||||
- name: Convert container to a template
|
||||
hosts: localhost
|
||||
module_defaults:
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
api_host: "{{ proxmox_api_host }}"
|
||||
api_port: "{{ proxmox_api_port }}"
|
||||
api_user: "{{ proxmox_api_user }}"
|
||||
@@ -168,7 +168,7 @@ When using individual task files via `tasks_from`, you must set `module_defaults
|
||||
- name: Convert the created container to a template
|
||||
hosts: localhost
|
||||
module_defaults:
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
api_host: "{{ proxmox_api_host }}"
|
||||
api_port: "{{ proxmox_api_port }}"
|
||||
api_user: "{{ proxmox_api_user }}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Create a full clone of the container
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
vmid: "{{ lxc_vmid | default(0) }}"
|
||||
clone: "{{ lxc_clone_from }}"
|
||||
clone_type: "{{ lxc_clone_type }}"
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
- ansible.builtin.include_tasks: stop.yml
|
||||
|
||||
- name: Convert container to template
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
hostname: "{{ lxc_hostname }}"
|
||||
state: template
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Create an LXC container
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
vmid: "{{ lxc_vmid | default(omit) }}"
|
||||
hostname: "{{ lxc_hostname }}"
|
||||
password: "{{ lxc_password }}"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- ansible.builtin.include_tasks: stop.yml
|
||||
|
||||
- name: Delete a container
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
vmid: "{{ lxc_vmid | default(omit) }}"
|
||||
hostname: "{{ lxc_hostname | default(omit) }}"
|
||||
state: absent
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Proxmox LXC provision
|
||||
module_defaults:
|
||||
community.general.proxmox: &proxmox_defaults
|
||||
community.proxmox.proxmox: &proxmox_defaults
|
||||
api_host: "{{ proxmox_api_host }}"
|
||||
api_port: "{{ proxmox_api_port }}"
|
||||
api_user: "{{ proxmox_api_user }}"
|
||||
@@ -12,7 +12,7 @@
|
||||
community.proxmox.proxmox_lxc_info: *proxmox_defaults
|
||||
block:
|
||||
- name: Check if container exists
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
vmid: "{{ lxc_vmid }}"
|
||||
state: current
|
||||
register: existing_container
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Start the LXC container
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
vmid: "{{ lxc_result.vmid }}"
|
||||
state: started
|
||||
register: start_result
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Stop container if it is running
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
vmid: "{{ lxc_vmid | default(omit) }}"
|
||||
hostname: "{{ lxc_hostname | default(omit) }}"
|
||||
state: stopped
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Update an LXC container
|
||||
community.general.proxmox:
|
||||
community.proxmox.proxmox:
|
||||
vmid: "{{ lxc_vmid }}"
|
||||
hostname: "{{ lxc_hostname }}"
|
||||
password: "{{ lxc_password | default(omit) }}"
|
||||
|
||||
Reference in New Issue
Block a user