First commit
This commit is contained in:
15
hypervisors/roles/proxmox6_prerequisite/tasks/main.yml
Normal file
15
hypervisors/roles/proxmox6_prerequisite/tasks/main.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
- name: "Add hosts Proxmox style"
|
||||
template:
|
||||
src: hosts.j2
|
||||
dest: /etc/hosts
|
||||
- name: "Add Proxmox VE 6 GPG key"
|
||||
apt_key:
|
||||
url: http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg
|
||||
state: present
|
||||
- name: "Add Proxmox VE 6 Repo"
|
||||
apt_repository:
|
||||
repo: "deb http://download.proxmox.com/debian/pve buster pve-no-subscription"
|
||||
state: present
|
||||
- name: "Apt upgrade"
|
||||
apt:
|
||||
upgrade: dist
|
11
hypervisors/roles/proxmox6_prerequisite/templates/hosts.j2
Normal file
11
hypervisors/roles/proxmox6_prerequisite/templates/hosts.j2
Normal file
@@ -0,0 +1,11 @@
|
||||
# Default hosts
|
||||
127.0.0.1 localhost.localdomain localhost
|
||||
::1 localhost ip6-localhost ip6-loopback
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
|
||||
# Proxmox specific
|
||||
{% for host in groups['hypervisors'] %}
|
||||
{{ hostvars[host]['ansible_default_ipv4']['address'] }} {{ host }} {{ hostvars[host]['ansible_hostname'] }}
|
||||
{{ hostvars[host]['ansible_default_ipv6']['address'] }} {{ host }} {{ hostvars[host]['ansible_hostname'] }}
|
||||
{% endfor %}
|
Reference in New Issue
Block a user