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:conf:centos.html [2017/11/09 01:51] kurihara [centos.py] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~NOTOC~~ | ||
- | ====== CentOS ====== | ||
- | |||
- | |||
- | ===== Operation ===== | ||
- | |||
- | <sxh bash toolbar: | ||
- | $ echo a |fab -l |grep centos | ||
- | |||
- | $ echo xx.xx.xx.xx | fab pro centos.centos_common_init | ||
- | $ echo xx.xx.xx.xx | fab pro centos.centos_common_init | ||
- | </ | ||
- | |||
- | \\ | ||
- | ===== centos.py ===== | ||
- | |||
- | <sxh python toolbar: | ||
- | import sys | ||
- | from fabric.api import * | ||
- | from fabric.contrib import files | ||
- | |||
- | @task | ||
- | def centos_common_init(): | ||
- | # / | ||
- | sudo("/ | ||
- | put(" | ||
- | sudo(" | ||
- | |||
- | # / | ||
- | sudo("/ | ||
- | put(" | ||
- | sudo(" | ||
- | |||
- | # | ||
- | sudo("/ | ||
- | |||
- | |||
- | # | ||
- | #CentOS7 | ||
- | # | ||
- | @task | ||
- | def centos7_init(): | ||
- | # / | ||
- | sudo("/ | ||
- | put(" | ||
- | sudo(" | ||
- | |||
- | |||
- | # | ||
- | #CentOS6 | ||
- | # | ||
- | @task | ||
- | def centos6_init(): | ||
- | # / | ||
- | sudo("/ | ||
- | put(" | ||
- | sudo(" | ||
- | </ | ||
- | |||
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.