annotate modules/vcs/manifests/init.pp @ 480:2c3e745be8d2

Update server defs and own modules to match * $osver and $fqdn and others are now all in $facts * Firewall swapped action for jump and has new way to do IPv6 * SSH server setup changed * Resolve warnings from fileserver.conf * has_key() no longer exists because Puppet can do "key in array" * Some variables are now more strictly typed Also: * Try to configure full IPv6 DNS resolver * Clean up old config - unused servers and some CentOS complexity
author IBBoard <dev@ibboard.co.uk>
date Thu, 29 Aug 2024 18:58:49 +0100
parents a5d1f34a7d3f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 class vcs {
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 @package { [
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 "mercurial",
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 "git"
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 ]:
131
0dd899a10ee1 Change all "latest" packages to "installed"
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
6 ensure => installed
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 }
272
c42fb28cff86 Update to a newer Python module
IBBoard <dev@ibboard.co.uk>
parents: 250
diff changeset
8 python::pip { 'mercurial-keyring':
303
c16c977760c3 Fix mercurial_keyring install
IBBoard <dev@ibboard.co.uk>
parents: 272
diff changeset
9 ensure => 'present',
421
a5d1f34a7d3f Ensure keyring is installed with pip3
IBBoard <dev@ibboard.co.uk>
parents: 395
diff changeset
10 pip_provider => 'pip3',
480
2c3e745be8d2 Update server defs and own modules to match
IBBoard <dev@ibboard.co.uk>
parents: 421
diff changeset
11 install_args => '--break-system-packages',
147
6cb6dc1f74d4 Switch to mercurial_keyring from Pip
IBBoard <dev@ibboard.co.uk>
parents: 143
diff changeset
12 }
306
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
13 # Alt keyrings are insecure, but a) we're on a limited access server and
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
14 # b) I share the Mecurial config with the desktop, which uses the system
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
15 # keyring rather than
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
16 #
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
17 # [backend]
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
18 # default-keyring=keyrings.alt.file.PlaintextKeyring
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
19 python::pip { 'keyrings.alt':
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
20 ensure => 'present',
421
a5d1f34a7d3f Ensure keyring is installed with pip3
IBBoard <dev@ibboard.co.uk>
parents: 395
diff changeset
21 pip_provider => 'pip3',
480
2c3e745be8d2 Update server defs and own modules to match
IBBoard <dev@ibboard.co.uk>
parents: 421
diff changeset
22 install_args => '--break-system-packages',
306
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
23 }
480
2c3e745be8d2 Update server defs and own modules to match
IBBoard <dev@ibboard.co.uk>
parents: 421
diff changeset
24 if $facts["os"]["name"] == 'Ubuntu' {
395
fa2747b27bb4 Fix git-prompt in Ubuntu
IBBoard <dev@ibboard.co.uk>
parents: 306
diff changeset
25 $gitprompt = '/etc/bash_completion.d/git-prompt'
fa2747b27bb4 Fix git-prompt in Ubuntu
IBBoard <dev@ibboard.co.uk>
parents: 306
diff changeset
26 }
fa2747b27bb4 Fix git-prompt in Ubuntu
IBBoard <dev@ibboard.co.uk>
parents: 306
diff changeset
27 else {
fa2747b27bb4 Fix git-prompt in Ubuntu
IBBoard <dev@ibboard.co.uk>
parents: 306
diff changeset
28 $gitprompt = '/usr/share/git-core/contrib/completion/git-prompt.sh'
fa2747b27bb4 Fix git-prompt in Ubuntu
IBBoard <dev@ibboard.co.uk>
parents: 306
diff changeset
29 }
250
2d119b462c83 Add some missing command prompt dependencies
IBBoard <dev@ibboard.co.uk>
parents: 148
diff changeset
30 file { '/etc/bash_completion.d/git-prompt.sh':
2d119b462c83 Add some missing command prompt dependencies
IBBoard <dev@ibboard.co.uk>
parents: 148
diff changeset
31 ensure => 'link',
395
fa2747b27bb4 Fix git-prompt in Ubuntu
IBBoard <dev@ibboard.co.uk>
parents: 306
diff changeset
32 target => $gitprompt,
250
2d119b462c83 Add some missing command prompt dependencies
IBBoard <dev@ibboard.co.uk>
parents: 148
diff changeset
33 }
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 }
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 class vcs::client inherits vcs {
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 realize(Package["mercurial"],
272
c42fb28cff86 Update to a newer Python module
IBBoard <dev@ibboard.co.uk>
parents: 250
diff changeset
38 Python::Pip["mercurial-keyring"],
306
894390fdd6d7 Make sure that the right keyring back-ends are installed
IBBoard <dev@ibboard.co.uk>
parents: 303
diff changeset
39 Python::Pip["keyrings.alt"],
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 Package["git"])
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 }
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 class vcs::server inherits vcs {
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 realize(Package["mercurial"],
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 Package["git"])
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 }