Merge "Move package cache configuration to common tasks"
This commit is contained in:
commit
3b63d64fa1
30
playbooks/common-tasks/package-cache-proxy.yml
Normal file
30
playbooks/common-tasks/package-cache-proxy.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
# Copyright 2016, Logan Vig <logan2211@gmail.com>
|
||||
#
|
||||
# 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: Drop apt package manager proxy
|
||||
copy:
|
||||
content: 'Acquire::http { Proxy "{{ repo_pkg_cache_url }}"; };'
|
||||
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
- repo_pkg_cache_enabled | bool
|
||||
|
||||
- name: Drop yum package manager proxy
|
||||
lineinfile:
|
||||
line: 'proxy={{ repo_pkg_cache_url }}'
|
||||
dest: "/etc/yum.conf"
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- repo_pkg_cache_enabled | bool
|
@ -24,6 +24,7 @@
|
||||
list_of_bind_mounts:
|
||||
- bind_dir_path: "/var/lib/mysql"
|
||||
mount_path: "/openstack/{{ inventory_hostname }}"
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
vars:
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
tags:
|
||||
|
@ -72,6 +72,8 @@
|
||||
tags:
|
||||
- "haproxy-rsyslog-client"
|
||||
- "rsyslog-client"
|
||||
post_tasks:
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
vars_files:
|
||||
- vars/configs/haproxy_config.yml
|
||||
vars:
|
||||
|
@ -36,6 +36,8 @@ pip_links:
|
||||
# URL for the frozen internal openstack repo.
|
||||
repo_server_port: 8181
|
||||
repo_pkg_cache_enabled: true
|
||||
repo_pkg_cache_port: 3142
|
||||
repo_pkg_cache_url: "http://{{ internal_lb_vip_address }}:{{ repo_pkg_cache_port }}"
|
||||
openstack_repo_url: "http://{{ internal_lb_vip_address }}:{{ repo_server_port }}"
|
||||
openstack_repo_git_url: "git://{{ internal_lb_vip_address }}"
|
||||
|
||||
@ -240,4 +242,3 @@ ansible_ssh_extra_args: >
|
||||
-o ForwardX11=no
|
||||
-o ForwardAgent=yes
|
||||
-T
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
log_dirs:
|
||||
- src: "/openstack/log/{{ inventory_hostname }}-memcached"
|
||||
dest: "/var/log/memcached"
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- { role: "memcached_server", tags: [ "memcached-server" ] }
|
||||
- role: "system_crontab_coordination"
|
||||
|
@ -43,6 +43,7 @@
|
||||
login_host: "{{ aodh_galera_address }}"
|
||||
db_name: "{{ aodh_galera_database }}"
|
||||
when: inventory_hostname == groups['aodh_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "os_aodh"
|
||||
aodh_venv_tag: "{{ openstack_release }}"
|
||||
|
@ -36,6 +36,7 @@
|
||||
log_dirs:
|
||||
- src: "/openstack/log/{{ inventory_hostname }}-ceilometer"
|
||||
dest: "/var/log/ceilometer"
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "os_ceilometer"
|
||||
ceilometer_venv_tag: "{{ openstack_release }}"
|
||||
|
@ -55,6 +55,7 @@
|
||||
login_host: "{{ cinder_galera_address }}"
|
||||
db_name: "{{ cinder_galera_database }}"
|
||||
when: inventory_hostname == groups['cinder_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
|
||||
- name: Add volume group block device to cinder
|
||||
shell: |
|
||||
|
@ -50,6 +50,7 @@
|
||||
login_host: "{{ glance_galera_address }}"
|
||||
db_name: "{{ glance_galera_database }}"
|
||||
when: inventory_hostname == groups['glance_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "os_glance"
|
||||
glance_venv_tag: "{{ openstack_release }}"
|
||||
|
@ -38,6 +38,7 @@
|
||||
login_host: "{{ gnocchi_galera_address }}"
|
||||
db_name: "{{ gnocchi_galera_database }}"
|
||||
when: inventory_hostname == groups['gnocchi_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "os_gnocchi"
|
||||
gnocchi_venv_tag: "{{ openstack_release }}"
|
||||
|
@ -43,6 +43,7 @@
|
||||
login_host: "{{ heat_galera_address }}"
|
||||
db_name: "{{ heat_galera_database }}"
|
||||
when: inventory_hostname == groups['heat_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "os_heat"
|
||||
heat_venv_tag: "{{ openstack_release }}"
|
||||
|
@ -35,6 +35,7 @@
|
||||
login_host: "{{ horizon_galera_address }}"
|
||||
db_name: "{{ horizon_galera_database }}"
|
||||
when: inventory_hostname == groups['horizon_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "os_horizon"
|
||||
horizon_venv_tag: "{{ openstack_release }}"
|
||||
|
@ -37,6 +37,7 @@
|
||||
login_host: "{{ ironic_galera_address }}"
|
||||
db_name: "{{ ironic_galera_database }}"
|
||||
when: inventory_hostname == groups['ironic_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "os_ironic"
|
||||
ironic_venv_tag: "{{ openstack_release }}"
|
||||
|
@ -43,6 +43,7 @@
|
||||
login_host: "{{ keystone_galera_address }}"
|
||||
db_name: "{{ keystone_galera_database }}"
|
||||
when: inventory_hostname == groups['keystone_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
|
||||
# todo(cloudnull): this task is being run only if/when keystone is installed on a physical host.
|
||||
# This is not being run within a container because it is an unsupported action due to this
|
||||
|
@ -53,6 +53,7 @@
|
||||
login_host: "{{ neutron_galera_address }}"
|
||||
db_name: "{{ neutron_galera_database }}"
|
||||
when: inventory_hostname == groups['neutron_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
|
||||
- name: Create the neutron provider networks facts
|
||||
provider_networks:
|
||||
|
@ -50,6 +50,7 @@
|
||||
login_host: "{{ nova_api_galera_address }}"
|
||||
db_name: "{{ nova_api_galera_database }}"
|
||||
when: inventory_hostname == groups['nova_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
|
||||
- name: Add nbd devices to the compute
|
||||
shell: |
|
||||
|
@ -27,6 +27,7 @@
|
||||
dest: "/var/log/swift"
|
||||
owner: "syslog"
|
||||
group: "syslog"
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
|
||||
- name: Set swift storage bridge (is_metal)
|
||||
set_fact:
|
||||
|
@ -20,6 +20,7 @@
|
||||
user: root
|
||||
pre_tasks:
|
||||
- include: common-tasks/os-lxc-container-setup.yml
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "system_crontab_coordination"
|
||||
tags:
|
||||
|
@ -44,22 +44,3 @@
|
||||
- "rsyslog-client"
|
||||
vars:
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
|
||||
- name: Setup package manager proxy
|
||||
hosts: all:!repo_all
|
||||
tasks:
|
||||
- name: Drop apt package manager proxy
|
||||
copy:
|
||||
content: 'Acquire::http { Proxy "http://{{ internal_lb_vip_address }}:3142"; };'
|
||||
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
- repo_pkg_cache_enabled | bool
|
||||
- name: Drop apt package manager proxy
|
||||
lineinfile:
|
||||
line: 'proxy=http://{{ internal_lb_vip_address }}:3142'
|
||||
dest: "/etc/yum.conf"
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- repo_pkg_cache_enabled | bool
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
list_of_bind_mounts:
|
||||
- bind_dir_path: "{{ storage_directory }}"
|
||||
mount_path: "/openstack/{{ inventory_hostname }}/log-storage"
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- { role: "rsyslog_server", tags: [ "rsyslog-server" ] }
|
||||
- role: "system_crontab_coordination"
|
||||
|
@ -13,9 +13,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- include: repo-install.yml
|
||||
- include: haproxy-install.yml
|
||||
- include: memcached-install.yml
|
||||
- include: repo-install.yml
|
||||
- include: galera-install.yml
|
||||
- include: rabbitmq-install.yml
|
||||
- include: utility-install.yml
|
||||
|
@ -24,6 +24,7 @@
|
||||
log_dirs:
|
||||
- src: "/openstack/log/{{ inventory_hostname }}-utility"
|
||||
dest: "/var/log/utility"
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
|
||||
- name: Create log directory (not is_metal)
|
||||
file:
|
||||
|
@ -52,7 +52,7 @@ haproxy_default_services:
|
||||
haproxy_backend_nodes: "{{ [groups['repo_all'][0]] | default([]) }}" # list expected
|
||||
haproxy_backup_nodes: "{{ groups['repo_all'][1:] | default([]) }}"
|
||||
haproxy_ssl: "{{ haproxy_ssl }}"
|
||||
haproxy_port: 3142
|
||||
haproxy_port: "{{ repo_pkg_cache_port }}"
|
||||
haproxy_balance_type: http
|
||||
haproxy_backend_options:
|
||||
- "httpchk HEAD /acng-report.html"
|
||||
|
Loading…
Reference in New Issue
Block a user