Configure bind for designate
This role configures a bind container for use with designate worker. Change-Id: I1b6674acbd6f999474cd66cb44357cf6b756a7d0
This commit is contained in:
parent
681477c7d3
commit
0ac0d5d39b
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Added ``designate_bind_config`` to configure bind9 backend containers to
|
||||||
|
work with designate worker services.
|
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
designate_named_conf_path: '/var/lib/config-data/ansible-generated/designate/etc/named.conf'
|
||||||
|
rndc_allowed_addresses: ['127.0.0.1']
|
42
tripleo_ansible/roles/designate_bind_config/meta/main.yml
Normal file
42
tripleo_ansible/roles/designate_bind_config/meta/main.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2021 Red Hat, Inc.
|
||||||
|
# All Rights Reserved.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
|
||||||
|
galaxy_info:
|
||||||
|
author: OpenStack
|
||||||
|
description: TripleO OpenStack Role -- designate_bind_pool
|
||||||
|
company: Red Hat
|
||||||
|
license: Apache-2.0
|
||||||
|
min_ansible_version: 2.7
|
||||||
|
#
|
||||||
|
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||||
|
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||||
|
# To view available platforms and versions (or releases), visit:
|
||||||
|
# https://galaxy.ansible.com/api/v1/platforms/
|
||||||
|
#
|
||||||
|
platforms:
|
||||||
|
- name: CentOS
|
||||||
|
versions:
|
||||||
|
- 7
|
||||||
|
- 8
|
||||||
|
|
||||||
|
galaxy_tags:
|
||||||
|
- tripleo
|
||||||
|
|
||||||
|
|
||||||
|
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||||
|
# if you add dependencies to this list.
|
||||||
|
# dependencies:
|
@ -0,0 +1,37 @@
|
|||||||
|
# Molecule managed
|
||||||
|
# Copyright 2021 Red Hat, Inc.
|
||||||
|
# All Rights Reserved.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
|
||||||
|
{% if item.registry is defined %}
|
||||||
|
FROM {{ item.registry.url }}/{{ item.image }}
|
||||||
|
{% else %}
|
||||||
|
FROM {{ item.image }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
|
||||||
|
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \
|
||||||
|
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
|
||||||
|
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml {{ item.pkg_extras | default('') }} && zypper clean -a; \
|
||||||
|
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \
|
||||||
|
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi
|
||||||
|
|
||||||
|
{% for pkg in item.easy_install | default([]) %}
|
||||||
|
# install pip for centos where there is no python-pip rpm in default repos
|
||||||
|
RUN easy_install {{ pkg }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2021 Red Hat, Inc.
|
||||||
|
# All Rights Reserved.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
|
||||||
|
- name: Converge
|
||||||
|
hosts: all
|
||||||
|
roles:
|
||||||
|
- role: "designate_bind_config"
|
@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
driver:
|
||||||
|
name: podman
|
||||||
|
|
||||||
|
log: true
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: ubi8
|
||||||
|
hostname: ubi8
|
||||||
|
image: ubi8/ubi-init
|
||||||
|
registry:
|
||||||
|
url: registry.access.redhat.com
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
pkg_extras: python*setuptools
|
||||||
|
volumes:
|
||||||
|
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
|
||||||
|
- /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
|
||||||
|
privileged: true
|
||||||
|
environment: &env
|
||||||
|
http_proxy: "{{ lookup('env', 'http_proxy') }}"
|
||||||
|
https_proxy: "{{ lookup('env', 'https_proxy') }}"
|
||||||
|
ulimits: &ulimit
|
||||||
|
- host
|
||||||
|
|
||||||
|
provisioner:
|
||||||
|
inventory:
|
||||||
|
hosts:
|
||||||
|
all:
|
||||||
|
hosts:
|
||||||
|
ubi8:
|
||||||
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
|
name: ansible
|
||||||
|
log: true
|
||||||
|
env:
|
||||||
|
ANSIBLE_STDOUT_CALLBACK: yaml
|
||||||
|
|
||||||
|
scenario:
|
||||||
|
test_sequence:
|
||||||
|
- destroy
|
||||||
|
- create
|
||||||
|
- prepare
|
||||||
|
- converge
|
||||||
|
- check
|
||||||
|
- verify
|
||||||
|
- destroy
|
||||||
|
|
||||||
|
verifier:
|
||||||
|
name: testinfra
|
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2021 Red Hat, Inc.
|
||||||
|
# All Rights Reserved.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
hosts: all
|
||||||
|
roles:
|
||||||
|
- role: test_deps
|
12
tripleo_ansible/roles/designate_bind_config/tasks/main.yml
Normal file
12
tripleo_ansible/roles/designate_bind_config/tasks/main.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: ensure target directory exists
|
||||||
|
become: true
|
||||||
|
file:
|
||||||
|
path: "{{ designate_named_conf_path|dirname }}"
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: generate named.conf
|
||||||
|
become: true
|
||||||
|
template:
|
||||||
|
src: named.conf.j2
|
||||||
|
dest: "{{ designate_named_conf_path }}"
|
@ -0,0 +1,11 @@
|
|||||||
|
include "/etc/rndc.key";
|
||||||
|
|
||||||
|
options {
|
||||||
|
allow-new-zones yes;
|
||||||
|
minimal-responses yes;
|
||||||
|
directory "/var/named-persistent";
|
||||||
|
};
|
||||||
|
|
||||||
|
controls {
|
||||||
|
inet {{ external_ip|default(ctlplane_ip)|default('127.0.0.1') }} allow { {{ rndc_allowed_addresses|join(';') }}; } keys { "rndc-key"; };
|
||||||
|
};
|
@ -6,6 +6,7 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- tripleo-ansible-centos-8-molecule-aide
|
- tripleo-ansible-centos-8-molecule-aide
|
||||||
- tripleo-ansible-centos-8-molecule-backup_and_restore
|
- tripleo-ansible-centos-8-molecule-backup_and_restore
|
||||||
|
- tripleo-ansible-centos-8-molecule-designate_bind_config
|
||||||
- tripleo-ansible-centos-8-molecule-login_defs
|
- tripleo-ansible-centos-8-molecule-login_defs
|
||||||
- tripleo-ansible-centos-8-molecule-test_deps
|
- tripleo-ansible-centos-8-molecule-test_deps
|
||||||
- tripleo-ansible-centos-8-molecule-test_package_action
|
- tripleo-ansible-centos-8-molecule-test_package_action
|
||||||
@ -64,6 +65,7 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- tripleo-ansible-centos-8-molecule-aide
|
- tripleo-ansible-centos-8-molecule-aide
|
||||||
- tripleo-ansible-centos-8-molecule-backup_and_restore
|
- tripleo-ansible-centos-8-molecule-backup_and_restore
|
||||||
|
- tripleo-ansible-centos-8-molecule-designate_bind_config
|
||||||
- tripleo-ansible-centos-8-molecule-login_defs
|
- tripleo-ansible-centos-8-molecule-login_defs
|
||||||
- tripleo-ansible-centos-8-molecule-test_deps
|
- tripleo-ansible-centos-8-molecule-test_deps
|
||||||
- tripleo-ansible-centos-8-molecule-test_package_action
|
- tripleo-ansible-centos-8-molecule-test_package_action
|
||||||
@ -123,6 +125,7 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- tripleo-ansible-centos-8-molecule-aide
|
- tripleo-ansible-centos-8-molecule-aide
|
||||||
- tripleo-ansible-centos-8-molecule-backup_and_restore
|
- tripleo-ansible-centos-8-molecule-backup_and_restore
|
||||||
|
- tripleo-ansible-centos-8-molecule-designate_bind_config
|
||||||
- tripleo-ansible-centos-8-molecule-login_defs
|
- tripleo-ansible-centos-8-molecule-login_defs
|
||||||
- tripleo-ansible-centos-8-molecule-test_deps
|
- tripleo-ansible-centos-8-molecule-test_deps
|
||||||
- tripleo-ansible-centos-8-molecule-test_package_action
|
- tripleo-ansible-centos-8-molecule-test_package_action
|
||||||
@ -188,6 +191,13 @@
|
|||||||
parent: tripleo-ansible-centos-8-base
|
parent: tripleo-ansible-centos-8-base
|
||||||
vars:
|
vars:
|
||||||
tripleo_role_name: backup_and_restore
|
tripleo_role_name: backup_and_restore
|
||||||
|
- job:
|
||||||
|
files:
|
||||||
|
- ^tripleo_ansible/roles/designate_bind_config/.*
|
||||||
|
name: tripleo-ansible-centos-8-molecule-designate_bind_config
|
||||||
|
parent: tripleo-ansible-centos-8-base
|
||||||
|
vars:
|
||||||
|
tripleo_role_name: designate_bind_config
|
||||||
- job:
|
- job:
|
||||||
files:
|
files:
|
||||||
- ^tripleo_ansible/roles/login_defs/.*
|
- ^tripleo_ansible/roles/login_defs/.*
|
||||||
|
Loading…
Reference in New Issue
Block a user