Skip to content

wekan/wauto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update many OS servers

  • ssh to server, detects server OS, runs OS-specific update etc commands
  • Alternative to Ansible, SaltStack etc.
  • Count of OS-specific commands:
./count-os.sh
common|20647
linux|7247
osx|3104
windows|1947
android|302
freebsd|249
openbsd|125
netbsd|113
sunos|93
dos|68
cisco-ios|61
amiga|9
ubuntu|7
haiku|4
fedora / rhel|4
pacman (arch / manjaro)|3
alpinelinux|3
  • Count of language-specific OS command descriptions from TLDR-pages. It uses your current language, with fallback to English:
./count-lang.sh 
alpinelinux|en 3
amiga|en 9
android|ar 1 bn 14 de 14 en 14 es 14 fa 14 fr 14 hi 14 id 14 it 14 ja 14 ko 14 ne 4 nl 14 pl 14 pt_BR 14 pt_PT 13 ru 14 ta 14 tr 14 uk 14 uz 6 zh 14 zh_TW 12
cisco-ios|en 17 es 17 id 10 it 17
common|ar 279 bn 264 bs 231 ca 222 cs 228 da 216 de 515 el 211 en 4446 es 1039 fa 289 fi 204 fr 573 hi 272 id 564 it 719 ja 306 ko 3501 lo 212 ml 217 ne 219 nl 905 no 224 pl 312 pt_BR 597 pt_PT 225 ro 235 ru 462 sr 212 sv 237 ta 284 th 221 tr 384 uk 254 uz 207 zh 909 zh_TW 252
dos|ar 1 bn 1 bs 1 ca 1 cs 1 da 1 de 2 el 1 en 26 es 1 fa 1 fi 1 fr 1 hi 2 id 1 it 1 ja 1 ko 1 lo 1 ml 1 ne 1 nl 2 no 1 pl 1 pt_BR 1 pt_PT 1 ro 1 ru 1 sr 1 sv 1 ta 1 th 1 tr 1 uk 1 uz 1 zh 4 zh_TW 1
fedora / rhel|en 4
freebsd|ar 5 bn 6 bs 5 ca 5 cs 5 da 5 de 5 el 5 en 19 es 8 fa 5 fi 5 fr 5 hi 13 id 8 it 5 ja 5 ko 13 lo 5 ml 5 ne 5 nl 15 no 5 pl 13 pt_BR 13 pt_PT 5 ro 5 ru 6 sr 5 sv 5 ta 5 th 5 tr 5 uk 5 uz 5 zh 5 zh_TW 5
haiku|en 4
linux|ar 85 bn 104 bs 64 ca 133 cs 73 da 64 de 154 el 63 en 1822 es 577 fa 79 fi 64 fr 145 hi 97 id 148 it 174 ja 78 ko 1263 lo 64 ml 78 ne 64 nl 269 no 65 pl 164 pt_BR 229 pt_PT 76 ro 63 ru 109 sr 63 sv 65 ta 115 th 65 tr 140 uk 90 uz 63 zh 211 zh_TW 67
netbsd|ar 2 bn 2 bs 2 ca 2 cs 2 da 2 de 2 el 2 en 11 es 6 fa 2 fi 2 fr 2 hi 8 id 4 it 2 ja 2 ko 8 lo 2 ml 2 ne 2 nl 8 no 2 pl 8 pt_BR 2 pt_PT 2 ro 2 ru 2 sr 2 sv 2 ta 2 th 2 tr 2 uk 2 uz 2 zh 2 zh_TW 2
openbsd|ar 2 bn 2 bs 2 ca 2 cs 2 da 2 de 2 el 2 en 16 es 2 fa 2 fi 2 fr 2 hi 10 id 7 it 2 ja 2 ko 10 lo 2 ml 2 ne 2 nl 10 no 2 pl 10 pt_BR 2 pt_PT 2 ro 2 ru 2 sr 2 sv 2 ta 2 th 2 tr 2 uk 2 uz 2 zh 2 zh_TW 2
osx|ar 3 bn 5 bs 3 ca 3 cs 3 da 3 de 149 el 3 en 358 es 276 fa 3 fi 3 fr 114 hi 115 id 132 it 125 ja 3 ko 316 lo 3 ml 3 ne 3 nl 188 no 3 pl 152 pt_BR 176 pt_PT 122 ro 4 ru 143 sr 3 sv 3 ta 116 th 133 tr 113 uk 3 uz 3 zh 201 zh_TW 115
pacman (arch / manjaro)|en 3
sunos|bn 1 en 11 es 1 fr 8 hi 9 id 10 ko 9 nl 10 pl 9 ro 5 ru 1 ta 9 tr 9 zh 1
ubuntu|en 7
windows|ar 20 bn 45 bs 20 ca 23 cs 19 da 19 de 53 el 18 en 260 es 230 fa 22 fi 18 fr 42 hi 82 id 59 it 53 ja 50 ko 223 lo 21 ml 20 ne 21 nl 93 no 20 pl 46 pt_BR 42 pt_PT 21 ro 18 ru 43 sr 18 sv 23 ta 58 th 27 tr 21 uk 19 uz 18 zh 113 zh_TW 49

Why?

