forked from freeCodeCamp/devdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathansible.rb
93 lines (78 loc) · 2.37 KB
/
ansible.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
module Docs
class Ansible < UrlScraper
self.name = 'Ansible'
self.type = 'sphinx'
self.links = {
home: 'https://www.ansible.com/',
code: 'https://github.com/ansible/ansible'
}
html_filters.push 'ansible/entries', 'sphinx/clean_html', 'ansible/clean_html'
options[:attribution] = <<-HTML
© 2012–2018 Michael DeHaan<br>
© 2018–2024 Red Hat, Inc.<br>
Licensed under the GNU General Public License version 3.
HTML
options[:skip] = %w(
installation_guide/index.html
reference_appendices/glossary.html
reference_appendices/faq.html
reference_appendices/tower.html
user_guide/quickstart.html
modules/modules_by_category.html
modules/list_of_all_modules.html
collections/all_plugins.html
collections/index_vars.html)
options[:skip_patterns] = [
/\Acommunity.*/i,
/\Adev_guide.*/i,
/\Aroadmap.*/i,
]
version do
self.base_url = "https://docs.ansible.com/ansible/latest/"
end
version '2.11' do
self.release = '2.11.0'
self.base_url = "https://docs.ansible.com/ansible/#{version}/"
end
version '2.10' do
self.release = '2.10.5'
self.base_url = "https://docs.ansible.com/ansible/#{version}/"
end
version '2.9' do
self.release = '2.9.15'
self.base_url = "https://docs.ansible.com/ansible/#{version}/"
end
version '2.8' do
self.release = '2.8.16'
self.base_url = "https://docs.ansible.com/ansible/#{version}/"
end
version '2.7' do
self.release = '2.7.17'
self.base_url = "https://docs.ansible.com/ansible/#{version}/"
end
version '2.6' do
self.release = '2.6.20'
self.base_url = "https://docs.ansible.com/ansible/#{version}/"
end
version '2.5' do
self.release = '2.5.15'
self.base_url = "https://docs.ansible.com/ansible/#{version}/"
end
version '2.4' do
self.release = '2.4.6'
self.base_url = "https://docs.ansible.com/ansible/#{version}/"
options[:skip] = %w(
glossary.html
faq.html
community.html
tower.html
quickstart.html
list_of_all_modules.html)
options[:skip_patterns] = []
end
def get_latest_version(opts)
tags = get_github_tags('ansible', 'ansible', opts)
tags[0]['name'][1..-1]
end
end
end