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