REFACTOR: VM creation and setup
This commit is contained in:
@@ -12,17 +12,17 @@
|
||||
|
||||
vars_prompt:
|
||||
- name: lxc_hostname
|
||||
prompt: "Hostname for the container:"
|
||||
prompt: "Hostname for the container"
|
||||
private: false
|
||||
|
||||
- name: lxc_root_password
|
||||
prompt: "Root password:"
|
||||
prompt: "Root password"
|
||||
private: true
|
||||
confirm: true
|
||||
encrypt: sha512_crypt
|
||||
|
||||
- name: lxc_ip_address
|
||||
prompt: "IP address for the container (in x.x.x.x/x formant):"
|
||||
prompt: "IP address for the container (in x.x.x.x/x formant)"
|
||||
private: false
|
||||
|
||||
|
||||
|
||||
@@ -2,27 +2,16 @@
|
||||
- name: Deploy a virtual machine from a cloud init image
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
roles:
|
||||
- ../roles/basic_proxmox_vm
|
||||
|
||||
- name: Basic Proxmox guest deployment
|
||||
hosts: all
|
||||
remote_user: ansible
|
||||
roles:
|
||||
- ../roles/basic_postinstall
|
||||
vars_files:
|
||||
../inventory/group_vars/all/secrets.yaml
|
||||
vars:
|
||||
ansible_user_passwd_hash: "{{ ansible_password | password_hash('sha512', 's3edscrj45e6r') }}"
|
||||
user_passwd_hash: "{{ user_password | password_hash('sha512', 's3ed6123jhgcr') }}"
|
||||
vars_prompt:
|
||||
- name: vm_hostname
|
||||
prompt: "Hostname for the VM"
|
||||
private: false
|
||||
|
||||
handlers:
|
||||
- name: restart ssh-server
|
||||
service:
|
||||
name: ssh
|
||||
state: restarted
|
||||
|
||||
- name: restart sshd-server
|
||||
service:
|
||||
name: sshd
|
||||
state: restarted
|
||||
roles:
|
||||
- ../roles/deploy_vm_on_proxmox
|
||||
|
||||
Reference in New Issue
Block a user