FastHandle is fast operation tools for infrastructure configurations and tests.
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
os:linux:pkg:index.html [2018/01/04 01:02] kurihara |
os:linux:pkg:index.html [2019/02/11 00:39] (current) kurihara |
||
---|---|---|---|
Line 1: | Line 1: | ||
[[: | [[: | ||
- | ====== Package Management (pkg.py) ====== | + | ====== |
$FHHOME/ | $FHHOME/ | ||
Line 7: | Line 7: | ||
\\ | \\ | ||
- | ===== Operation ===== | + | ===== Operation |
<sxh bash toolbar: | <sxh bash toolbar: | ||
$ fab -l |grep pkg | $ fab -l |grep pkg | ||
- | $ fab -H $H auth.pro | + | $ fab -H $H |
- | $ fab -H $H auth.pro | + | $ fab -H $H |
</ | </ | ||
+ | \\ | ||
+ | ==== Fabric one-line Task Examples ==== | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
$ H=test-server-01, | $ H=test-server-01, | ||
- | $ fab -H $H auth.pro | + | $ fab -H $H |
- | $ fab -H $H auth.pro | + | $ fab -H $H |
- | $ fab -H $H auth.pro | + | $ fab -H $H -- "rpm -qa --last | head -20" |
+ | </ | ||
+ | |||
+ | <sxh bash toolbar: | ||
+ | $ H=test-server-01, | ||
+ | $ fab -H $H -- dpkg -l # check installed list | ||
+ | $ fab -H $H -- apt search PACKAGE | ||
+ | $ fab -H $H -- apt show PACKAGE | ||
+ | |||
+ | $ fab -H $H -- apt update | ||
+ | $ fab -H $H -- apt install -y PACKAGE | ||
</ | </ | ||
Line 29: | Line 41: | ||
<sxh python toolbar: | <sxh python toolbar: | ||
- | import sys | + | import sys, os |
from fabric.api import * | from fabric.api import * | ||
from fabric.contrib import files | from fabric.contrib import files | ||
Line 40: | Line 52: | ||
@task | @task | ||
def check_cmd(): | def check_cmd(): | ||
- | put(" | + | put(" |
sudo(" | sudo(" | ||
Line 53: | Line 65: | ||
@task | @task | ||
def install_rpm_centos7(): | def install_rpm_centos7(): | ||
- | put(" | + | put(" |
sudo(" | sudo(" | ||
Line 77: | Line 89: | ||
|<100% 200px ->| | |<100% 200px ->| | ||
- | | [[os: | + | | [[os:linux: |
- | | [[os: | + | | [[os:linux: |
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.