rcmd 1.5.7 → 1.5.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bb34dd7c7663c40fe295bfc853479d86117bfa0
4
- data.tar.gz: dc70389983d3396f48b06cb716624c56d3edf71f
3
+ metadata.gz: db367fb9ee0a345d21efe9d34e2e1a82a825567d
4
+ data.tar.gz: 45e96daee3ac72dd2a3cdda0f576adc8553aa193
5
5
  SHA512:
6
- metadata.gz: 7b16f91d267942649db6d7f6eb8469bbc7f4ef05569b5343f5acd69cdb0bdd313019bec92a3449d0ac5c42b71773e9f326e19edafe6534e0f4ddce04d2303541
7
- data.tar.gz: 02ef6994b956732e0aae1930d2d11f07c48001eb7a30cec7ece6c21279279f90ab359562340e20c80b2280002d228eb48882c3e932622cf7100e577c0e45c70a
6
+ metadata.gz: 3fd26cf8b227ee8ace5e8fadc4b0f9591d67355d8c84ef0dbf3833bf099e1a0763ac6d63a3e96f2a69417abadac71942baeee8a5865366814b628296c4d4d1a0
7
+ data.tar.gz: 0747e55128628ae496d87d734134e09677a2b2d7042a55c07e9a3e4bbf19cfef8464d7a89d1cd3ab14ca86300b53dc3fb372971855ef1f8ec2a37d55f2fc2c60
data/.rspec_status CHANGED
@@ -1,9 +1,9 @@
1
1
  example_id | status | run_time |
2
2
  ------------------------ | ------ | --------------- |
3
- ./spec/rcmd_spec.rb[1:1] | passed | 0.00039 seconds |
4
- ./spec/rcmd_spec.rb[1:2] | passed | 0.00062 seconds |
5
- ./spec/rcmd_spec.rb[1:3] | passed | 0.00046 seconds |
6
- ./spec/rcmd_spec.rb[1:4] | passed | 0.00007 seconds |
7
- ./spec/rcmd_spec.rb[1:5] | passed | 0.00006 seconds |
8
- ./spec/rcmd_spec.rb[1:6] | passed | 0.00067 seconds |
9
- ./spec/rcmd_spec.rb[1:7] | passed | 0.00008 seconds |
3
+ ./spec/rcmd_spec.rb[1:1] | passed | 0.00064 seconds |
4
+ ./spec/rcmd_spec.rb[1:2] | passed | 0.00101 seconds |
5
+ ./spec/rcmd_spec.rb[1:3] | passed | 0.00088 seconds |
6
+ ./spec/rcmd_spec.rb[1:4] | passed | 0.00012 seconds |
7
+ ./spec/rcmd_spec.rb[1:5] | passed | 0.00012 seconds |
8
+ ./spec/rcmd_spec.rb[1:6] | passed | 0.00178 seconds |
9
+ ./spec/rcmd_spec.rb[1:7] | passed | 0.00015 seconds |
data/Gemfile.lock CHANGED
@@ -1,9 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rcmd (1.5.7)
4
+ rcmd (1.5.8)
5
5
  io-console
6
6
  net-ssh
7
+ regexp-examples
7
8
  thread
8
9
  tty-prompt
9
10
 
@@ -12,13 +13,15 @@ GEM
12
13
  specs:
13
14
  diff-lcs (1.3)
14
15
  equatable (0.5.0)
15
- io-console (0.4.2)
16
+ hitimes (1.2.6)
17
+ io-console (0.4.6)
16
18
  necromancer (0.4.0)
17
- net-ssh (4.1.0)
19
+ net-ssh (4.2.0)
18
20
  pastel (0.7.1)
19
21
  equatable (~> 0.5.0)
20
22
  tty-color (~> 0.4.0)
21
23
  rake (10.5.0)
24
+ regexp-examples (1.3.2)
22
25
  rspec (3.6.0)
23
26
  rspec-core (~> 3.6.0)
24
27
  rspec-expectations (~> 3.6.0)
@@ -33,14 +36,19 @@ GEM
33
36
  rspec-support (~> 3.6.0)
34
37
  rspec-support (3.6.0)
35
38
  thread (0.2.2)
39
+ timers (4.1.2)
40
+ hitimes
36
41
  tty-color (0.4.2)
