Works like a charm ! Thank you <3

For once, just to tell that everything works fine for my/our needs. :relieved:

And just to share the way I do the updates / upgrades.

I use Pyinfra to run some tasks on a bunch of Yunohost 4.x.

Most of them uses Neutrinet’s VPN with fixed IPv4/v6 adresses.

Some are running on Olimex Lime1/2, old desktop PCs, Proxmox VMs in our basement and only tree of them are hosted on a « cloud » company.

Mainly used Apps (not on all those hosts) are Roundcube, Nextcloud, Dokuwiki, Mattermost, Mailman, Spip, Gitea, Custom Webapp, Redirect, etc.

I have access to all those hosts with ssh.

They are configured in my ~/.ssh/config file like this one for instance;

…
Host mabrique <- the short name used in inventory file bellow
Hostname tierce.nohost.me <- the FQDN name (or IP)
User admin <- the Yunohost Admin user (with the sudo rights)
IdentityFile ~/.ssh/ed25519 <- the key used (you can use different keys for each hosts if you prefer)
…

I have an inventory/yunohost4.py file like this one:

# on lime1 or lime2
briques = [
    'mabrique', 
    'pimpampet', 
    'lambda', 
    'gnunation'
]  

# on old desktops
barebones = [
    'aadtp',
    'royal-server'
]

# on Proxmox VMs
proxmoxvms = [
    'alfred', 
    'gnurage',
    'kilombo', 
    'zigzag'
]

# on cloud VMs
cloudvms = [
    'computhings',
    'party',
    'source'
]

And a job jobs/yunohost-upgrade.py like this one:

from pyinfra.operations import server

server.shell(
    name='Yunohost update',  # optional name for the operation
    commands='yunohost tools update',
    sudo=True,
)

server.shell(
    name='Yunohost upgrade system',  # optional name for the operation
    commands='yunohost tools upgrade system',
    sudo=True,
)

server.shell(
    name='Yunohost upgrade apps',  # optional name for the operation
    commands='yunohost tools upgrade apps',
    sudo=True,
)

And I just run those kind of commands:

pyinfra inventory/yunohost4.py exec -- uptime
pyinfra inventory/yunohost4.py jobs/yunohost-upgrade.py 
pyinfra inventory/yunohost4.py exec -- sudo yunohost tools reboot -f

And I’m sooooooo pleased that it works like a charm most of the time. :sparkler:

Thans again for everything you all do for Yunohost and those amazing Apps !

:heart:

7 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.