FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


os:linux:user:index.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
os:linux:user:index.html [2018/02/21 23:46]
kurihara
os:linux:user:index.html [2018/07/11 00:41]
kurihara
Line 39: Line 39:
  
  
-==== Fabric Temporary Run Call Examples====+==== Fabric one-line Task Examples====
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 $ H=test-server-1 $ H=test-server-1
Line 102: Line 102:
 def check_group(group): def check_group(group):
     """user.check_group:group01"""     """user.check_group:group01"""
-    res = run("grep %s /etc/group" % group, warn_only=True)+    res = run("grep ^%s /etc/group" % group, warn_only=True)
     if res.failed is True:     if res.failed is True:
         puts(red("There isn't %s in %s." % (group, env.host_string)))         puts(red("There isn't %s in %s." % (group, env.host_string)))


os/linux/user/index.html.txt · Last modified: 2019/02/11 00:39 by kurihara