-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/v0.7.0-ww.12.1'
- Loading branch information
Showing
16 changed files
with
258 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (c) 2015 Intel Corporation | ||
# | ||
# 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: restart unbound | ||
service: name=unbound state=restarted | ||
|
||
- name: restart consul | ||
service: name=consul state=restarted | ||
when: not consul_started.changed | ||
|
||
# vi:et:sw=2 ts=2 sts=2 ft=ansible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2015 Intel Corporation | ||
# | ||
# 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: make sure dns.json is removed | ||
file: path=/etc/consul.d/dns.json state=absent | ||
notify: | ||
- restart consul | ||
|
||
- name: copy server.json | ||
template: src=server.j2 dest=/etc/consul.d/server.json | ||
register: server | ||
notify: | ||
- restart consul | ||
|
||
- name: start the consul service | ||
service: name=consul state=started enabled=yes | ||
register: consul_started | ||
|
||
- meta: flush_handlers | ||
|
||
- name: wait for consul port 8301 to become accessible | ||
wait_for: host=localhost port=8301 timeout=10 | ||
|
||
- name: wait for consul port 8500 to become accessible and check cluster state | ||
uri: url=http://localhost:8500/v1/catalog/nodes | ||
register: cluster_state | ||
until: cluster_state|success | ||
retries: 6 | ||
delay: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) 2015 Intel Corporation | ||
# | ||
# 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: Install python-passlib as dependency for htpasswd module | ||
yum: pkg=python-passlib state=installed | ||
|
||
- name: Install nginx | ||
yum: pkg=nginx state=installed enablerepo=nginx | ||
|
||
- name: create config | ||
copy: src=nginx_default.conf dest=/etc/nginx/conf.d/default.conf | ||
|
||
- name: create htpasswd file | ||
htpasswd: path=/etc/nginx/conf.d/htpasswd name=consuluser password={{ consul_proxy_pass }} | ||
|
||
- name: start nginx | ||
service: name=nginx state=started enabled=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) 2015 Intel Corporation | ||
# | ||
# 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: Install unbound package | ||
yum: name=unbound state=latest | ||
|
||
- name: Copy service configuration | ||
template: src=unbound.conf.j2 dest=/etc/unbound/unbound.conf | ||
notify: | ||
- restart unbound | ||
|
||
- name: Create pidfile firectory | ||
file: path=/var/run/unbound state=directory mode=0755 | ||
|
||
- name: Start the service | ||
service: name=unbound state=started enabled=yes |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# | ||
# See unbound.conf(5) man page. | ||
# | ||
# this is a comment. | ||
|
||
# The server clause sets the main parameters. | ||
server: | ||
# verbosity number, 0 is least verbose. 1 is default. | ||
verbosity: 1 | ||
|
||
# print statistics to the log (for every thread) every N seconds. | ||
# Set to "" or 0 to disable. Default is disabled. | ||
# Needed for munin plugin | ||
statistics-interval: 3600 | ||
|
||
# enable cumulative statistics, without clearing them after printing. | ||
# Needed for munin plugin | ||
statistics-cumulative: no | ||
|
||
# enable extended statistics (query types, answer codes, status) | ||
# printed from unbound-control. default off, because of speed. | ||
# Needed for munin plugin | ||
extended-statistics: yes | ||
|
||
# number of threads to create. 1 disables threading. | ||
num-threads: 4 | ||
|
||
# specify the interfaces to answer queries from by ip-address. | ||
interface: 0.0.0.0 | ||
|
||
# enable this feature to copy the source address of queries to reply. | ||
interface-automatic: no | ||
|
||
# the time to live (TTL) value lower bound, in seconds. Default 0. | ||
# If more than an hour could easily give trouble due to stale data. | ||
cache-min-ttl: 300 | ||
|
||
# the time to live (TTL) value cap for RRsets and messages in the | ||
# cache. Items are not cached for longer. In seconds. | ||
cache-max-ttl: 86400 | ||
|
||
# control which clients are allowed to make (recursive) queries | ||
# to this server. Specify classless netblocks with /size and action. | ||
# By default everything is refused, except for localhost. | ||
# Choose deny (drop message), refuse (polite error reply), | ||
# allow (recursive ok), allow_snoop (recursive and nonrecursive ok) | ||
access-control: 0.0.0.0/0 allow | ||
|
||
# if given, a chroot(2) is done to the given directory. | ||
chroot: "" | ||
|
||
# if given, user privileges are dropped (after binding port), | ||
# and the given username is assumed. Default is user "unbound". | ||
# If you give "" no privileges are dropped. | ||
username: "unbound" | ||
|
||
# the working directory. The relative files in this config are | ||
# relative to this directory. If you give "" the working directory | ||
# is not changed. | ||
directory: "/etc/unbound" | ||
|
||
# the pid file. Can be an absolute path outside of chroot/work dir. | ||
pidfile: "/var/run/unbound/unbound.pid" | ||
|
||
# if yes, perform prefetching of almost expired message cache entries. | ||
prefetch: yes | ||
|
||
# if yes, Unbound rotates RRSet order in response. | ||
rrset-roundrobin: yes | ||
|
||
# if yes, Unbound doesn't insert authority/additional sections | ||
# into response messages when those sections are not required. | ||
minimal-responses: yes | ||
|
||
# allow queries to local consul host | ||
do-not-query-localhost: no | ||
|
||
# allow reverse lookups | ||
local-zone: "10.10.in-addr.arpa." transparent | ||
local-zone: "168.192.in-addr.arpa." transparent | ||
|
||
# Remote control config section. | ||
remote-control: | ||
# Enable remote control with unbound-control(8) here. | ||
# set up the keys and certificates with unbound-control-setup. | ||
# Note: required for unbound-munin package | ||
control-enable: no | ||
|
||
# Forward zones | ||
# Create entries like below, to make all queries for 'example.com' and | ||
# 'example.org' go to the given list of servers. These servers have to handle | ||
# recursion to other nameservers. List zero or more nameservers by hostname | ||
# or by ipaddress. Use an entry with name "." to forward all queries. | ||
# If you enable forward-first, it attempts without the forward if it fails. | ||
forward-zone: | ||
name: "consul." | ||
forward-addr: 127.0.0.1@8600 | ||
|
||
stub-zone: | ||
name: "10.10.in-addr.arpa." | ||
stub-addr: 127.0.0.1@8600 | ||
|
||
stub-zone: | ||
name: "168.192.in-addr.arpa." | ||
stub-addr: 127.0.0.1@8600 | ||
|
||
forward-zone: | ||
name: "." | ||
{% if ansible_virtualization_type == 'xen' %} | ||
forward-addr: 169.254.169.253 | ||
{% else %} | ||
forward-addr: {{ openstack_dns1 }} | ||
forward-addr: {{ openstack_dns2 }} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.