.. versionchanged:: 2015.8.12,2016.3.3,2016.11.0 On minions running systemd>=205, `systemd-run(1)`_ is now used to isolate commands which modify installed packages from the ``salt-minion`` daemon's control group. This is done to keep systemd from killing any apt-
(
name=None,
refresh=False,
fromrepo=None,
skip_verify=False,
debconf=None,
pkgs=None,
sources=None,
reinstall=False,
downloadonly=False,
ignore_epoch=False,
normalize=True,
**kwargs,
)
| 448 | |
| 449 | |
| 450 | def install( |
| 451 | name=None, |
| 452 | refresh=False, |
| 453 | fromrepo=None, |
| 454 | skip_verify=False, |
| 455 | debconf=None, |
| 456 | pkgs=None, |
| 457 | sources=None, |
| 458 | reinstall=False, |
| 459 | downloadonly=False, |
| 460 | ignore_epoch=False, |
| 461 | normalize=True, |
| 462 | **kwargs, |
| 463 | ): |
| 464 | """ |
| 465 | .. versionchanged:: 2015.8.12,2016.3.3,2016.11.0 |
| 466 | On minions running systemd>=205, `systemd-run(1)`_ is now used to |
| 467 | isolate commands which modify installed packages from the |
| 468 | ``salt-minion`` daemon's control group. This is done to keep systemd |
| 469 | from killing any apt-get/dpkg commands spawned by Salt when the |
| 470 | ``salt-minion`` service is restarted. (see ``KillMode`` in the |
| 471 | `systemd.kill(5)`_ manpage for more information). If desired, usage of |
| 472 | `systemd-run(1)`_ can be suppressed by setting a :mod:`config option |
| 473 | <salt.modules.config.get>` called ``systemd.scope``, with a value of |
| 474 | ``False`` (no quotes). |
| 475 | |
| 476 | .. _`systemd-run(1)`: https://www.freedesktop.org/software/systemd/man/systemd-run.html |
| 477 | .. _`systemd.kill(5)`: https://www.freedesktop.org/software/systemd/man/systemd.kill.html |
| 478 | |
| 479 | Install the passed package, add refresh=True to update the dpkg database. |
| 480 | |
| 481 | name |
| 482 | The name of the package to be installed. Note that this parameter is |
| 483 | ignored if either "pkgs" or "sources" is passed. Additionally, please |
| 484 | note that this option can only be used to install packages from a |
| 485 | software repository. To install a package file manually, use the |
| 486 | "sources" option. |
| 487 | |
| 488 | 32-bit packages can be installed on 64-bit systems by appending the |
| 489 | architecture designation (``:i386``, etc.) to the end of the package |
| 490 | name. |
| 491 | |
| 492 | CLI Example: |
| 493 | |
| 494 | .. code-block:: bash |
| 495 | |
| 496 | salt '*' pkg.install <package name> |
| 497 | |
| 498 | refresh |
| 499 | Whether or not to refresh the package database before installing. |
| 500 | |
| 501 | cache_valid_time |
| 502 | |
| 503 | .. versionadded:: 2016.11.0 |
| 504 | |
| 505 | Skip refreshing the package database if refresh has already occurred within |
| 506 | <value> seconds |
| 507 |
nothing calls this directly
no test coverage detected