apt-upgrade
Description
Performs an apt upgrade.
Variables
Name | Type | Default | Description |
---|---|---|---|
|
integer | -- | Update the apt cache if its older than the cache_valid_time. This option is set in seconds. |
|
boolean | True | Whether to upgrade the apt cache before upgrading. |
|
string | default | The type of the upgrade. |
Code
doc: short_help: Performs an apt upgrade. args: upgrade_type: doc: short_help: The type of the upgrade. type: string allowed: - dist - full - safe - default default: default update_cache: doc: short_help: Whether to upgrade the apt cache before upgrading. type: boolean default: true required: false cache_valid_time: doc: short_help: Update the apt cache if its older than the cache_valid_time. This option is set in seconds. type: integer required: false frecklets: - frecklet: name: apt type: ansible-module properties: internet: true elevated: true idempotent: false task: become: true vars: upgrade: '{{:: upgrade_type ::}}' update_cache: '{{:: update_cache ::}}' cache_valid_time: '{{:: cache_valid_time ::}}'
frecklecute apt-upgrade --help Usage: frecklecute apt-upgrade [OPTIONS] Performs an apt upgrade. Options: --cache-valid-time CACHE_VALID_TIME Update the apt cache if its older than the cache_valid_time. This option is set in seconds. --update-cache / --no-update-cache Whether to upgrade the apt cache before upgrading. --upgrade-type UPGRADE_TYPE The type of the upgrade. --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.apt_upgrade.AptUpgrade # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class AptUpgrade(AutoPycklet): """Performs an apt upgrade. Args: cache_valid_time: Update the apt cache if its older than the cache_valid_time. This option is set in seconds. update_cache: Whether to upgrade the apt cache before upgrading. upgrade_type: The type of the upgrade. """ FRECKLET_ID = "apt-upgrade" cache_valid_time: int = None update_cache: bool = None upgrade_type: str = None def __post_init__(self): super(AptUpgrade, self).__init__(var_names=["cache_valid_time", "update_cache", "upgrade_type"]) frecklet_class = AptUpgrade
# -*- coding: utf-8 -*- # # module path: pycklets.apt_upgrade.AptUpgrade # from pyckles import AutoPycklet class AptUpgrade(AutoPycklet): """Performs an apt upgrade. Args: cache_valid_time: Update the apt cache if its older than the cache_valid_time. This option is set in seconds. update_cache: Whether to upgrade the apt cache before upgrading. upgrade_type: The type of the upgrade. """ FRECKLET_ID = "apt-upgrade" def __init__(self, cache_valid_time=None, update_cache=True, upgrade_type="default"): super(AptUpgrade, self).__init__(var_names=["cache_valid_time", "update_cache", "upgrade_type"]) self._cache_valid_time = cache_valid_time self._update_cache = update_cache self._upgrade_type = upgrade_type @property def cache_valid_time(self): return self._cache_valid_time @cache_valid_time.setter def cache_valid_time(self, cache_valid_time): self._cache_valid_time = cache_valid_time @property def update_cache(self): return self._update_cache @update_cache.setter def update_cache(self, update_cache): self._update_cache = update_cache @property def upgrade_type(self): return self._upgrade_type @upgrade_type.setter def upgrade_type(self, upgrade_type): self._upgrade_type = upgrade_type frecklet_class = AptUpgrade