Remove references to unsupported operating systems

All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Change-Id: I96a9757621eab69e7bc16a2e31ab28d0eb8a23be
This commit is contained in:
Jonathan Rosser 2021-03-10 12:16:38 +00:00
parent 6f866bdcb3
commit e0afffd98c
6 changed files with 8 additions and 77 deletions

View File

@ -22,17 +22,14 @@ galaxy_info:
platforms:
- name: Debian
versions:
- stretch
- buster
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: EL
versions:
- 7
- name: opensuse
versions:
- 15
- 8
categories:
- cloud
- python

View File

@ -29,7 +29,7 @@
package:
name: "{{ designate_package_list }}"
state: "{{ designate_package_state }}"
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
register: install_packages
until: install_packages is success

View File

@ -4,15 +4,8 @@
options {
{% if ansible_pkg_mgr == 'apt' %}
directory "/var/cache/bind";
{% elif ansible_pkg_mgr in ['yum', 'dnf'] %}
{% elif ansible_pkg_mgr == 'dnf' %}
directory "/var/named";
{% elif ansible_pkg_mgr == 'zypper' %}
directory "/var/lib/named";
managed-keys-directory "/var/lib/named/dyn/";
dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";
notify no;
disable-empty-zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA";
{% endif %}
// If there is a firewall between you and nameservers you want
@ -49,7 +42,7 @@ controls {
};
{% endif %}
{% if ansible_pkg_mgr in ['yum', 'dnf'] %}
{% if ansible_pkg_mgr == 'dnf' %}
logging {
channel default_debug {
file "data/named.run";
@ -64,30 +57,4 @@ zone "." IN {
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
{% elif ansible_pkg_mgr == 'zypper' %}
zone "." in {
type hint;
file "root.hint";
};
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "127.0.0.zone";
};
include "/etc/named.conf.include";
{% endif %}

View File

@ -43,7 +43,7 @@
owner: 'root'
group: 'named'
when:
- ansible_pkg_mgr in ['yum', 'dnf']
- ansible_pkg_mgr == 'dnf'
- name: Restart bind9
service:

View File

@ -25,7 +25,7 @@ designate_service_distro_packages:
- openstack-designate-producer
- openstack-designate-sink
- openstack-designate-worker
- "{{ ansible_distribution_major_version is version('8', '<') | ternary('systemd-python', 'python3-systemd') }}"
- python3-systemd
designate_rndc_packages:
- bind

View File

@ -1,33 +0,0 @@
---
# Copyright 2018, SUSE LINUX GmbH.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Common yum packages
designate_distro_packages:
- which
designate_service_distro_packages:
- openstack-designate
- openstack-designate-agent
- openstack-designate-api
- openstack-designate-central
- openstack-designate-producer
- openstack-designate-sink
- openstack-designate-worker
designate_rndc_packages:
- bind-utils
designate_devel_distro_packages:
- systemd-devel