Ersetze mgrote.pve-nag-buster --> ironicbadger.proxmox-nag-removal (#12)
This commit is contained in:
parent
2bbdd26728
commit
9b23b70793
12 changed files with 59 additions and 53 deletions
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- hosts: virt
|
||||
roles:
|
||||
- { role: mgrote.pve_nag-buster, tags: "nag-buster" }
|
||||
- { role: ironicbadger.proxmox-nag-removal, tags: "nag", become: yes }
|
||||
- { role: mgrote.apcupsd, tags: "apcupsd" }
|
||||
- { role: mgrote.smart, tags: "smart" }
|
||||
- { role: mgrote.zfs_tools, tags: "zfs_tools" }
|
||||
|
|
5
roles/ironicbadger.proxmox-nag-removal/README.md
Normal file
5
roles/ironicbadger.proxmox-nag-removal/README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# ironicbadger/ansible-role-proxmox-nag-removal
|
||||
|
||||
This role removes the obnoxious Proxmox 'please subscribe' dialog box from a non subscribed server. It will also by default ensure that the enterprise repos are disabled.
|
||||
|
||||
Tested and working with Proxmo 5.4-4.
|
4
roles/ironicbadger.proxmox-nag-removal/defaults/main.yml
Normal file
4
roles/ironicbadger.proxmox-nag-removal/defaults/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
|
||||
remove_nag: True
|
||||
remove_enterprise_repo: True
|
6
roles/ironicbadger.proxmox-nag-removal/handlers/main.yml
Normal file
6
roles/ironicbadger.proxmox-nag-removal/handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
|
||||
- name: restart pveproxy
|
||||
service:
|
||||
name: pveproxy
|
||||
state: restarted
|
14
roles/ironicbadger.proxmox-nag-removal/meta/main.yml
Normal file
14
roles/ironicbadger.proxmox-nag-removal/meta/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
galaxy_info:
|
||||
author: Alex Kretzschmar
|
||||
description: Removes Proxmox nag screen
|
||||
issue_tracker_url: https://github.com/ironicbadger/ansible-role-proxmox-nag-removal/issues
|
||||
license: GPLv2
|
||||
min_ansible_version: 2.7
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- all
|
||||
categories:
|
||||
- system
|
||||
- web
|
9
roles/ironicbadger.proxmox-nag-removal/tasks/main.yml
Normal file
9
roles/ironicbadger.proxmox-nag-removal/tasks/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
|
||||
- name: removes subscription nag box
|
||||
include: remove-nag.yml
|
||||
when: remove_nag
|
||||
|
||||
- name: remove enterprise repos
|
||||
include: remove-enterprise-repo.yml
|
||||
when: remove_enterprise_repo
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
|
||||
- name: Ensure enterprise repo file is not present
|
||||
file:
|
||||
path: /etc/apt/sources.list.d/pve-enterprise.list
|
||||
state: absent
|
14
roles/ironicbadger.proxmox-nag-removal/tasks/remove-nag.yml
Normal file
14
roles/ironicbadger.proxmox-nag-removal/tasks/remove-nag.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
|
||||
- name: backup up original file
|
||||
copy:
|
||||
remote_src: True
|
||||
src: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
|
||||
dest: "/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.bak-{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||
|
||||
- name: modify line which performs license check
|
||||
replace:
|
||||
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
|
||||
regexp: "data.status \\!== \\'Active\\'"
|
||||
replace: "false"
|
||||
notify: restart pveproxy
|
|
@ -1,11 +0,0 @@
|
|||
## mgrote.pve_nag-buster
|
||||
|
||||
### Beschreibung
|
||||
Laedt das Script "pve_nag-buster" gerunter und fuehrt es aus.
|
||||
|
||||
### Funktioniert auf
|
||||
- [x] ProxMox 6.1
|
||||
|
||||
### Variablen
|
||||
##### Bei jedem Lauf Update durchführen?
|
||||
pve_nag_buster_update: false
|
|
@ -1 +0,0 @@
|
|||
pve_nag_buster_update: false
|
|
@ -1,40 +0,0 @@
|
|||
- name: check if updates should be applied
|
||||
become: yes
|
||||
stat:
|
||||
path: "/root/pve-nag-buster/is_installed"
|
||||
register: "is_installed"
|
||||
|
||||
# - name: dbug
|
||||
# debug:
|
||||
# msg: "{{ is_installed }}"
|
||||
|
||||
# - set_fact: is_installed.stat.exists = false
|
||||
# when: pve_nag_buster_update == true
|
||||
|
||||
- name: create "/root/pve-nag-buster"
|
||||
become: yes
|
||||
file:
|
||||
path: /root/pve-nag-buster
|
||||
state: directory
|
||||
when: (not is_installed.stat.exists) or (pve_nag_buster_update)
|
||||
|
||||
- name: download nag-buster-script
|
||||
become: yes
|
||||
get_url:
|
||||
url: https://raw.githubusercontent.com/foundObjects/pve-nag-buster/master/install.sh
|
||||
dest: /root/pve-nag-buster/install.sh
|
||||
mode: 775
|
||||
when: (not is_installed.stat.exists) or (pve_nag_buster_update)
|
||||
|
||||
- name: execute script
|
||||
become: yes
|
||||
command: /root/pve-nag-buster/install.sh
|
||||
when: (not is_installed.stat.exists) or (pve_nag_buster_update)
|
||||
|
||||
- name: touch "update"
|
||||
become: yes
|
||||
file:
|
||||
path: /root/pve-nag-buster/is_installed
|
||||
state: touch
|
||||
access_time: preserve
|
||||
modification_time: preserve
|
Loading…
Reference in a new issue