Father. Podcaster - @selfhostedshow. Photographer. Tinkerer. Tailscalar.
- Find all my places at alex.ktz.me.
- Iโm Head of Developer Relations at Tailscale.
- Check my ๐ blog & Perfect Media Server
Removes Proxmox nag screen
Father. Podcaster - @selfhostedshow. Photographer. Tinkerer. Tailscalar.
Per johnscs.com:
tasks:
- name: Silence the Proxmox subscription nag
ansible.builtin.blockinfile:
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
insertafter: 'checked_command: function\(orig_cmd\) {$'
block: |
{% filter indent(width=8, first=true) %}
orig_cmd();
return;
{% endfilter %}
marker: "\t// {mark} Ansible managed block"
backup: true
notify: Restart Proxmox
handlers:
- name: Restart Proxmox
ansible.builtin.systemd:
name: pveproxy
state: restarted
Tested on 8.2.2
Hi,
can this script also run successfully on the Mail-Gateway and maybe already on the Backup Server?
Thanks
I'm new to ansible so perhaps I'm not doing things the Right Way, but it would be great if the tasks in remove-nag.yml
were idempotent and did not create an additional backup file each time they were run.
ansible.builtin.shell + sed
is a little bit a hack when using ansible.
A better way would be to use ansible.builtin.replace because it should be similar to sed
, but included in ansible and would properly report if there were changes.
An alternative way, brought up by @FuzzyMistborn on Discord would be to use a diff file and patch
like discussed here: foundObjects/pve-nag-buster#3
This would make it easier to work with (no hard-to-read regex), but I haven't seen an ansible module to patch a file. This would require Copying the diff and then executing patch
.
I'm willing to add a patch to implement either of the two in a PR :)
I'd like to wait for the completion of #8 first to prevent issues or doing it twice (Didn't see that is was already accepted)
First, thanks for putting this together as well your infra repo! It's a great reference when IaCing my home lab.
I just tried installing this role on a new Proxmox 8 box. It looks like Proxmox 8 includes a new source for ceph which also needs to be updated. The add-no-subscription repo task fails because the ceph.list (newly added in 8 maybe?) is pointed at the enterprise repo. I manually updated this to deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription
and the task ran successfully adding the pve-no-subscription repo as expected.
The nag message tweak appears to be broken.
If you like I can try to put together the changes while trying to maintain backwards compatibility and submit a PR.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.