37
- tty-cursor (0.4.0)
38
- tty-prompt (0.12.0)
42
+ tty-cursor (0.5.0)
43
+ tty-prompt (0.13.2)
39
44
  necromancer (~> 0.4.0)
40
45
  pastel (~> 0.7.0)
41
- tty-cursor (~> 0.4.0)
42
- wisper (~> 1.6.1)
43
- wisper (1.6.1)
46
+ timers (~> 4.1.2)
47
+ tty-cursor (~> 0.5.0)
48
+ tty-reader (~> 0.1.0)
49
+ tty-reader (0.1.0)
50
+ wisper (~> 2.0.0)
51
+ wisper (2.0.0)
44
52
 
45
53
  PLATFORMS
46
54
  ruby
@@ -52,4 +60,4 @@ DEPENDENCIES
52
60
  rspec (~> 3.0, >= 2.0.0)
53
61
 
54
62
  BUNDLED WITH
55
- 1.15.1
63
+ 1.15.4
data/README.md CHANGED
@@ -21,14 +21,15 @@ rcmd is available as a gem and kan be installed with `gem install rcmd`
21
21
  ## Help Screen
22
22
 
23
23
  ```bash
24
- daibhidh@darkstar:~/$ rcmd --help
25
24
  Usage: rcmd [options]
26
25
  -u, --username username Username for SSH connections
27
26
  -n, --nodes x,y,z Comma seperated list of nodes. use '-' for a space seperated list piped from another command
27
+ -r, --regexp regex Use Regex to build host list (ruby regexp)
28
28
  -t, --threads threads Number of threads to run
29
29
  -c, --command <command> Quoted string containing the command to be run
30
30
  -q, --quiet Suppress stdout of commands. stderr will still be displayed
31
- -v, --version Print what version of the command is in use
31
+ -v, --version Print what version of the command is in use
32
+ -D, --debug Print debug information
32
33
  ```
33
34
 
34
35
  ## Specifying nodes manually
@@ -56,8 +57,21 @@ node2.example.com :: Red Hat Enterprise Linux ComputeNode release 6.8 (Santiago)
56
57
  node4.example.com :: Red Hat Enterprise Linux ComputeNode release 6.9 (Santiago)
57
58
  ```
58
59
 
59
- ## Using a database for obtaining nodes
60
- TODO
60
+ ## Using regex to build node list
61
+ ```bash
62
+ daibhidh@darkstar:~/$ rcmd -r 'node([1-9]|1[1-2])$' -c 'hostname -f'
63
+ node2 :: node2.example.com
64
+ node1 :: node1.example.com
65
+ node4 :: node4.example.com
66
+ node3 :: node3.example.com
67
+ node5 :: node5.example.com
68
+ node6 :: node6.example.com
69
+ node8 :: node8.example.com
70
+ node7 :: node7.example.com
71
+ node11 :: CONNECT ERROR :: Unable to connect to host!
72
+ node9 :: node9.example.com
73
+ node12 :: node12.example.com
74
+ ```
61
75
 
62
76
  # Development
63
77
 
@@ -2,60 +2,57 @@
2
2
 
3
3
  <html>
4
4
  <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
5
+ <meta charset="UTF-8">
6
6
 
7
7
  <title>module OptionParser - RDoc Documentation</title>
8
8
 
9
- <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
-
11
9
  <script type="text/javascript">
12
10
  var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
13
12
  </script>
14
13
 
15
- <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
- <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
- <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
- <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
- <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
- <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
21
 
22
+ <body id="top" role="document" class="module">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
22
29
 
23
- <body id="top" class="module">
24
- <nav id="metadata">
25
- <nav id="home-section" class="section">
26
- <h3 class="section-header">
27
- <a href="./index.html">Home</a>
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
28
32
  <a href="./table_of_contents.html#classes">Classes</a>
29
33
  <a href="./table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
34
+ </div>
35
+ </div>
33
36
 
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
35
38
  <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
38
43
  title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
44
+ </div>
41
45
 
42
- <ul id="search-results" class="initially-hidden"></ul>
43
- </nav>
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
44
51
 
52
+ </div>
45
53
 
46
54
 
47
55
 
48
- <div id="file-metadata">
49
- <nav id="file-list-section" class="section">
50
- <h3 class="section-header">Defined In</h3>
51
- <ul>
52
- <li>exe/rcmd
53
- </ul>
54
- </nav>
55
-
56
-
57
- </div>
58
-
59
56
  <div id="class-metadata">
60
57
 
61
58
 
@@ -63,39 +60,16 @@
63
60
 
64
61
 
65
62
  </div>
66
-
67
- <div id="project-metadata">
68
- <nav id="fileindex-section" class="section project-section">
69
- <h3 class="section-header">Pages</h3>
70
-
71
- <ul>
72
-
73
- <li class="file"><a href="./README_md.html">README</a>
74
-
75
- </ul>
76
63
  </nav>
77
64
 
78
- <nav id="classindex-section" class="section project-section">
79
- <h3 class="section-header">Class and Module Index</h3>
65
+ <main role="main" aria-labelledby="module-OptionParser">
66
+ <h1 id="module-OptionParser" class="module">
67
+ module OptionParser
68
+ </h1>
80
69
 
81
- <ul class="link-list">
82
-
83
- <li><a href="./OptionParser.html">OptionParser</a>
84
-
85
- <li><a href="./Rcmd.html">Rcmd</a>
86
-
87
- </ul>
88
- </nav>
89
-
90
- </div>
91
- </nav>
92
-
93
- <div id="documentation">
94
- <h1 class="module">module OptionParser</h1>
95
-
96
- <div id="description" class="description">
70
+ <section class="description">
97
71
 
98
- </div><!-- description -->
72
+ </section>
99
73
 
100
74
 
101
75
 
@@ -109,16 +83,14 @@
109
83
 
110
84
 
111
85
 
112
- <!-- Methods -->
113
86
 
114
- </section><!-- 5Buntitled-5D -->
115
-
116
- </div><!-- documentation -->
87
+ </section>
88
+ </main>
117
89
 
118
90
 
119
- <footer id="validator-badges">
120
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
121
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
122
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
91
+ <footer id="validator-badges" role="contentinfo">
92
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
93
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
94
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
123
95
  </footer>
124
96
 
@@ -2,104 +2,97 @@
2
2
 
3
3
  <html>
4
4
  <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
5
+ <meta charset="UTF-8">
6
6
 
7
7
  <title>README - RDoc Documentation</title>
8
8
 
9
- <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
-
11
9
  <script type="text/javascript">
12
10
  var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
13
12
  </script>
14
13
 
15
- <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
- <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
- <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
- <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
- <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
- <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
21
 
22
+ <body id="top" role="document" class="file">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
22
29
 
23
- <body class="file">
24
- <nav id="metadata">
25
- <nav id="home-section" class="section">
26
- <h3 class="section-header">
27
- <a href="./index.html">Home</a>
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
28
32
  <a href="./table_of_contents.html#classes">Classes</a>
29
33
  <a href="./table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
34
+ </div>
35
+ </div>
33
36
 
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
35
38
  <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
38
43
  title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
44
+ </div>
41
45
 
42
- <ul id="search-results" class="initially-hidden"></ul>
43
- </nav>
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
44
51
 
52
+ </div>
45
53
 
46
54
 
47
- <div id="table-of-contents">
48
- <nav class="section">
49
- <h3 class="section-header">Table of Contents</h3>
50
- <ul>
51
- <li><a href="#label-Description">Description</a>
52
- <li><a href="#label-Features">Features</a>
53
- <li><a href="#label-Installation">Installation</a>
54
- <li><a href="#label-Usage+Examples">Usage Examples</a>
55
- <li><a href="#label-Help+Screen">Help Screen</a>
56
- <li><a href="#label-Specifying+nodes+manually">Specifying nodes manually</a>
57
- <li><a href="#label-Piping+list+of+nodes">Piping list of nodes</a>
58
- <li><a href="#label-Using+a+database+for+obtaining+nodes">Using a database for obtaining nodes</a>
59
- <li><a href="#label-Development">Development</a>
60
- </ul>
61
- </nav>
55
+ <div class="nav-section">
56
+ <h3>Table of Contents</h3>
57
+
58
+ <ul class="link-list" role="directory">
59
+ <li><a href="#label-Description">Description</a>
60
+ <li><a href="#label-Features">Features</a>
61
+ <li><a href="#label-Installation">Installation</a>
62
+ <li><a href="#label-Usage+Examples">Usage Examples</a>
63
+ <li><a href="#label-Help+Screen">Help Screen</a>
64
+ <li><a href="#label-Specifying+nodes+manually">Specifying nodes manually</a>
65
+ <li><a href="#label-Piping+list+of+nodes">Piping list of nodes</a>
66
+ <li><a href="#label-Using+regex+to+build+node+list">Using regex to build node list</a>
67
+ <li><a href="#label-Development">Development</a>
68
+ </ul>
62
69
  </div>
63
70
 
64
71
 
65
72
  <div id="project-metadata">
66
- <nav id="fileindex-section" class="section project-section">
67
- <h3 class="section-header">Pages</h3>
68
-
69
- <ul>
70
-
71
- <li class="file"><a href="./README_md.html">README</a>
72
-
73
- </ul>
74
- </nav>
75
-
76
- <nav id="classindex-section" class="section project-section">
77
- <h3 class="section-header">Class and Module Index</h3>
73
+ <div id="fileindex-section" class="nav-section">
74
+ <h3>Pages</h3>
78
75
 
79
76
  <ul class="link-list">
80
77
 
81
- <li><a href="./OptionParser.html">OptionParser</a>
82
-
83
- <li><a href="./Rcmd.html">Rcmd</a>
78
+ <li><a href="./README_md.html">README</a>
84
79
 
85
80
  </ul>
86
- </nav>
81
+ </div>
87
82
 
88
83
  </div>
89
84
  </nav>
90
85
 
91
- <div id="documentation" class="description">
92
-
93
- <h1 id="label-Description">Description<span><a href="#label-Description">&para;</a> <a href="#documentation">&uarr;</a></span></h1>
86
+ <main role="main" aria-label="Page README.md">
87
+
88
+ <h1 id="label-Description">Description<span><a href="#label-Description">&para;</a> <a href="#top">&uarr;</a></span></h1>
94
89
 
95
90
  <p>rcmd (remote command) is a command line utility written in Ruby for
96
- executing the same command on
97
- multiple systems through ssh. This is done by
98
- assigning a host to a
99
- thread and creating the ssh sessions in those
91
+ executing the same command on multiple systems through ssh. This is done by
92
+ assigning a host to a thread and creating the ssh sessions in those
100
93
  threads.</p>
101
94
 
102
- <h2 id="label-Features">Features<span><a href="#label-Features">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
95
+ <h2 id="label-Features">Features<span><a href="#label-Features">&para;</a> <a href="#top">&uarr;</a></span></h2>
103
96
  <ul><li>
104
97
  <p>Command line switch for setting number of threads to be used at a time.
105
98
  (Default is 4)</p>
@@ -115,70 +108,65 @@ the node list.</p>
115
108
  <p>Stdout can be suppressed, only allowing for stderr to be shown</p>
116
109
  </li></ul>
117
110
 
118
- <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
111
+ <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#top">&uarr;</a></span></h2>
119
112
 
120
113
  <p>rcmd is available as a gem and kan be installed with <code>gem install
121
114
  rcmd</code></p>
122
115
 
123
- <h1 id="label-Usage+Examples">Usage Examples<span><a href="#label-Usage+Examples">&para;</a> <a href="#documentation">&uarr;</a></span></h1>
116
+ <h1 id="label-Usage+Examples">Usage Examples<span><a href="#label-Usage+Examples">&para;</a> <a href="#top">&uarr;</a></span></h1>
124
117
 
125
- <h2 id="label-Help+Screen">Help Screen<span><a href="#label-Help+Screen">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
118
+ <h2 id="label-Help+Screen">Help Screen<span><a href="#label-Help+Screen">&para;</a> <a href="#top">&uarr;</a></span></h2>
126
119
 
127
- <pre>daibhidh@darkstar:~/$ rcmd --help
128
- Usage: rcmd [options]
120
+ <pre>Usage: rcmd [options]
129
121
  -u, --username username Username for SSH connections
130
122
  -n, --nodes x,y,z Comma seperated list of nodes. use &#39;-&#39; for a space seperated list piped from another command
123
+ -r, --regexp regex Use Regex to build host list (ruby regexp)
131
124
  -t, --threads threads Number of threads to run
132
125
  -c, --command &lt;command&gt; Quoted string containing the command to be run
133
126
  -q, --quiet Suppress stdout of commands. stderr will still be displayed
134
- -v, --version Print what version of the command is in use</pre>
127
+ -v, --version Print what version of the command is in use
128
+ -D, --debug Print debug information</pre>
135
129
 
136
- <h2 id="label-Specifying+nodes+manually">Specifying nodes manually<span><a href="#label-Specifying+nodes+manually">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
130
+ <h2 id="label-Specifying+nodes+manually">Specifying nodes manually<span><a href="#label-Specifying+nodes+manually">&para;</a> <a href="#top">&uarr;</a></span></h2>
137
131
 
138
132
  <p>Specifying a comma seperated list of hosts and timing the total execution
139
- time.
140
- ```bash
141
- daibhidh@darkstar:~/$ time rcmd -n node1,node2,node3,node4 -c
142
- &#39;cat /etc/redhat-release&#39;
143
- node2 :: Red Hat Enterprise Linux
144
- ComputeNode release 6.8 (Santiago)
145
- node1 :: Red Hat Enterprise Linux
146
- ComputeNode release 6.8 (Santiago)
147
- node4 :: Red Hat Enterprise Linux
148
- ComputeNode release 6.9 (Santiago)
149
- node3 :: Red Hat Enterprise Linux
133
+ time. “`bash daibhidh@darkstar:~/$ time rcmd -n node1,node2,node3,node4 -c
134
+ &#39;cat /etc/redhat-release&#39; node2 :: Red Hat Enterprise Linux
135
+ ComputeNode release 6.8 (Santiago) node1 :: Red Hat Enterprise Linux
136
+ ComputeNode release 6.8 (Santiago) node4 :: Red Hat Enterprise Linux
137
+ ComputeNode release 6.9 (Santiago) node3 :: Red Hat Enterprise Linux
150
138
  ComputeNode release 6.9 (Santiago)</p>
151
139
 
152
- <p>real 0m2.749s
153
- user 0m0.272s
154
- sys 0m0.050s
155
- ```</p>
140
+ <p>real 0m2.749s user 0m0.272s sys 0m0.050s “`</p>
156
141
 
157
- <h2 id="label-Piping+list+of+nodes">Piping list of nodes<span><a href="#label-Piping+list+of+nodes">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
142
+ <h2 id="label-Piping+list+of+nodes">Piping list of nodes<span><a href="#label-Piping+list+of+nodes">&para;</a> <a href="#top">&uarr;</a></span></h2>
158
143
 
159
144
  <p>Using the hammer cli to get a list of hosts from a RedHat Satellite and
160
- providing it to rcmd as the node
161
- list.
162
- &lt;code&gt;bash
163
- daibhidh@darkstar:~/$ hammer --output base host list
164
- --organization org | awk &#39;/Name:/ {print $2}&#39; | rcmd -n - -c
165
- &#39;cat /etc/redhat-release&#39;
166
- node1.example.com :: Red Hat Enterprise
167
- Linux ComputeNode release 6.8 (Santiago)
168
- node3.example.com :: Red Hat
169
- Enterprise Linux ComputeNode release 6.9 (Santiago)
170
- node2.example.com ::
171
- Red Hat Enterprise Linux ComputeNode release 6.8
172
- (Santiago)
173
- node4.example.com :: Red Hat Enterprise Linux ComputeNode
174
- release 6.9 (Santiago)
175
- &lt;/code&gt;</p>
176
-
177
- <h2 id="label-Using+a+database+for+obtaining+nodes">Using a database for obtaining nodes<span><a href="#label-Using+a+database+for+obtaining+nodes">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
178
-
179
- <p>TODO</p>
180
-
181
- <h1 id="label-Development">Development<span><a href="#label-Development">&para;</a> <a href="#documentation">&uarr;</a></span></h1>
145
+ providing it to rcmd as the node list. <code>bash daibhidh@darkstar:~/$
146
+ hammer --output base host list --organization org | awk &#39;/Name:/ {print
147
+ $2}&#39; | rcmd -n - -c &#39;cat /etc/redhat-release&#39; node1.example.com
148
+ :: Red Hat Enterprise Linux ComputeNode release 6.8 (Santiago)
149
+ node3.example.com :: Red Hat Enterprise Linux ComputeNode release 6.9
150
+ (Santiago) node2.example.com :: Red Hat Enterprise Linux ComputeNode
151
+ release 6.8 (Santiago) node4.example.com :: Red Hat Enterprise Linux
152
+ ComputeNode release 6.9 (Santiago) </code></p>
153
+
154
+ <h2 id="label-Using+regex+to+build+node+list">Using regex to build node list<span><a href="#label-Using+regex+to+build+node+list">&para;</a> <a href="#top">&uarr;</a></span></h2>
155
+
156
+ <pre>daibhidh@darkstar:~/$ rcmd -r &#39;node([1-9]|1[1-2])$&#39; -c &#39;hostname -f&#39;
157
+ node2 :: node2.example.com
158
+ node1 :: node1.example.com
159
+ node4 :: node4.example.com
160
+ node3 :: node3.example.com
161
+ node5 :: node5.example.com
162
+ node6 :: node6.example.com
163
+ node8 :: node8.example.com
164
+ node7 :: node7.example.com
165
+ node11 :: CONNECT ERROR :: Unable to connect to host!
166
+ node9 :: node9.example.com
167
+ node12 :: node12.example.com</pre>
168
+
169
+ <h1 id="label-Development">Development<span><a href="#label-Development">&para;</a> <a href="#top">&uarr;</a></span></h1>
182
170
 
183
171
  <p>If you are wanting to modify the code by all means do so. If you clone this
184
172
  repository you can then run <code>bundle install</code> to install the
@@ -187,26 +175,26 @@ with <em>rake</em>.</p>
187
175
 
188
176
  <p>Available Rake tasks are:</p>
189
177
 
190
- <pre>rake build # Build rcmd-1.5.5.gem into the pkg directory
191
- rake clean # Remove any temporary products
192
- rake clobber # Remove any generated files
193
- rake clobber_rdoc # Remove RDoc HTML files
194
- rake console # Open an IRB console with this gem loaded
195
- rake install # Build and install rcmd-1.5.5.gem into system gems
196
- rake install:local # Build and install rcmd-1.5.5.gem into system gems without network access
197
- rake rdoc # Build RDoc HTML files
198
- rake reinstall # Remove, build, and install gem
199
- rake release[remote] # Create tag v1.5.5 and build and push rcmd-1.5.5.gem to Rubygems
200
- rake rerdoc # Rebuild RDoc HTML files
201
- rake spec # Run RSpec code examples</pre>
202
-
203
- </div>
204
-
205
-
206
-
207
- <footer id="validator-badges">
208
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
209
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
210
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
178
+ <pre class="ruby"><span class="ruby-identifier">rake</span> <span class="ruby-identifier">build</span> <span class="ruby-comment"># Build rcmd-1.5.5.gem into the pkg directory</span>
179
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">clean</span> <span class="ruby-comment"># Remove any temporary products</span>
180
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">clobber</span> <span class="ruby-comment"># Remove any generated files</span>
181
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">clobber_rdoc</span> <span class="ruby-comment"># Remove RDoc HTML files</span>
182
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">console</span> <span class="ruby-comment"># Open an IRB console with this gem loaded</span>
183
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">install</span> <span class="ruby-comment"># Build and install rcmd-1.5.5.gem into system gems</span>
184
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">install</span>:<span class="ruby-identifier">local</span> <span class="ruby-comment"># Build and install rcmd-1.5.5.gem into system gems without network access</span>
185
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">rdoc</span> <span class="ruby-comment"># Build RDoc HTML files</span>
186
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">reinstall</span> <span class="ruby-comment"># Remove, build, and install gem</span>
187
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">release</span>[<span class="ruby-identifier">remote</span>] <span class="ruby-comment"># Create tag v1.5.5 and build and push rcmd-1.5.5.gem to Rubygems</span>
188
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">rerdoc</span> <span class="ruby-comment"># Rebuild RDoc HTML files</span>
189
+ <span class="ruby-identifier">rake</span> <span class="ruby-identifier">spec</span> <span class="ruby-comment"># Run RSpec code examples</span>
190
+ </pre>
191
+ </main>
192
+
193
+
194
+
195
+ <footer id="validator-badges" role="contentinfo">
196
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
197
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
198
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
211
199
  </footer>
212
200