foreman_salt 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/app/controllers/foreman_salt/minions_controller.rb +39 -0
- data/app/helpers/concerns/foreman_salt/layout_helper_extensions.rb +20 -0
- data/app/models/foreman_salt/concerns/host_managed_extensions.rb +1 -1
- data/app/models/foreman_salt/salt_environment.rb +4 -0
- data/app/models/foreman_salt/salt_module.rb +4 -0
- data/lib/foreman_salt/engine.rb +1 -0
- data/lib/foreman_salt/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 044d6bcb7bb23ae885d02d14977aa289a86566ad
|
4
|
+
data.tar.gz: e3fdf276fedaf50ef67ea0128be66aeaa522ee3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b307a6679849af4beec034ab1a0e1957790845959b18458d483dec84b4d7dbd83fb4515749902d2149b3631be472d5b599d3e214e2a2d7d8dfcc86cc861922c
|
7
|
+
data.tar.gz: ad68170d5cd1c6cde132c80cba7d768d6b0b3d3dcdb5449415d5f37f6ecd75c88eb8883f0dc3742834832442571e8bf80dc19be5f97ffb90490f63a67181b6f2
|
data/README.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
[![Build Status](https://img.shields.io/jenkins/s/http/ci.theforeman.org/test_plugin_foreman_salt_master.svg)](http://ci.theforeman.org/job/test_plugin_foreman_salt_master)
|
2
|
+
[![Code Climate](https://codeclimate.com/github/theforeman/foreman_salt/badges/gpa.svg)](https://codeclimate.com/github/theforeman/foreman_salt)
|
3
|
+
[![GPL License](https://img.shields.io/github/license/theforeman/foreman_salt.svg)](https://github.com/theforeman/foreman_salt/blob/master/LICENSE)
|
4
|
+
|
1
5
|
# Foreman Salt Plug-in
|
2
6
|
|
3
7
|
This plug-in adds support for Salt to Foreman.
|
@@ -84,3 +84,42 @@ module ForemanSalt
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
end
|
87
|
+
|
88
|
+
=begin
|
89
|
+
Minions controller? BANANA!!!
|
90
|
+
|
91
|
+
────────────▀▄───█───▄▀
|
92
|
+
───────────▄▄▄█▄▄█▄▄█▄▄▄
|
93
|
+
────────▄▀▀═════════════▀▀▄
|
94
|
+
───────█═══════════════════█
|
95
|
+
──────█═════════════════════█
|
96
|
+
─────█════════▄▄▄▄▄▄▄════════█
|
97
|
+
────█════════█████████════════█
|
98
|
+
────█═══════██▀─────▀██═══════█
|
99
|
+
───███████████──█▀█──███████████
|
100
|
+
───███████████──▀▀▀──███████████
|
101
|
+
────█═══════▀█▄─────▄█▀═══════█
|
102
|
+
────█═════════▀█████▀═════════█
|
103
|
+
────█═════════════════════════█
|
104
|
+
────█═════════════════════════█
|
105
|
+
────█═══════█▀█▀█▀█▀█▀█═══════█
|
106
|
+
────█═══════▀▄───────▄▀═══════█
|
107
|
+
────█═════════▀▄█▄█▄▀═════════█
|
108
|
+
────█═════════════════════════█
|
109
|
+
───▐▓▓▌═════════════════════▐▓▓▌
|
110
|
+
───▐▐▓▓▌▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▐▓▓▌▌
|
111
|
+
───█══▐▓▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄▓▌══█
|
112
|
+
──█══▌═▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌═▐══█
|
113
|
+
──█══█═▐▓▓▓▓▓▓▄▄▄▄▄▄▄▓▓▓▓▓▓▌═█══█
|
114
|
+
──█══█═▐▓▓▓▓▓▓▐██▀██▌▓▓▓▓▓▓▌═█══█
|
115
|
+
──█══█═▐▓▓▓▓▓▓▓▀▀▀▀▀▓▓▓▓▓▓▓▌═█══█
|
116
|
+
──█══█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█══█
|
117
|
+
─▄█══█▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌█══█▄
|
118
|
+
─█████▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌─█████
|
119
|
+
─██████▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌─██████
|
120
|
+
──▀█▀█──▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌───█▀█▀
|
121
|
+
─────────▐▓▓▓▓▓▓▌▐▓▓▓▓▓▓▌
|
122
|
+
──────────▐▓▓▓▓▌──▐▓▓▓▓▌
|
123
|
+
─────────▄████▀────▀████▄
|
124
|
+
─────────▀▀▀▀────────▀▀▀▀
|
125
|
+
=end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module ForemanSalt
|
2
|
+
module LayoutHelperExtensions
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
alias_method_chain :authorized_associations_permission_name, :salt
|
7
|
+
end
|
8
|
+
|
9
|
+
# Foreman tries to magically guess permission names, but it doesn't work
|
10
|
+
# with plugins. #11408 ForemanSalt models that require permissions provide
|
11
|
+
# a self.permission_name method
|
12
|
+
def authorized_associations_permission_name_with_salt(klass)
|
13
|
+
if klass.respond_to?(:permission_name)
|
14
|
+
klass.permission_name(:view)
|
15
|
+
else
|
16
|
+
authorized_associations_permission_name_without_salt(klass)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -35,7 +35,7 @@ module ForemanSalt
|
|
35
35
|
def salt_modules_for_enc
|
36
36
|
return [] unless salt_environment
|
37
37
|
modules = salt_modules + (hostgroup ? hostgroup.all_salt_modules : [])
|
38
|
-
ForemanSalt::SaltModule.in_environment(salt_environment).where(:id => modules).pluck(
|
38
|
+
ForemanSalt::SaltModule.in_environment(salt_environment).where(:id => modules).pluck("salt_modules.name").uniq
|
39
39
|
end
|
40
40
|
|
41
41
|
def salt_master
|
data/lib/foreman_salt/engine.rb
CHANGED
@@ -172,6 +172,7 @@ module ForemanSalt
|
|
172
172
|
# Helper Extensions
|
173
173
|
::HostsHelper.send :include, ForemanSalt::HostsHelperExtensions
|
174
174
|
::SmartProxiesHelper.send :include, ForemanSalt::SmartProxiesHelperExtensions
|
175
|
+
::LayoutHelper.send :include, ForemanSalt::LayoutHelperExtensions
|
175
176
|
|
176
177
|
# Model Extensions
|
177
178
|
::Host::Managed.send :include, ForemanSalt::Concerns::HostManagedExtensions
|
data/lib/foreman_salt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_salt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Benjamin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- app/controllers/foreman_salt/salt_modules_controller.rb
|
68
68
|
- app/controllers/foreman_salt/state_importer.rb
|
69
69
|
- app/helpers/concerns/foreman_salt/hosts_helper_extensions.rb
|
70
|
+
- app/helpers/concerns/foreman_salt/layout_helper_extensions.rb
|
70
71
|
- app/helpers/concerns/foreman_salt/smart_proxies_helper_extensions.rb
|
71
72
|
- app/helpers/foreman_salt/salt_keys_helper.rb
|
72
73
|
- app/helpers/foreman_salt/salt_modules_helper.rb
|