How can we solve conditions in ansible?
Zobrazujú sa príspevky s označením update. Zobraziť všetky príspevky
Zobrazujú sa príspevky s označením update. Zobraziť všetky príspevky
utorok 7. marca 2023
anisble playbook - update only redhat
Menovky:
ansible,
ansible inventory,
ansible task,
command,
condition,
podmienka,
RHEL,
task,
update,
yum update
Miesto:
Košice, Slovensko
pondelok 31. januára 2022
Ubuntu - expire gpg key
When we have a problem with expire gpg key
Menovky:
apt,
apt update,
apt upgrade,
apt-get,
GPG,
gpg key,
Linux,
linux basic,
Ubuntu,
update
Miesto:
Košice, Slovensko
utorok 16. novembra 2021
postinstal script for trainings
I have created postinstall script for tranings:
sobota 7. marca 2020
Virtualbox na Debiane
Na experimentovanie veľmi radi používame virtualbox. Tu sú kroky, ako si ho nainštalovať na Debian.
Menovky:
Linux,
OS,
update,
virtualbox,
zápisky linux admina
Miesto:
Košice, Slovakia
nedeľa 23. februára 2020
Skript na patching Debianu
Toto je skript na patching, update OS. Nie je to upgrade na vyššiu verziu. Keby ste potrebovali:
Menovky:
debian9,
Linux,
script,
update,
zapisky linux admina
Miesto:
Frankfurt, Germany
pondelok 13. januára 2020
Error writing to file /var/cache/yum/x86_64/
Počas updatu sa mi stala taká vec. Stále mi vyhadzovalo chybu so zapísaním do cache a skončil "yum proces". Ako sme to vyriešili?
Menovky:
admin,
administrátor,
Linux,
Oracle Linux,
update,
yum,
yum update,
Zápisky admina,
zapisky linux,
zapisky linux admina,
zápisky linux admina
Miesto:
Košice, Slovakia
streda 18. decembra 2019
Pracujeme s apt (Debian, Ubuntu, Linux Mint)
V Debianoch (Ubuntu, Linux Mint ) existuje nástroj apt alebo apt-get
utorok 17. decembra 2019
Update Debian 9
Update Debianu:
Alebo ako som si updatoval operačný systém. (Nie upgrade na novšiu verziu)
root@guliverkel:/home/martin# df -h /dev/sda3
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 15G 3.9G 11G 27% /
root@guliverkel:/home/martin# mkdir /media/data2/grub
root@guliverkel:/home/martin# cp /boot/grub/grub.cfg /media/data2/grub
root@guliverkel:/home/martin# ls -lh /media/data2/grub
total 12K
-r--r--r-- 1 root root 12K Dec 17 08:08 grub.cfg
root@guliverkel:/home/martin# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@guliverkel:/home/martin# uname -r
4.9.0-8-amd64
root@guliverkel:/home/martin# apt update
Ign:1 http://ftp.sk.debian.org/debian stretch InRelease
Get:2 http://ftp.sk.debian.org/debian stretch Release [118 kB]
Get:3 http://ftp.sk.debian.org/debian stretch Release.gpg [2,365 B]
Get:4 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:5 http://ftp.sk.debian.org/debian stretch/main Sources [6,747 kB]
Get:6 http://security.debian.org/debian-security stretch/updates/non-free Sources [1,216 B]
Get:7 http://security.debian.org/debian-security stretch/updates/main Sources [202 kB]
Get:8 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [509 kB]
Get:9 http://security.debian.org/debian-security stretch/updates/main Translation-en [224 kB]
Get:10 http://security.debian.org/debian-security stretch/updates/non-free amd64 Packages [1,596 B]
Get:11 http://ftp.sk.debian.org/debian stretch/contrib Sources [44.7 kB]
Get:12 http://ftp.sk.debian.org/debian stretch/non-free Sources [79.4 kB]
Get:13 http://ftp.sk.debian.org/debian stretch/main amd64 Packages [7,086 kB]
Get:14 http://ftp.sk.debian.org/debian stretch/main Translation-en [5,385 kB]
Get:15 http://ftp.sk.debian.org/debian stretch/non-free amd64 Packages [78.3 kB]
Get:16 http://ftp.sk.debian.org/debian stretch/non-free Translation-en [80.3 kB]
Get:17 http://ftp.sk.debian.org/debian stretch/contrib amd64 Packages [50.9 kB]
Fetched 20.7 MB in 6s (3,284 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
83 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@guliverkel:/home/martin# apt list --upgradable
Listing... Done
base-files/oldstable 9.9+deb9u11 amd64 [upgradable from: 9.9+deb9u9]
debian-archive-keyring/oldstable 2017.5+deb9u1 all [upgradable from: 2017.5]
e2fslibs/oldstable 1.43.4-2+deb9u1 amd64 [upgradable from: 1.43.4-2]
e2fsprogs/oldstable 1.43.4-2+deb9u1 amd64 [upgradable from: 1.43.4-2]
root@guliverkel:/home/martin# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
83 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 176 MB of archives.
After this operation, 244 MB of additional disk space will be used.
root@guliverkel:/home/martin# apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@guliverkel:/home/martin#
(niečo z catmanu)
root@guliverkel:/home/martin# catman
Updating cat files for section 1 of man hierarchy /usr/share/man
2to3-2.7, 2to3-3.5, 7z, 7za, 7zr, Xorg.wrap, acpi_available, add-apt-repository, apm_available, appres, appstreamcli, apropos, apt-extracttemplates, apt-ftparchive, apt-listchanges, apt-sortpkgs, ar, arch, ark, asn1parse, aspell,
root@guliverkel:/home/martin# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@guliverkel:/home/martin# uname -r
4.9.0-8-amd64
root@guliverkel:/home/martin# uptime -s
2019-12-17 08:22:25
Alebo ako som si updatoval operačný systém. (Nie upgrade na novšiu verziu)
1. Zistíme, či máme vôbec voľné miesto:
root@guliverkel:/home/martin# df -h /dev/sda3
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 15G 3.9G 11G 27% /
2. Zálohujem si grub
root@guliverkel:/home/martin# mkdir /media/data2/grub
root@guliverkel:/home/martin# cp /boot/grub/grub.cfg /media/data2/grub
root@guliverkel:/home/martin# ls -lh /media/data2/grub
total 12K
-r--r--r-- 1 root root 12K Dec 17 08:08 grub.cfg
3. Pozriem sa na to, akú konkrétnu verziu Debianu mám, plus aké mám jadro:
root@guliverkel:/home/martin# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@guliverkel:/home/martin# uname -r
4.9.0-8-amd64
4. Môžem spustiť prvý krok updatu (apt-get update) alebo v týchto novších verziách stačí apt update
root@guliverkel:/home/martin# apt update
Ign:1 http://ftp.sk.debian.org/debian stretch InRelease
Get:2 http://ftp.sk.debian.org/debian stretch Release [118 kB]
Get:3 http://ftp.sk.debian.org/debian stretch Release.gpg [2,365 B]
Get:4 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:5 http://ftp.sk.debian.org/debian stretch/main Sources [6,747 kB]
Get:6 http://security.debian.org/debian-security stretch/updates/non-free Sources [1,216 B]
Get:7 http://security.debian.org/debian-security stretch/updates/main Sources [202 kB]
Get:8 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [509 kB]
Get:9 http://security.debian.org/debian-security stretch/updates/main Translation-en [224 kB]
Get:10 http://security.debian.org/debian-security stretch/updates/non-free amd64 Packages [1,596 B]
Get:11 http://ftp.sk.debian.org/debian stretch/contrib Sources [44.7 kB]
Get:12 http://ftp.sk.debian.org/debian stretch/non-free Sources [79.4 kB]
Get:13 http://ftp.sk.debian.org/debian stretch/main amd64 Packages [7,086 kB]
Get:14 http://ftp.sk.debian.org/debian stretch/main Translation-en [5,385 kB]
Get:15 http://ftp.sk.debian.org/debian stretch/non-free amd64 Packages [78.3 kB]
Get:16 http://ftp.sk.debian.org/debian stretch/non-free Translation-en [80.3 kB]
Get:17 http://ftp.sk.debian.org/debian stretch/contrib amd64 Packages [50.9 kB]
Fetched 20.7 MB in 6s (3,284 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
83 packages can be upgraded. Run 'apt list --upgradable' to see them.
5. Tu mi vyhodí, čo bude upgradovať (len časť vypíšem)
root@guliverkel:/home/martin# apt list --upgradable
Listing... Done
base-files/oldstable 9.9+deb9u11 amd64 [upgradable from: 9.9+deb9u9]
debian-archive-keyring/oldstable 2017.5+deb9u1 all [upgradable from: 2017.5]
e2fslibs/oldstable 1.43.4-2+deb9u1 amd64 [upgradable from: 1.43.4-2]
e2fsprogs/oldstable 1.43.4-2+deb9u1 amd64 [upgradable from: 1.43.4-2]
6. spustím upgrade balíčkov:
root@guliverkel:/home/martin# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
83 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 176 MB of archives.
After this operation, 244 MB of additional disk space will be used.
7. spustím apt dist-upgrade
root@guliverkel:/home/martin# apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@guliverkel:/home/martin#
8. Keďže sa natiahli aj nejaké nové manuály, updatujem aj tie pomocou príkazu catman
catman - update man stránok(niečo z catmanu)
root@guliverkel:/home/martin# catman
Updating cat files for section 1 of man hierarchy /usr/share/man
2to3-2.7, 2to3-3.5, 7z, 7za, 7zr, Xorg.wrap, acpi_available, add-apt-repository, apm_available, appres, appstreamcli, apropos, apt-extracttemplates, apt-ftparchive, apt-listchanges, apt-sortpkgs, ar, arch, ark, asn1parse, aspell,
9. rebootujem operačný systém (reboot and pray)
init 610. zistím, či sa nezmenil grub, verziu OS a jadra:
root@guliverkel:/home/martin# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@guliverkel:/home/martin# uname -r
4.9.0-8-amd64
root@guliverkel:/home/martin# uptime -s
2019-12-17 08:22:25
Miesto:
Košice, Slovakia
Prihlásiť na odber:
Príspevky (Atom)