I was installing SaltStack, configuring salt-master, salt-minion etc, and it needed many manual steps to install to Ubuntu s390x, RHEL 9.1 s390x, etc, where is no prebuilt packages. For some platforms, salt-minion did not work, so I had to use slower salt-ssh. I then did many steps to remove SaltStack and reinvented the wheel.

Example 1: Update RHEL s390x

~/repos/wauto$ ./run.py sr update
[*] Connecting: sr...
[*] Target Platform: FEDORA / RHEL (s390x)

[>>>] RUNNING: sudo dnf -y upgrade && sudo dnf -y autoremove
Updating Subscription Management repositories.
ookla_speedtest-cli                             749  B/s | 833  B     00:01    
ookla_speedtest-cli-source                      1.1 kB/s | 833  B     00:00    
Dependencies resolved.
Nothing to do.
Complete!
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:02 ago on Mon 16 Mar 2026 02:27:28 PM CDT.
Dependencies resolved.
Nothing to do.
Complete!

Example 2: Update Ubuntu x86_64

~/repos/wauto$ ./run.py 20i update
[*] Connecting: 20i...
[*] Target Platform: UBUNTU (x86_64)
[!] Skipping flatpak (not installed)

[>>>] RUNNING: sudo apt update && sudo apt -y dist-upgrade && sudo snap refresh
Get:1 http://security.ubuntu.com/ubuntu questing-security InRelease [136 kB]
Get:2 http://security.ubuntu.com/ubuntu questing-security/main amd64 Components [448 B]
Get:3 http://security.ubuntu.com/ubuntu questing-security/restricted amd64 Components [212 B]
Get:4 http://security.ubuntu.com/ubuntu questing-security/universe amd64 Components [10.8 kB]
Get:5 http://security.ubuntu.com/ubuntu questing-security/multiverse amd64 Components [212 B]
Hit:6 http://archive.ubuntu.com/ubuntu questing InRelease                      
Get:7 http://archive.ubuntu.com/ubuntu questing-updates InRelease [136 kB]     
Get:8 http://archive.ubuntu.com/ubuntu questing-backports InRelease [133 kB]   
Hit:9 https://packages.broadcom.com/artifactory/saltproject-deb stable InRelease
Get:10 http://archive.ubuntu.com/ubuntu questing-updates/main amd64 Packages [335 kB]
Get:11 http://archive.ubuntu.com/ubuntu questing-updates/main amd64 Components [50.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu questing-updates/restricted amd64 Components [212 B]
Get:13 http://archive.ubuntu.com/ubuntu questing-updates/universe amd64 Components [42.1 kB]
Get:14 http://archive.ubuntu.com/ubuntu questing-updates/multiverse amd64 Components [212 B]
Get:15 http://archive.ubuntu.com/ubuntu questing-backports/main amd64 Components [212 B]
Get:16 http://archive.ubuntu.com/ubuntu questing-backports/restricted amd64 Components [216 B]
Get:17 http://archive.ubuntu.com/ubuntu questing-backports/universe amd64 Components [5732 B]
Get:18 http://archive.ubuntu.com/ubuntu questing-backports/multiverse amd64 Components [216 B]
Fetched 850 kB in 1s (859 kB/s)     
All packages are up to date.    
Summary:                        
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0
core 16-2.61.4-20251009 from Canonical✓ refreshed

Example 3: List Amiga commands

~/repos/wauto$ cat ami.sh 
./list.py ls amiga
~/repos/wauto$ ./ami.sh 
--- Translating: ls -> amiga ---

[Score: 0.98]
Command: list
Syntax:  list
Desc:    List directory contents

[Score: 0.62]
Command: type
Syntax:  type {{file}}
Desc:    Display file contents

[Score: 0.53]
Command: copy
Syntax:  copy {{source}} to {{destination}}
Desc:    Copy files or directories

[Score: 0.51]
Command: list
Syntax:  list files
Desc:    List files only

[Score: 0.51]
Command: delete
Syntax:  delete {{path}}
Desc:    Remove files or directories

SSH server settings

  1. SSH servers configured at .ssh/config:
Host sr
        Hostname 123.123.123.123
        User linux1
        IdentityFile ~/.ssh/id_rsa
  1. At that server is configured passwordless sudo, editing like this:
sudo su
export EDITOR=nano
visudo

There is passwordless config:

linux1  ALL=(ALL:ALL) NOPASSWD:ALL

Required: SQLite database of Shell Recipes

Download from https://github.com/wekan/wauto/releases/tag/0.01 and add it to wauto/shell-recipes.db

Or create it manually, to convert tldr-pages to SQLite database ../shell-recipes.db:

./deps.sh
cd db
./start.sh
cd ..

Output:

/db$ ./start.sh 
[*] Starting download: https://github.com/tldr-pages/tldr/archive/refs/heads/main.zip
[+] Attempting download with wget...
[OK] Download successful using wget.
Opening tldr.zip and updating the database...
Done! Added 33943 recipes from TLDR archive.
Done! Added 9 new recipes from AmigaShell.
Done! Added 36 new recipes from file BSD.md.

About

Run updates etc at many OS. Alternative to Ansible and SaltStack. Supports many OS and languages from TLDR pages.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors