view manifests/nodes.pp @ 283:d29f477c51d4

Switch from IPs to hostnames for proxying This should work, aaccording to the Mythic Beasts blog: https://blog.mythic-beasts.com/2017/03/10/hosting-a-website-on-an-ipv6-pi-part-2-proxy-protocol/ and it's future-proof for IP changes
author IBBoard <dev@ibboard.co.uk>
date Sat, 15 Feb 2020 20:11:23 +0000
parents 8f33f0bddd39
children 9431aec4d998
line wrap: on
line source

node 'clouduk.ibboard.co.uk' {
	class { 'ibboardvpsnode':
		primary_ip => '213.229.111.243',
		mailserver => 'mail.ibboard.co.uk',
		imapserver => 'imap.ibboard.co.uk',
		firewall_cmd => 'iptables',
	}
}

node 'cloudtest.ibboard.co.uk' {
	class { 'ibboardvpsnode':
		primary_ip => '192.168.1.78',
		mailserver => 'mail.ibboard.co.uk',
		imapserver => 'imap.ibboard.co.uk',
		firewall_cmd => 'iptables',
	}
}
node 'ibbvps.vs.mythic-beasts.com' {
	class { 'ibboardvpsnode':
		primary_ip => '2a00:1098:82:52::1',
		proxy_6to4_ip => '2a00:1098:82:52::01d4', # ::old4 for IPv4!
		proxy_upstream => ['proxy.mythic-beasts.com'],
		mailserver => 'mail.ibboard.co.uk',
		imapserver => 'imap.ibboard.co.uk',
		firewall_cmd => 'iptables',
	}
	# If the console fails to start, you may need to run "restorecon /etc/systemd/system/getty.target.wants/*"
	# to reset the SELinux context of the file
	service { 'serial-getty@ttyS0':
		ensure => 'running',
		enable => 'true',
	}
	firewall { '090 Allow SSH (IPv4-to-IPv6)':
		dport => 22,
		source => 'geryon.mythic-beasts.com',
		proto => 'tcp',
		action => 'accept',
	}
}