ansible_tools 0.0.4 → 0.0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +5 -1
- data/lib/ansible_tools.rb +28 -0
- data/lib/ansible_tools/version.rb +1 -1
- metadata +9 -23
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a00d4a5687153558f5c277786c4644fc52e70b53
|
4
|
+
data.tar.gz: 80363036ef5f4e6c0ae650ade35044c18f24be60
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7df80cb7a1aa8a6f35f8ff51fe431ed3ec299a0af26bc83f5cc0ea7034479036cfa8068b69ae0712d91ba2c40ffe27eb78a70a2d51da1f9a2e699f90910d271c
|
7
|
+
data.tar.gz: f76aaf15f56123257696427c8a99bfe358f77547bad342bcd060d432bdc713c1569bd78759b4a2b37ebbd19fc3d5035ad1cf1d6eb4be59b7ea5f552ee0f31a40
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
Ansible Tools e.g. Create directory by BestPractice
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/ansible_tools.png)](http://badge.fury.io/rb/ansible_tools)
|
5
6
|
[![Code Climate](https://codeclimate.com/github/volanja/ansible_tools.png)](https://codeclimate.com/github/volanja/ansible_tools)
|
6
7
|
[![Coverage Status](https://coveralls.io/repos/volanja/ansible_tools/badge.png)](https://coveralls.io/r/volanja/ansible_tools)
|
7
8
|
|
@@ -92,13 +93,16 @@ $ ansible-tools init -r gitlab
|
|
92
93
|
```
|
93
94
|
|
94
95
|
### Show Variables
|
95
|
-
Search
|
96
|
+
Search file and write list
|
97
|
+
file => `roles/*/vars/main.yml`, `group_vars/*.yml`, `host_vars/*.yml`, `*.yml`
|
96
98
|
|
97
99
|
```
|
98
100
|
$ ansbile-tools show
|
99
101
|
+----------------------------------------------------------------------------+
|
100
102
|
| File | Key | Value |
|
101
103
|
+----------------------------------------------------------------------------+
|
104
|
+
| host_vars/main.yml | var1 | num1 |
|
105
|
+
| group_vars/main.yml | var2 | num2 |
|
102
106
|
| roles/gitlab/vars/main.yml | mysql_gitlab_password | password |
|
103
107
|
| roles/gitlab/vars/main.yml | mysql_gitlab_database | gitlabhq_production |
|
104
108
|
| roles/mariadb/vars/main.yml | mysql_root_password | password |
|
data/lib/ansible_tools.rb
CHANGED
@@ -123,6 +123,34 @@ module AnsibleTools
|
|
123
123
|
end
|
124
124
|
table = Ruport::Data::Table.new
|
125
125
|
table.column_names = %w[File Key Value]
|
126
|
+
|
127
|
+
# search *.yml
|
128
|
+
Dir.glob("*.yml") {|f|
|
129
|
+
next unless FileTest.file?(f) #skip directory
|
130
|
+
yml = YAML.load_file(f)
|
131
|
+
if yml == false
|
132
|
+
puts "No Variables in #{f}"
|
133
|
+
next
|
134
|
+
end
|
135
|
+
yml.each{|h|
|
136
|
+
h["vars"].each{|key,value|
|
137
|
+
table << [f,key,value]
|
138
|
+
}
|
139
|
+
}
|
140
|
+
}
|
141
|
+
# search */*.yml e.g. group_vars, host_vars
|
142
|
+
Dir.glob("*/*.yml") {|f|
|
143
|
+
next unless FileTest.file?(f) #skip directory
|
144
|
+
yml = YAML.load_file(f)
|
145
|
+
if yml == false
|
146
|
+
puts "No Variables in #{f}"
|
147
|
+
next
|
148
|
+
end
|
149
|
+
yml.each{|key,value|
|
150
|
+
table << [f,key,value]
|
151
|
+
}
|
152
|
+
}
|
153
|
+
# search roles/*/vars/*.yml
|
126
154
|
Dir.glob("**/vars/*") {|f|
|
127
155
|
next unless FileTest.file?(f) #skip directory
|
128
156
|
yml = YAML.load_file(f)
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ansible_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.4
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.4.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- volanja
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-08-31 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,23 +27,20 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: thor
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: ruport
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: thor
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,7 +83,6 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: ruport
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ~>
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,7 +90,6 @@ dependencies:
|
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - ~>
|
108
95
|
- !ruby/object:Gem::Version
|
@@ -129,27 +116,26 @@ files:
|
|
129
116
|
homepage: https://github.com/volanja
|
130
117
|
licenses:
|
131
118
|
- MIT
|
119
|
+
metadata: {}
|
132
120
|
post_install_message:
|
133
121
|
rdoc_options: []
|
134
122
|
require_paths:
|
135
123
|
- lib
|
136
124
|
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
125
|
requirements:
|
139
|
-
- -
|
126
|
+
- - '>='
|
140
127
|
- !ruby/object:Gem::Version
|
141
128
|
version: '0'
|
142
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
-
none: false
|
144
130
|
requirements:
|
145
|
-
- -
|
131
|
+
- - '>='
|
146
132
|
- !ruby/object:Gem::Version
|
147
133
|
version: '0'
|
148
134
|
requirements: []
|
149
135
|
rubyforge_project:
|
150
|
-
rubygems_version: 1.
|
136
|
+
rubygems_version: 2.1.11
|
151
137
|
signing_key:
|
152
|
-
specification_version:
|
138
|
+
specification_version: 4
|
153
139
|
summary: Ansible Tools e.g. Create directory by BestPractice
|
154
140
|
test_files:
|
155
141
|
- spec/spec_helper.rb
|