From 0071f74e601089cfb2f05df5a8d9e5f7b8ff3306 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 12 Nov 2023 13:57:39 +1100 Subject: [PATCH] chore: reorganise hieradata - move role specific hieradata into respective roles/* paths --- hieradata/common.yaml | 59 ------------------------ hieradata/roles/infra/packagerepo.yaml | 37 +++++++++++++++ hieradata/roles/puppet.yaml | 5 ++ hieradata/roles/puppet/puppetmaster.yaml | 18 ++++++++ 4 files changed, 60 insertions(+), 59 deletions(-) create mode 100644 hieradata/roles/infra/packagerepo.yaml create mode 100644 hieradata/roles/puppet.yaml create mode 100644 hieradata/roles/puppet/puppetmaster.yaml diff --git a/hieradata/common.yaml b/hieradata/common.yaml index b8a2f9d..221c0be 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -27,74 +27,15 @@ profiles::packages::base: profiles::base::scripts::scripts: puppet: puppetwrapper.py -profiles::puppet::autosign::subnet_ranges: - - '198.18.17.0/24' - -profiles::puppet::autosign::domains: - - '*.main.unkin.net' - -# profiles::puppet::autosign::nodes: -# - 'somenode.main.unkin.net' - profiles::puppet::client::environment: 'develop' profiles::puppet::client::runinterval: 1800 profiles::puppet::client::runtimeout: 3600 profiles::puppet::client::show_diff: true profiles::puppet::client::usecacheonfailure: false -profiles::puppet::enc::repo: https://git.unkin.net/unkinben/puppet-enc.git -profiles::puppet::enc::release: '0.4' -profiles::puppet::enc::force: true -profiles::puppet::r10k::r10k_repo: https://git.unkin.net/unkinben/puppet-r10k.git -profiles::puppet::g10k::bin_path: '/opt/puppetlabs/bin/g10k' -profiles::puppet::g10k::cfg_path: '/etc/puppetlabs/r10k/r10k.yaml' -profiles::puppet::g10k::environments_path: '/etc/puppetlabs/code/environments' -profiles::puppet::g10k::default_environment: 'develop' -profiles::puppet::puppetdb::puppetdb_host: prodinf01n04.main.unkin.net -profiles::puppet::puppetdb::postgres_host: prodinf01n05.main.unkin.net -puppetdb::master::config::create_puppet_service_resource: false -#puppetdb::master::config::puppetdb_host: "%{lookup('profiles::puppet::puppetdb::puppetdb_host')}" - profiles::accounts::sysadmin::sshkeys: - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ8SRLlPiDylBpdWR9LpvPg4fDVD+DZst4yRPFwMMhta4mnB1H9XuvZkptDhXywWQ7QIcqa2WbhCen0OQJCtwn3s7EYtacmF5MxmwBYocPoK2AArGuh6NA9rwTdLrPdzhZ+gwe88PAzRLNzjm0ZBR+mA9saMbPJdqpKp0AWeAM8QofRQAWuCzQg9i0Pn1KDMvVDRHCZof4pVlHSTyHNektq4ifovn0zhKC8jD/cYu95mc5ftBbORexpGiQWwQ3HZw1IBe0ZETB1qPIPwsoJpt3suvMrL6T2//fcIIUE3TcyJKb/yhztja4TZs5jT8370G/vhlT70He0YPxqHub8ZfBv0khlkY93VBWYpNGJwM1fVqlw7XbfBNdOuJivJac8eW317ZdiDnKkBTxapThpPG3et9ib1HoPGKRsd/fICzNz16h2R3tddSdihTFL+bmTCa6Lo+5t5uRuFjQvhSLSgO2/gRAprc3scYOB4pY/lxOFfq3pU2VvSJtRgLNEYMUYKk= ben@unkin.net -profiles::reposync::repos_list: - almalinux_8_8_baseos: - repository: 'BaseOS' - description: 'AlmaLinux 8.8 - BaseOS' - osname: 'almalinux' - release: '8.8' - baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/BaseOS/x86_64/os/' - gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux' - almalinux_8_8_appstream: - repository: 'AppStream' - description: 'AlmaLinux 8.8 - AppStream' - osname: 'almalinux' - release: '8.8' - baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/AppStream/x86_64/os/' - gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux' - almalinux_8_8_highavailability: - repository: 'HighAvailability' - description: 'AlmaLinux 8.8 - HighAvailability' - osname: 'almalinux' - release: '8.8' - baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/HighAvailability/x86_64/os/' - gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux' - epel_8_everything: - repository: 'Everything' - description: 'EPEL 8 Everything' - osname: 'epel' - release: '8' - baseurl: 'https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/' - gpgkey: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8' - epel_8_modular: - repository: 'Modular' - description: 'EPEL 8 Modular' - osname: 'epel' - release: '8' - baseurl: 'https://dl.fedoraproject.org/pub/epel/8/Modular/x86_64/' - gpgkey: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8' - profiles::base::hosts::additional_hosts: - ip: 198.18.17.3 hostname: prodinf01n01.main.unkin.net diff --git a/hieradata/roles/infra/packagerepo.yaml b/hieradata/roles/infra/packagerepo.yaml new file mode 100644 index 0000000..95e4c32 --- /dev/null +++ b/hieradata/roles/infra/packagerepo.yaml @@ -0,0 +1,37 @@ +--- +profiles::reposync::repos_list: + almalinux_8_8_baseos: + repository: 'BaseOS' + description: 'AlmaLinux 8.8 - BaseOS' + osname: 'almalinux' + release: '8.8' + baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/BaseOS/x86_64/os/' + gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux' + almalinux_8_8_appstream: + repository: 'AppStream' + description: 'AlmaLinux 8.8 - AppStream' + osname: 'almalinux' + release: '8.8' + baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/AppStream/x86_64/os/' + gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux' + almalinux_8_8_highavailability: + repository: 'HighAvailability' + description: 'AlmaLinux 8.8 - HighAvailability' + osname: 'almalinux' + release: '8.8' + baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/HighAvailability/x86_64/os/' + gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux' + epel_8_everything: + repository: 'Everything' + description: 'EPEL 8 Everything' + osname: 'epel' + release: '8' + baseurl: 'https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/' + gpgkey: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8' + epel_8_modular: + repository: 'Modular' + description: 'EPEL 8 Modular' + osname: 'epel' + release: '8' + baseurl: 'https://dl.fedoraproject.org/pub/epel/8/Modular/x86_64/' + gpgkey: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8' diff --git a/hieradata/roles/puppet.yaml b/hieradata/roles/puppet.yaml new file mode 100644 index 0000000..b2164e7 --- /dev/null +++ b/hieradata/roles/puppet.yaml @@ -0,0 +1,5 @@ +--- +profiles::puppet::puppetdb::puppetdb_host: prodinf01n04.main.unkin.net +profiles::puppet::puppetdb::postgres_host: prodinf01n05.main.unkin.net +puppetdb::master::config::create_puppet_service_resource: false +#puppetdb::master::config::puppetdb_host: "%{lookup('profiles::puppet::puppetdb::puppetdb_host')}" diff --git a/hieradata/roles/puppet/puppetmaster.yaml b/hieradata/roles/puppet/puppetmaster.yaml new file mode 100644 index 0000000..de09f46 --- /dev/null +++ b/hieradata/roles/puppet/puppetmaster.yaml @@ -0,0 +1,18 @@ +--- +profiles::puppet::autosign::subnet_ranges: + - '198.18.17.0/24' + +profiles::puppet::autosign::domains: + - '*.main.unkin.net' + +# profiles::puppet::autosign::nodes: +# - 'somenode.main.unkin.net' + +profiles::puppet::enc::repo: https://git.unkin.net/unkinben/puppet-enc.git +profiles::puppet::enc::release: '0.4' +profiles::puppet::enc::force: true +profiles::puppet::r10k::r10k_repo: https://git.unkin.net/unkinben/puppet-r10k.git +profiles::puppet::g10k::bin_path: '/opt/puppetlabs/bin/g10k' +profiles::puppet::g10k::cfg_path: '/etc/puppetlabs/r10k/r10k.yaml' +profiles::puppet::g10k::environments_path: '/etc/puppetlabs/code/environments' +profiles::puppet::g10k::default_environment: 'develop'