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