debian: improve proxmox detection
Assume non-proxmox debians don’t have /etc/pve so we don’t have to depend on NetBox data.
This commit is contained in:
parent
246178fa5d
commit
e28bb50a9e
1 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
- block:
|
||||
- name: Determine if this is a Proxmox host
|
||||
stat:
|
||||
path: /etc/pve
|
||||
register: stat_pve
|
||||
- set_fact:
|
||||
is_proxmox: "{{ stat_pve.stat.exists and stat_pve.stat.isdir }}"
|
||||
|
||||
- name: Configure MOTD
|
||||
template:
|
||||
dest: /etc/motd
|
||||
|
@ -77,7 +85,7 @@
|
|||
|
||||
- name: Set up firewall
|
||||
include_tasks: firewall.yml
|
||||
when: is_virtual or cluster_type != 'proxmox' # proxmox has its own firewall configuration
|
||||
when: not is_proxmox # proxmox has its own firewall configuration
|
||||
|
||||
- name: Install automatic upgrade package
|
||||
package:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue