cem_acpt 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cem_acpt/image_builder/provision_commands.rb +43 -0
- data/lib/cem_acpt/provision/terraform/linux.rb +2 -2
- data/lib/cem_acpt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f23a68eeaf8f9808ef643676c3dd16fff63d85abc3ab76eb4c56c256d57becd
|
4
|
+
data.tar.gz: f3ab49fb629f2ad92ce8c2a0f5ee70eca7112e9741c249b7c00f965782d52188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3abf23773f33488b95ec4c5eeffa94118dcb5e84baebcd05a0c9a290cb67812860e1eb151c5dc159f3037d07844109b69b53ef1a20313146ef2a5f4ed4105cf8
|
7
|
+
data.tar.gz: b39069af4bc18eb05472c80497344f1a1e568bbf3b1160d4cf276c5f767ef9a23ecc75edabc11b3e6632daccaf9e4a2d18fd31d82c753c4baf6be6c2df0de77d
|
data/Gemfile.lock
CHANGED
@@ -74,6 +74,48 @@ module CemAcpt
|
|
74
74
|
alias to_a provision_commands
|
75
75
|
end
|
76
76
|
|
77
|
+
class DebianFamily
|
78
|
+
def initialize(config, image_name, base_image, os_major_version, puppet_version)
|
79
|
+
@config = config
|
80
|
+
@image_name = image_name
|
81
|
+
@base_image = base_image
|
82
|
+
@os_major_version = os_major_version
|
83
|
+
@puppet_version = puppet_version
|
84
|
+
end
|
85
|
+
|
86
|
+
def default_provision_commands
|
87
|
+
[install_curl_command, enable_puppet_repository_command, upgrade_packages_command, install_puppet_agent_command]
|
88
|
+
end
|
89
|
+
|
90
|
+
def provision_commands
|
91
|
+
commands_from_config = @config.get("images.#{@image_name}.provision_commands") || []
|
92
|
+
(default_provision_commands + commands_from_config).compact
|
93
|
+
end
|
94
|
+
alias to_a provision_commands
|
95
|
+
|
96
|
+
private
|
97
|
+
|
98
|
+
def upgrade_packages_command
|
99
|
+
'sudo apt-get update && sudo apt-get upgrade -y'
|
100
|
+
end
|
101
|
+
|
102
|
+
def puppet_platform_repository_url
|
103
|
+
"https://apt.puppet.com/puppet#{@puppet_version}-release-focal.deb"
|
104
|
+
end
|
105
|
+
|
106
|
+
def enable_puppet_repository_command
|
107
|
+
"wget #{puppet_platform_repository_url} && sudo dpkg -i puppet#{@puppet_version}-release-focal.deb"
|
108
|
+
end
|
109
|
+
|
110
|
+
def install_puppet_agent_command
|
111
|
+
'sudo apt-get install -y puppet-agent'
|
112
|
+
end
|
113
|
+
|
114
|
+
# The latest Google-provided Ubuntu images do not have curl installed by default
|
115
|
+
def install_curl_command
|
116
|
+
'sudo apt-get install -y curl'
|
117
|
+
end
|
118
|
+
end
|
77
119
|
class << self
|
78
120
|
# Map of OS to class that holds the provision commands for that OS
|
79
121
|
OS_CLASS_MAP = {
|
@@ -82,6 +124,7 @@ module CemAcpt
|
|
82
124
|
'alma' => 'EnterpriseLinuxFamily',
|
83
125
|
'oel' => 'EnterpriseLinuxFamily',
|
84
126
|
'rocky' => 'EnterpriseLinuxFamily',
|
127
|
+
'ubuntu' => 'DebianFamily',
|
85
128
|
'windows' => 'WindowsFamily',
|
86
129
|
}.freeze
|
87
130
|
|
@@ -7,11 +7,11 @@ module CemAcpt
|
|
7
7
|
# Class provides methods for gathering provision data for Linux nodes
|
8
8
|
class Linux < OsData
|
9
9
|
def self.valid_names
|
10
|
-
%w[centos rhel oel alma rocky]
|
10
|
+
%w[centos rhel oel alma rocky ubuntu]
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.valid_versions
|
14
|
-
%w[7 8 9]
|
14
|
+
%w[7 8 9 2004]
|
15
15
|
end
|
16
16
|
|
17
17
|
def systemd_files
|
data/lib/cem_acpt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cem_acpt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http
|