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/12/11 00:08] kurihara |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | [[os: | ||
- | ~~NOTOC~~ | ||
- | ====== CentOS Service Enable/ | ||
- | |||
- | ===== 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(): | ||
- | #enable | ||
- | sudo(" | ||
- | sudo(" | ||
- | |||
- | #disable | ||
- | sudo(" | ||
- | sudo(" | ||
- | |||
- | |||
- | |||
- | # | ||
- | # CentOS6 | ||
- | # | ||
- | |||
- | </ | ||
- | |||
- | |||
- | \\ | ||
- | <WRAP box 90%> | ||
- | [[os: | ||
- | <catlist -noAddPageButton -noHead> | ||
- | </ | ||
- | |||
- | \\ | ||
- | [[os: |
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.