Class: Saltr::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/help.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.topicsObject



3
4
5
# File 'lib/help.rb', line 3

def self.topics
  self.instance_methods(false).collect{ |meth| meth.to_s }.join(', ')
end

Instance Method Details

#oObject



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/help.rb', line 45

def o
"""
compact     Display compact output data structure
highstate   Outputter for displaying results of state runs
json_out    Display return data in JSON format
key         Display salt-key output
nested      Recursively display nested data
newline_values_only    Display values only, separated by newlines
no_out      Display no output
no_return   Display output for minions that did not return
overstatestage  Display clean output of an overstate stage
pprint_out  Python pretty-print (pprint)
progress    Display return data as a progress bar
raw         Display raw output data structure
txt         Simple text outputter
virt_query  virt.query outputter
yaml_out    Display return data in YAML format
"""
end

#topObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/help.rb', line 7

def top
"""
help topics: #{self.class.topics}

l                 # sys.list-modules
l <modulename>    # sys.list-functions modulename
l <functionname>  # sys.doc functionname

r <cmd.run string>
m <new-minion-target>
   m * and G@os:Ubu*    will make a compound minion query
   G=grains, P=grains regexp, L=list of minions
o <new out string>

salt-cloud
salt-key

grains.item ip4_interfaces
"""
end

#ufwObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/help.rb', line 28

def ufw
"""
ufw status
ufw allow ssh
ufw allow salt   # on master
ufw allow from 52.6.10.1 to any port 22   # put master's ip address
ufw enable

ufw delete allow from 52.6.10.1 to any port 22
ufw deny apache

ufw app list   # finds from /etc/ufw/applications.d/

log file for intrusion attempts: /var/log/kern.log
"""
end