User Tools

Site Tools


userspace:opsi-pkg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
userspace:opsi-pkg [2013/04/17 13:54]
phimeca add force mode
userspace:opsi-pkg [2021/08/23 08:37] (current)
Line 4: Line 4:
 The script is on github: wget https://raw.github.com/souch/opsi-misc/master/opsi-pkg and will be update/debug while I'll use it. The script is on github: wget https://raw.github.com/souch/opsi-misc/master/opsi-pkg and will be update/debug while I'll use it.
  
-**The script always ask before modifying something** on OPSI (except when using --yes switches). So anyone can test it without too much risks :-)+**The script always ask before modifying something** on OPSI (except when using --yes switches). And it warn and propose default action if something seems strange/not useful. So anyone can test it without too much risks :-)
  
 Output of the usage helper: Output of the usage helper:
Line 10: Line 10:
 $ opsi-pkg $ opsi-pkg
 usage: opsi-pkg [--help] [--quiet] [--verbose] [--debug] [--default] [--yes] usage: opsi-pkg [--help] [--quiet] [--verbose] [--debug] [--default] [--yes]
-                [--no] [--force] [--ping] [--list] [--add] [--delete] +                [--no] [--force] [--fire] [--ping] [--list] [--add] [--delete] 
-  --call {shutdownrebootwakeupdeletefirepopup "message"[-h ...+                [--call [CALL [CALL ...]]] 
-                [--host [HOST [HOST ...]]] [--package [PACKAGE [PACKAGE ...]]]+                [--request {setup,uninstall,once,update,custom,userLogin,always,none}] 
 +                [--setup] [--uninstall] [--host [HOST [HOST ...]]] 
 +                [--package [PACKAGE [PACKAGE ...]]]
                 [--host-group [HOST_GROUP [HOST_GROUP ...]]]                 [--host-group [HOST_GROUP [HOST_GROUP ...]]]
                 [--package-group [PACKAGE_GROUP [PACKAGE_GROUP ...]]]                 [--package-group [PACKAGE_GROUP [PACKAGE_GROUP ...]]]
Line 27: Line 29:
   --no                  answer no to every question   --no                  answer no to every question
   --force, -f           force doing action that does seems to be needed. e.g. install a package on a host that has already the last package installed.   --force, -f           force doing action that does seems to be needed. e.g. install a package on a host that has already the last package installed.
-  --ping                show host status (on/off)+  --fire                Fire the request now (i.e. push the request to the hosts). 
 +  --ping                show hosts status (on/off)
   --list, -l            List something. Combine it with: -h, -p, -h -p, -hg, -pg.   --list, -l            List something. Combine it with: -h, -p, -h -p, -hg, -pg.
   --add, -a             Add something. Combine it with: -hg, -pg, -hg -h, -pg -p   --add, -a             Add something. Combine it with: -hg, -pg, -hg -h, -pg -p
   --delete, -d          Delete something. Combine it with: -hg, -pg, -hg -h, -pg -p.   --delete, -d          Delete something. Combine it with: -hg, -pg, -hg -h, -pg -p.
-  --call {shutdown, reboot, wakeup, delete, fire, popup "message"[-h ...] +  --call, -c {shutdown, reboot, wakeup, delete, fire, popup "message"
-                        Call an action on given hosts. Combine it with: -hg, -h. +                        Launch action (push it to hosts). Combine it with: -h, -hg 
-  --setup, -s           Install products on given hosts. Combine it with: -h, -p. +  --request, -r {setup, uninstall, once, update, custom, userLogin, always} 
-  --uninstall, -u       Uninstall products on given hostsCombine it with: -h, -p.+                        Set next action (pulled by hosts) on given hosts and packages. Combine it with: -h, -hg, -p, -pg, --fire
 +  --setup, -s           Shortcut for "-request setup". 
 +  --uninstall, -u       Shortcut for "-request uninstall".
   --host [HOST [HOST ...]], -h [HOST [HOST ...]]   --host [HOST [HOST ...]], -h [HOST [HOST ...]]
                         Do sthg with host. No host given means every hosts.)                         Do sthg with host. No host given means every hosts.)
Line 54: Line 59:
  
 - -
 +
 +# list installed packages on every computer
 +opsi-pkg -l -p -h
  
 # list installed packages on tata computer # list installed packages on tata computer
 opsi-pkg -l -p -h tata opsi-pkg -l -p -h tata
  
-# list installed packages on every computer +# list package font on every computer 
-opsi-pkg -l -p -h+opsi-pkg -l -p font -h 
 + 
 +# list packages  font and office  on  tata and titi  computers 
 +opsi-pkg -l -p font office -h tata titi
  
 - -
Line 97: Line 108:
 # delete host tutu from OPSI # delete host tutu from OPSI
 opsi-pkg -c delete -h tutu opsi-pkg -c delete -h tutu
 +
 +-
  
 # install firefox on computer tata # install firefox on computer tata
-opsi-pkg --p firefox -h tata+opsi-pkg -r setup -p firefox -h tata
  
 # install firefox on computers that belongs to 'pc' host group even if it is  # install firefox on computers that belongs to 'pc' host group even if it is 
-# already install and up-to-date +# already install and up-to-date and push the setup now 
-opsi-pkg -s -p firefox -hg pc --force+opsi-pkg -s -p firefox -hg pc --force --fire
  
 # install firefox on computers that belongs to 'pc' host group # install firefox on computers that belongs to 'pc' host group
Line 110: Line 123:
 # install base packages on computers that belongs to 'pc' host group # install base packages on computers that belongs to 'pc' host group
 opsi-pkg -s -pg base -hg pc opsi-pkg -s -pg base -hg pc
 +
 +# uninstall firefox on computers that belongs to 'pc' host group
 +opsi-pkg -u -p firefox -hg pc
 +
 +# reset request on package firefox of the computer tata
 +opsi-pkg -r none -p firefox -h tata
  
 ====== ======
userspace/opsi-pkg.1366206863.txt.gz · Last modified: 2021/08/23 08:37 (external edit)