diff --git a/data/os/debian.yaml b/data/os/debian.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e69f8b98f5ea9a070dd69f9b826e81aa811ed58e --- /dev/null +++ b/data/os/debian.yaml @@ -0,0 +1,5 @@ +apt::purge: + sources.list: true + sources.list.d: true + preferences: true + preferences.d: true diff --git a/hiera.yaml b/hiera.yaml new file mode 100644 index 0000000000000000000000000000000000000000..545fff32722a61409075e87fd0003fd8b2d01f5f --- /dev/null +++ b/hiera.yaml @@ -0,0 +1,21 @@ +--- +version: 5 + +defaults: # Used for any hierarchy level that omits these keys. + datadir: data # This path is relative to hiera.yaml's directory. + data_hash: yaml_data # Use the built-in YAML backend. + +hierarchy: + - name: "osfamily/major release" + paths: + # Used to distinguish between Debian and Ubuntu + - "os/%{facts.os.name}/%{facts.os.release.major}.yaml" + - "os/%{facts.os.family}/%{facts.os.release.major}.yaml" + # Used for Solaris + - "os/%{facts.os.family}/%{facts.kernelrelease}.yaml" + - name: "osfamily" + paths: + - "os/%{facts.os.name}.yaml" + - "os/%{facts.os.family}.yaml" + - name: 'common' + path: 'common.yaml' diff --git a/manifests/base/repo/debian.pp b/manifests/base/repo/debian.pp index a988151cd81b1fc4bcadaa52d6139bfbedc652d3..ace11a543c34afca663cb9c4671c30c9c7204396 100644 --- a/manifests/base/repo/debian.pp +++ b/manifests/base/repo/debian.pp @@ -7,14 +7,8 @@ class packages::base::repo::debian ( $repos = join($repo_list, ' ') $dist = $facts['os']['distro']['codename'] - class { '::apt': - purge => { - 'sources.list' => true, - 'sources.list.d' => true, - 'preferences' => true, - 'preferences.d' => true, - } - } + include ::apt + apt::source { $dist: location => "${ftp_proto}://${ftp_host}/debian/",