Proxmox自动化与Ansible
另一个代码,我希望你们会发现有用的 Centos ansible安装Proxmox自动化与Ansible,ansible,yaml,virtual-machine,proxmox,Ansible,Yaml,Virtual Machine,Proxmox,另一个代码,我希望你们会发现有用的 Centos ansible安装 yum install ansible -y 设置主机和凭据 [ansible_client] proxmoxip ansible_ssh_user= root ansible_ssh_pass= password ansible_ssh_port=8888 确保将其粘贴到ansible.cfg文件中 [defaults] host_key_checking = false 克隆VM模板并创建VM --- - name:
yum install ansible -y
设置主机和凭据
[ansible_client]
proxmoxip ansible_ssh_user= root ansible_ssh_pass= password ansible_ssh_port=8888
确保将其粘贴到ansible.cfg文件中
[defaults]
host_key_checking = false
克隆VM模板并创建VM
---
- name: sample proxmox book
hosts: ansible_client
remote_user: root
become: true
tasks:
- proxmox_kvm:
node : Proxmox-VE
api_user : root@pam
api_password: 'passsword'
api_host : Proxmox-VE
clone : IntelliDB
name : zavala
xmox-VE
vmid : 100
timeout : 500
---
- name: sample proxmox book
hosts: ansible_client
remote_user: root
become: true
tasks:
- proxmox_kvm:
node : Proxmox-VE
api_user : root@pam
api_password: 'password'
api_host : Proxmox-VE
name : zavala
state : stopped/started/restarted
启动/停止/重新启动VM
---
- name: sample proxmox book
hosts: ansible_client
remote_user: root
become: true
tasks:
- proxmox_kvm:
node : Proxmox-VE
api_user : root@pam
api_password: 'passsword'
api_host : Proxmox-VE
clone : IntelliDB
name : zavala
xmox-VE
vmid : 100
timeout : 500
---
- name: sample proxmox book
hosts: ansible_client
remote_user: root
become: true
tasks:
- proxmox_kvm:
node : Proxmox-VE
api_user : root@pam
api_password: 'password'
api_host : Proxmox-VE
name : zavala
state : stopped/started/restarted
修改RAM和处理器
---
- name: sample proxmox book
hosts: ansible_client
remote_user: root
become: true
tasks:
- proxmox_kvm:
api_user : root@pam
api_password: 'password'
api_host : Proxmox-VE
name : zavala
node : Proxmox-VE
cores : 4
memory : 2048
update : yes