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 Last revision Both sides next revision | ||
middleware:squid:index.html [2018/01/07 01:14] kurihara [squid.py] |
middleware:squid:index.html [2018/02/21 23:51] kurihara |
||
---|---|---|---|
Line 16: | Line 16: | ||
</ | </ | ||
+ | \\ | ||
+ | ==== Fabric Temporary Run Call Examples ==== | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
$ H=test-serve-01, | $ H=test-serve-01, | ||
Line 33: | Line 35: | ||
<sxh bash toolbar: | <sxh bash 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 62: | Line 64: | ||
# Configuration | # Configuration | ||
# | # | ||
- | # squid.conf | + | # squid.change_squidconf: |
- | @task | + | |
- | def put_today_conf(): | + | |
- | today = datetime.now().strftime(' | + | |
- | put(" | + | |
- | sudo(" | + | |
- | sudo("/ | + | |
@task | @task | ||
- | def change_today_conf(): | + | def change_squidconf(host): |
today = datetime.now().strftime(' | today = datetime.now().strftime(' | ||
sudo(" | sudo(" | ||
- | put(" | + | put(" |
- | sudo("chown root:squid / | + | sudo("mv /tmp/squid.conf.%s |
</ | </ | ||
Line 81: | Line 76: | ||
\\ | \\ | ||
- | ===== Configuration ===== | + | ===== Squid Configuration |
+ | *[[middleware: | ||
*[[middleware: | *[[middleware: | ||
My Sites
SNS
Copyright (c) 2024 FastHandle - IT Operations Examples All Rights Reserved.