To clone or view the source code for this repository, visit the role repository for openstack_hosts.
# Package cache
cache_timeout: 600
# /etc/openstack-release settings
openstack_distrib_id: "OSA"
openstack_distrib_release: "{{ openstack_release | default('master') }}"
openstack_distrib_code_name: "Queens"
openstack_distrib_description: "OpenStack-Ansible"
openstack_distrib_file: yes
openstack_distrib_file_path: "/etc/openstack-release"
is_container: "{{ ansible_virtualization_type == 'lxc' }}"
openstack_host_sysstat_enabled: true
openstack_host_sysstat_interval: 1
openstack_host_sysstat_statistics_hour: 23
# Set the package install state for distribution packages
# Options are 'present' and 'latest'
openstack_hosts_package_state: "latest"
## Enable/disable /etc/hosts file management
## You should make other arrangements for name resolution
## of OSA containers and hosts if disabling this
openstack_host_manage_hosts_file: true
## kernel modules for specific group hosts
openstack_host_specific_kernel_modules: []
# If you want to include some specific modules per group
# of hosts, override this with a group/host var, like below:
#openstack_host_specific_kernel_modules:
# - name: "ebtables"
# pattern: "CONFIG_BRIDGE_NF_EBTABLES"
## Where:
## :param name: name of the kernel module
## :param pattern: pattern to grep for in /boot/config-$kernel_version to check how module is configured inside kernel
## Our default overrides will be combined with your overrides.
# Overridable package list is composed of the old override
# named user_package_list and the standard defaults _package_list
openstack_hosts_package_list: "{{ _package_list + (user_package_list | default([])) }}"
# Overridable package repo is composed of the old override
# named user_external_repo_lists and the standard defaults _package_repos
openstack_hosts_package_repos: "{{ _package_repos + (user_external_repos_list | default([])) }}"
# Overridable package repo gpg is composed of the old override
# named user_external_repo_keys_list and the standard defaults _package_repos_keys
openstack_hosts_package_repos_keys: "{{ _package_repos_keys + (user_external_repo_keys_list | default([])) }}"
openstack_hosts_package_repos_priorities: "{{ _package_repos_priorities }}"
# The following garbage collection values are set to better support lots of neutron networks/routers.
# Used for setting the net.ipv4/6.neigh.default.gc_thresh* values. This assumes that facts were
# gathered to obtain the total amount of memory available on a given host. If no facts are gathered
# the default set will be 1024 unless its defined by the user.
gc_val: "{{ ansible_memtotal_mb | default(1024) | bit_length_power_of_2 }}"
# The ste value has a Max allowable value of 8192 unless set by the user.
set_gc_val: "{{ gc_val if (gc_val | int <= 8192) else 8192 }}"
# Controls the shell search PATH environment variable dropped in
# /etc/environment
openstack_host_environment_path:
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
# Set the maximum size of the connection tracking table.
openstack_host_nf_conntrack_max: 262144
# System control kernel tuning
openstack_kernel_options:
- { key: 'fs.inotify.max_user_watches', value: 1048576 }
- { key: 'net.ipv4.conf.all.rp_filter', value: 0 }
- { key: 'net.ipv4.conf.default.rp_filter', value: 0 }
- { key: 'net.ipv4.ip_forward', value: 1 }
- { key: 'net.netfilter.nf_conntrack_max', value: "{{ openstack_host_nf_conntrack_max }}" }
- { key: 'vm.dirty_background_ratio', value: 5 }
- { key: 'vm.dirty_ratio', value: 10 }
- { key: 'vm.swappiness', value: 5 }
- { key: 'net.bridge.bridge-nf-call-ip6tables', value: 1 }
- { key: 'net.bridge.bridge-nf-call-iptables', value: 1 }
- { key: 'net.bridge.bridge-nf-call-arptables', value: 1 }
- { key: 'net.ipv4.neigh.default.gc_thresh1', value: "{{ set_gc_val | int // 2 }}" }
- { key: 'net.ipv4.neigh.default.gc_thresh2', value: "{{ set_gc_val | int }}" }
- { key: 'net.ipv4.neigh.default.gc_thresh3', value: "{{ set_gc_val | int * 2 }}" }
- { key: 'net.ipv4.route.gc_thresh', value: "{{ set_gc_val | int * 2 }}" }
- { key: 'net.ipv4.neigh.default.gc_interval', value: 60 }
- { key: 'net.ipv4.neigh.default.gc_stale_time', value: 120 }
- { key: 'net.ipv6.neigh.default.gc_thresh1', value: "{{ set_gc_val | int // 2 }}" }
- { key: 'net.ipv6.neigh.default.gc_thresh2', value: "{{ set_gc_val | int }}" }
- { key: 'net.ipv6.neigh.default.gc_thresh3', value: "{{ set_gc_val | int * 2 }}" }
- { key: 'net.ipv6.route.gc_thresh', value: "{{ set_gc_val | int * 2 }}" }
- { key: 'net.ipv6.neigh.default.gc_interval', value: 60 }
- { key: 'net.ipv6.neigh.default.gc_stale_time', value: 120 }
- { key: 'net.ipv6.conf.lo.disable_ipv6', value: 0 }
- { key: 'fs.aio-max-nr', value: 131072 }
# Optional user defined list of sysctl options in the same dict item format as
# above.
openstack_user_kernel_options: []
# Overridable set of packages to install on the host.
openstack_host_metal_distro_packages: "{{ _openstack_host_metal_distro_packages }}"
# Set the openstack domain name
openstack_domain: openstack.local
# Global environment variables should be empty by default
global_environment_variables: {}
# Set the default mode for the /etc/cron.d/sysstat file
openstack_host_sysstat_cron_mode: '0755'
## Default repositories data
# Set default mirror for CentOS repositories
# NOTE(mhayden): Ensure that the full path to the 'centos' directory is used.
openstack_hosts_centos_mirror_url: 'http://mirror.centos.org/centos'
# Ubuntu cloud archive data
uca_repo: "deb {{ uca_apt_repo_url | default('http://ubuntu-cloud.archive.canonical.com/ubuntu') }} {{ ansible_lsb.codename }}-updates/queens main"
# Default opensuse mirrors URLs
opensuse_mirror: "http://download.opensuse.org"
opensuse_mirror_obs: "{{ opensuse_mirror }}"
# If mirrored to a different folder, we need to keep this as overridable.
opensuse_repo_oss_url: "{{ opensuse_mirror }}/distribution/leap/{{ ansible_distribution_version }}/repo/oss/"
opensuse_repo_update_url: "{{ opensuse_mirror }}/update/leap/{{ ansible_distribution_version }}/oss/"
opensuse_obs_cloud_repo_url: "{{ opensuse_mirror_obs }}/repositories/Cloud:/OpenStack:/Queens/openSUSE_Leap_{{ ansible_distribution_version }}"
# Keep a history of systemd journals on disk after reboots
openstack_host_keep_journals: yes
# Enable/Disable the yum fastestmirror plugin
openstack_hosts_enable_yum_fastestmirror: yes
None
- name: Basic host setup
hosts: "hosts"
user: root
roles:
- { role: "openstack_hosts" }
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.