userspace:opsi-pkg
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| userspace:opsi-pkg [2013/04/17 15:54] – add force mode phimeca | userspace:opsi-pkg [2021/08/23 10:37] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| The script is on github: wget https:// | The script is on github: wget https:// | ||
| - | **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 {shutdown, reboot, wakeup, delete, fire, popup " | + | [--call |
| - | [--host [HOST [HOST ...]]] [--package [PACKAGE [PACKAGE ...]]] | + | [--request |
| + | | ||
| + | | ||
| [--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 | + | |
| + | | ||
| --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 " | + | --call, -c {shutdown, reboot, wakeup, delete, fire, popup " |
| - | | + | |
| - | --setup, -s | + | --request, -r {setup, uninstall, once, update, custom, userLogin, always} |
| - | --uninstall, -u | + | Set next action (pulled by hosts) |
| + | --setup, -s | ||
| + | | ||
| --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 | + | # list package font on every computer |
| - | opsi-pkg -l -p -h | + | opsi-pkg -l -p font -h |
| + | |||
| + | # list packages | ||
| + | opsi-pkg -l -p font office | ||
| - | - | ||
| 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 -s -p firefox -h tata | + | opsi-pkg -r setup -p firefox -h tata |
| # install firefox on computers that belongs to ' | # install firefox on computers that belongs to ' | ||
| - | # already install and up-to-date | + | # already install and up-to-date |
| - | opsi-pkg -s -p firefox -hg pc --force | + | opsi-pkg -s -p firefox -hg pc --force |
| # install firefox on computers that belongs to ' | # install firefox on computers that belongs to ' | ||
| Line 110: | Line 123: | ||
| # install base packages on computers that belongs to ' | # install base packages on computers that belongs to ' | ||
| opsi-pkg -s -pg base -hg pc | opsi-pkg -s -pg base -hg pc | ||
| + | |||
| + | # uninstall firefox on computers that belongs to ' | ||
| + | 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: (external edit)
