Skip to content

Commit 4b5a86d

Browse files
committed
Merge pull request #60 from trickert76:feature/proxmox6_support
PVE 6 support
2 parents 5613967 + 469bc8b commit 4b5a86d

File tree

12 files changed

+80
-8
lines changed

12 files changed

+80
-8
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44

55
ansible.cfg
66
*.retry
7+
/.project
8+
/.pydevproject

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ cache:
88
matrix:
99
fast_finish: true
1010
env:
11-
- ANSIBLE_GIT_VERSION='devel' # 2.8.x development branch
11+
- ANSIBLE_GIT_VERSION='devel' # 2.9.x development branch
12+
- ANSIBLE_VERSION='<2.9.0' # 2.8.x
1213
- ANSIBLE_VERSION='<2.8.0' # 2.7.x
1314
- ANSIBLE_VERSION='<2.7.0' # 2.6.x
1415
install:
1516
- if [ "$ANSIBLE_GIT_VERSION" ]; then pip install "https://github.com/ansible/ansible/archive/${ANSIBLE_GIT_VERSION}.tar.gz";
1617
else pip install "ansible${ANSIBLE_VERSION}"; fi;
1718
pip install --pre ansible-lint; pip install jmespath
1819
- ansible --version
19-
- ansible-galaxy install lae.travis-lxc
20+
- ansible-galaxy install lae.travis-lxc,v0.8.1
2021
- ansible-playbook tests/install.yml -i tests/inventory
2122
- git archive --format tar.gz HEAD > lae.proxmox.tar.gz && ansible-galaxy install
2223
lae.proxmox.tar.gz,$(git rev-parse HEAD),lae.proxmox && rm lae.proxmox.tar.gz

defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ pve_ceph_crush_rules: []
2828
# pve_ssl_certificate: "contents of certificate"
2929
pve_cluster_enabled: no
3030
pve_cluster_clustername: "{{ pve_group }}"
31+
# PVE 5.x (Debian Stretch) clustering options
3132
pve_cluster_ring0_addr: "{{ ansible_default_ipv4.address }}"
3233
pve_cluster_bindnet0_addr: "{{ pve_cluster_ring0_addr }}"
3334
# pve_cluster_ring1_addr: "another interface's IP address or hostname"
3435
# pve_cluster_bindnet1_addr: "{{ pve_cluster_ring1_addr }}"
36+
# PVE 6.x (Debian Buster) clustering options
37+
pve_cluster_link0_addr: "{{ ansible_default_ipv4.address }}"
38+
# pve_cluster_link1_addr: "another interface's IP address or hostname"
3539
pve_datacenter_cfg: {}
3640
pve_ssl_letsencrypt: false
3741
pve_groups: []

files/proxmox-ve-release-6.x.asc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
-----BEGIN PGP PUBLIC KEY BLOCK-----
2+
3+
mQINBFvydv4BEACqs61eF4B+Zz9H0hKJS72SEofK2Gy6a5wZ/Hb4DrGbbfC6fjrO
4+
b3r4ZrM7G355TD5He7qzcGrxJjgGwH+/w6xRyYliIzxD/lp8UJXcmiZHG+MYYJP6
5+
q29NWrbEcqPo6onx2tzNytHIUysqUE+mghXtyMN7KUMip7bDAqx2L51CI180Giv1
6+
wdKUBP2bgKVObyFzK46ZEMzyl2qr9raFnHA8oF1HZRkwwcfSD/dkY7oJvAO1pXgR
7+
8PzcXnXjoRTCyWlYVZYn54y9OjnB+knN8BlSOLNdBkKZs74XyJ9JlQU9ZfzatXXE
8+
hMxdDquIAg+g/W9rLpLz5XAGb2GSNvKrU5otjOdUOnD0k1MpFujsSzRWZCIRnywf
9+
mQ/Lahgo4wYOrQLNGCNdvwMgbwcD9NRjQsPdja94wJNRsmbhFeAKPyF8p3lf9QUH
10+
Y3Vn1iGI6ut7c3uqUv0lKvujroKNc/hFSgcn8bUB+x0OnKE3yEiiGsEyJHGxVhjy
11+
3FsY/h1SNtM57Wwk9zxjNuqp66jZcTu8foLNh6Ct+mFsor2Y6MxKVJvrcb9rXv54
12+
YpQAZUjvZK5gnqOWTWrEZkjtNLoGiyuWOU+2RoqTtRA22u9Vlm5C/lduGC7akbVG
13+
Xd8ocDrq4t5IyM3bqF3oru7zGW0hQgsPwbkQcfOawFkQlGEDzf1TrXTafwARAQAB
14+
tElQcm94bW94IFZpcnR1YWwgRW52aXJvbm1lbnQgNi54IFJlbGVhc2UgS2V5IDxw
15+
cm94bW94LXJlbGVhc2VAcHJveG1veC5jb20+iQJUBBMBCAA+FiEENTR5+DeB1/jt
16+
X1rFe/KBLopuiOAFAlvydv4CGwMFCRLMAwAFCwkIBwIGFQgJCgsCBBYCAwECHgEC
17+
F4AACgkQe/KBLopuiODQZRAAo0kXc090pNskVDr0qB7T2x8UShxvC5E6imZHASq/
18+
ui1wd5Wei+WkPj4ME/1yAvpMrMAq3LbbIgmHbBqzsagQaeL88vWn5c0NtzsrzHoU
19+
+ql5XrCnbnmXBoCGUgiXA3vq0FaemTzfCBGnHPbsOoPlvHZjXPvpnMOomO39o1xa
20+
w2Ny8fhhv651CjPpK7DQF5KoMm3LdjXB6nouErJJZDvUaNmGNhHh4HzWiOSLyaE8
21+
T0UsUR1HqGkzvgE2OuwPjeWFIIRPKeiCFbA+mlEfwb/Lgu6F4D6IsP++ItuG6Q6Y
22+
jAopuK7QXrnFpDfAZmQsbsOgkqqg5dy7xBJATuCPkUk9qMBaeLVqkANq1OlZksPT
23+
ry2399U83i69xsJNW4BBC0JXKWWJpq5d9ZH05OP9wxYR2+K3Hmh4vvkzcgoMEbnF
24+
rFzpH+eGkWxxZS1AGhMJBXGkmm1eW7ZFQVx6o0w9dWRRqDo7UklVNPImtXuso3nI
25+
wuYF0+Dv6PeE8EQWLp4FQGHlaEoUmYFug4xiWF1tCcW6UWy6fEhVAcXbbD0IvUjS
26+
6pL9IKpyOWDJBV0Tya4LmBAzaPB7ljYfEBASvaPVKDcSva6wEM8/vA6Oal2/LVdQ
27+
8TG5eRrtWxeZxZSQknv0v3IhPujyP9dxvhJfZmVZKQx/oPgEWFmGuQ8ggXtNZL/8
28+
72I=
29+
=ssmE
30+
-----END PGP PUBLIC KEY BLOCK-----

meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ galaxy_info:
1010
- name: Debian
1111
versions:
1212
- stretch
13+
- buster
1314

1415
galaxy_tags:
1516
- proxmox

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
filename: pve-enterprise
103103
state: absent
104104
with_items:
105-
- "deb https://enterprise.proxmox.com/debian stretch pve-enterprise"
106-
- "deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise"
105+
- "deb https://enterprise.proxmox.com/debian {{ ansible_distribution_release }} pve-enterprise"
106+
- "deb https://enterprise.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-enterprise"
107107

108108
- name: Remove subscription check wrapper function in web UI
109109
patch:

tasks/pve_add_node.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,26 @@
44
_pve_current_node: "{{ item }}"
55

66
- name: Add node to Proxmox cluster
7-
command: "pvecm add {{ hostvars[groups[pve_group][0]]['ansible_default_ipv4']['address'] }}\
8-
{{ ' -use_ssh' if ansible_distribution_release == 'stretch' else '' }} \
7+
command: "pvecm add {{ hostvars[groups[pve_group][0]]['ansible_default_ipv4']['address'] }} \
8+
-use_ssh \
99
-ring0_addr {{ pve_cluster_ring0_addr }}{% if pve_cluster_ring1_addr is defined %} \
1010
-ring1_addr {{ pve_cluster_ring1_addr }}{% endif %}"
1111
args:
1212
creates: "{{ pve_cluster_conf }}"
1313
when:
1414
- "inventory_hostname == _pve_current_node"
15+
- "ansible_distribution_release == 'stretch'"
16+
17+
- name: Add node to Proxmox cluster
18+
command: "pvecm add {{ hostvars[groups[pve_group][0]]['ansible_default_ipv4']['address'] }} \
19+
-use_ssh \
20+
-link0 {{ pve_cluster_link0_addr }}{% if pve_cluster_link1_addr is defined %} \
21+
-link1 {{ pve_cluster_link1_addr }}{% endif %}"
22+
args:
23+
creates: "{{ pve_cluster_conf }}"
24+
when:
25+
- "inventory_hostname == _pve_current_node"
26+
- "ansible_distribution_release == 'buster'"
1527

1628
- name: Remove stale corosync lock file due to lack of quorum during initialization
1729
file:

tasks/pve_cluster_config.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@
4444
when:
4545
- "_pve_found_clusters is not defined"
4646
- "inventory_hostname == groups[pve_group][0]"
47+
- "ansible_distribution_release == 'stretch'"
48+
49+
- name: Initialize a Proxmox cluster
50+
command: "pvecm create {{ pve_cluster_clustername }} \
51+
-link0 {{ pve_cluster_link0_addr }}\
52+
{% if pve_cluster_link1_addr is defined %} \
53+
-link1 {{ pve_cluster_link1_addr }}{% endif %}"
54+
args:
55+
creates: "{{ pve_cluster_conf }}"
56+
when:
57+
- "_pve_found_clusters is not defined"
58+
- "inventory_hostname == groups[pve_group][0]"
59+
- "ansible_distribution_release == 'buster'"
4760

4861
- name: Wait for quorum on initialization node
4962
proxmox_query:

tests/group_vars/all

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
ansible_ssh_user: root
33

4-
pve_group: pve
4+
pve_group: "{{ ansible_distribution_release }}cluster"
55
pve_extra_packages:
66
- sl
77
pve_check_for_kernel_update: false

tests/install.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
shell: "openssl req -x509 -new -nodes -key {{ ssl_ca_key_path }} -sha256 -days 1 -subj '{{ ssl_subj }}' -out {{ ssl_ca_cert_path }}"
1515
vars:
1616
test_profiles:
17+
- profile: debian-buster
18+
prefix: proxmox-6-
1719
- profile: debian-stretch
1820
prefix: proxmox-5-
1921
test_hosts_per_profile: 3

0 commit comments

Comments
 (0)