Auto-fix yaml rules
In order to reduce divergance with ansible-lint rules, we apply auto-fixing of violations. In current patch we replace all kind of truthy variables with `true` or `false` values to align with recommendations along with alignment of used quotes. Change-Id: I96f2934f392affc01cdf3b85ad9198e21a6991be
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -48,6 +48,7 @@ logs/*
|
|||||||
.tox
|
.tox
|
||||||
*.egg-info
|
*.egg-info
|
||||||
.eggs
|
.eggs
|
||||||
|
.ansible
|
||||||
|
|
||||||
# Generated by pbr while building docs
|
# Generated by pbr while building docs
|
||||||
######################################
|
######################################
|
||||||
|
@@ -21,7 +21,7 @@ openstack_distrib_id: "OSA"
|
|||||||
openstack_distrib_release: "{{ openstack_release | default('master') }}"
|
openstack_distrib_release: "{{ openstack_release | default('master') }}"
|
||||||
openstack_distrib_code_name: "Dalmatian"
|
openstack_distrib_code_name: "Dalmatian"
|
||||||
openstack_distrib_description: "OpenStack-Ansible"
|
openstack_distrib_description: "OpenStack-Ansible"
|
||||||
openstack_distrib_file: yes
|
openstack_distrib_file: true
|
||||||
openstack_distrib_file_path: "/etc/openstack-release"
|
openstack_distrib_file_path: "/etc/openstack-release"
|
||||||
|
|
||||||
openstack_host_sysstat_enabled: true
|
openstack_host_sysstat_enabled: true
|
||||||
@@ -115,32 +115,32 @@ openstack_host_nf_conntrack_max: 262144
|
|||||||
|
|
||||||
# System control kernel tuning
|
# System control kernel tuning
|
||||||
openstack_kernel_options:
|
openstack_kernel_options:
|
||||||
- { key: 'fs.inotify.max_user_watches', value: 1048576 }
|
- { key: "fs.inotify.max_user_watches", value: 1048576 }
|
||||||
- { key: 'net.ipv4.conf.all.rp_filter', value: "{{ openstack_host_rp_filter_all }}" }
|
- { key: "net.ipv4.conf.all.rp_filter", value: "{{ openstack_host_rp_filter_all }}" }
|
||||||
- { key: 'net.ipv4.conf.default.rp_filter', value: "{{ openstack_host_rp_filter_default }}" }
|
- { key: "net.ipv4.conf.default.rp_filter", value: "{{ openstack_host_rp_filter_default }}" }
|
||||||
- { key: 'net.ipv4.ip_forward', value: 1 }
|
- { key: "net.ipv4.ip_forward", value: 1 }
|
||||||
- { key: 'net.netfilter.nf_conntrack_max', value: "{{ openstack_host_nf_conntrack_max }}" }
|
- { key: "net.netfilter.nf_conntrack_max", value: "{{ openstack_host_nf_conntrack_max }}" }
|
||||||
- { key: 'vm.dirty_background_ratio', value: 5 }
|
- { key: "vm.dirty_background_ratio", value: 5 }
|
||||||
- { key: 'vm.dirty_ratio', value: 10 }
|
- { key: "vm.dirty_ratio", value: 10 }
|
||||||
- { key: 'vm.swappiness', value: 5 }
|
- { key: "vm.swappiness", value: 5 }
|
||||||
- { key: 'net.bridge.bridge-nf-call-ip6tables', value: 1 }
|
- { key: "net.bridge.bridge-nf-call-ip6tables", value: 1 }
|
||||||
- { key: 'net.bridge.bridge-nf-call-iptables', value: 1 }
|
- { key: "net.bridge.bridge-nf-call-iptables", value: 1 }
|
||||||
- { key: 'net.bridge.bridge-nf-call-arptables', value: 1 }
|
- { key: "net.bridge.bridge-nf-call-arptables", value: 1 }
|
||||||
- { key: 'net.ipv4.igmp_max_memberships', value: 1024 }
|
- { key: "net.ipv4.igmp_max_memberships", value: 1024 }
|
||||||
- { key: 'net.ipv4.neigh.default.gc_thresh1', value: "{{ set_gc_val | int // 2 }}" }
|
- { 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_thresh2", value: "{{ set_gc_val | int }}" }
|
||||||
- { key: 'net.ipv4.neigh.default.gc_thresh3', value: "{{ set_gc_val | int * 2 }}" }
|
- { 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.route.gc_thresh", value: "{{ set_gc_val | int * 2 }}" }
|
||||||
- { key: 'net.ipv4.neigh.default.gc_interval', value: 60 }
|
- { key: "net.ipv4.neigh.default.gc_interval", value: 60 }
|
||||||
- { key: 'net.ipv4.neigh.default.gc_stale_time', value: 120 }
|
- { 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_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_thresh2", value: "{{ set_gc_val | int }}" }
|
||||||
- { key: 'net.ipv6.neigh.default.gc_thresh3', value: "{{ set_gc_val | int * 2 }}" }
|
- { 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.route.gc_thresh", value: "{{ set_gc_val | int * 2 }}" }
|
||||||
- { key: 'net.ipv6.neigh.default.gc_interval', value: 60 }
|
- { key: "net.ipv6.neigh.default.gc_interval", value: 60 }
|
||||||
- { key: 'net.ipv6.neigh.default.gc_stale_time', value: 120 }
|
- { key: "net.ipv6.neigh.default.gc_stale_time", value: 120 }
|
||||||
- { key: 'net.ipv6.conf.lo.disable_ipv6', value: 0 }
|
- { key: "net.ipv6.conf.lo.disable_ipv6", value: 0 }
|
||||||
- { key: 'fs.aio-max-nr', value: 131072 }
|
- { key: "fs.aio-max-nr", value: 131072 }
|
||||||
|
|
||||||
# Optional user defined list of sysctl options in the same dict item format as
|
# Optional user defined list of sysctl options in the same dict item format as
|
||||||
# above.
|
# above.
|
||||||
@@ -165,7 +165,7 @@ openstack_domain: openstack.local
|
|||||||
global_environment_variables: {}
|
global_environment_variables: {}
|
||||||
|
|
||||||
# Set the default mode for the /etc/cron.d/sysstat file
|
# Set the default mode for the /etc/cron.d/sysstat file
|
||||||
openstack_host_sysstat_cron_mode: '0755'
|
openstack_host_sysstat_cron_mode: "0755"
|
||||||
|
|
||||||
## Default repositories data
|
## Default repositories data
|
||||||
# Set default mirror for CentOS repositories
|
# Set default mirror for CentOS repositories
|
||||||
@@ -173,19 +173,18 @@ openstack_host_sysstat_cron_mode: '0755'
|
|||||||
openstack_hosts_centos_mirror_url: "{{ centos_mirror_url | default('http://mirror.centos.org/centos') }}"
|
openstack_hosts_centos_mirror_url: "{{ centos_mirror_url | default('http://mirror.centos.org/centos') }}"
|
||||||
# openstack_hosts_rdo_repo_type can be trunk or cloudsig
|
# openstack_hosts_rdo_repo_type can be trunk or cloudsig
|
||||||
openstack_hosts_rdo_repo_type: trunk
|
openstack_hosts_rdo_repo_type: trunk
|
||||||
openstack_hosts_rdo_mirror_url: 'https://trunk.rdoproject.org'
|
openstack_hosts_rdo_mirror_url: "https://trunk.rdoproject.org"
|
||||||
openstack_hosts_rdo_repo_url: "{{ _openstack_hosts_rdo_repo_url }}"
|
openstack_hosts_rdo_repo_url: "{{ _openstack_hosts_rdo_repo_url }}"
|
||||||
openstack_hosts_rdo_deps_url: "{{ _openstack_hosts_rdo_deps_url }}"
|
openstack_hosts_rdo_deps_url: "{{ _openstack_hosts_rdo_deps_url }}"
|
||||||
openstack_hosts_power_tool_enable: >-
|
openstack_hosts_power_tool_enable: >-
|
||||||
{{ ('repo_all' in groups or 'manila_all' in groups or 'gnocchi_all' in groups or install_method | default('source') == 'distro') }}
|
{{ ('repo_all' in groups or 'manila_all' in groups or 'gnocchi_all' in groups or install_method | default('source') == 'distro') }}
|
||||||
|
|
||||||
# Keep a history of systemd journals on disk after reboots
|
# Keep a history of systemd journals on disk after reboots
|
||||||
openstack_host_keep_journals: yes
|
openstack_host_keep_journals: true
|
||||||
# Define arbitrary configration for systemd-journald
|
# Define arbitrary configration for systemd-journald
|
||||||
openstack_hosts_journald_config: {}
|
openstack_hosts_journald_config: {}
|
||||||
|
|
||||||
# Enable/Disable the yum fastestmirror plugin
|
# Enable/Disable the yum fastestmirror plugin
|
||||||
openstack_hosts_enable_yum_fastestmirror: yes
|
openstack_hosts_enable_yum_fastestmirror: true
|
||||||
|
|
||||||
# user supplied list of CA certificates to copy to hosts from the deploy host
|
# user supplied list of CA certificates to copy to hosts from the deploy host
|
||||||
# example:
|
# example:
|
||||||
@@ -198,7 +197,7 @@ openstack_ca_bundle_path: "{{ _openstack_ca_bundle_path }}"
|
|||||||
|
|
||||||
# extra configuration for OS package manager
|
# extra configuration for OS package manager
|
||||||
openstack_hosts_package_manager_default_conf: "{{ _openstack_hosts_package_manager_default_conf | default('') }}"
|
openstack_hosts_package_manager_default_conf: "{{ _openstack_hosts_package_manager_default_conf | default('') }}"
|
||||||
openstack_hosts_package_manager_extra_conf: ''
|
openstack_hosts_package_manager_extra_conf: ""
|
||||||
|
|
||||||
# apt pins to apply to all hosts in the deployment
|
# apt pins to apply to all hosts in the deployment
|
||||||
# the default is to make ceph packages from UCA lower priority than those from the ubuntu distro repo
|
# the default is to make ceph packages from UCA lower priority than those from the ubuntu distro repo
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
service:
|
service:
|
||||||
name: systemd-journald
|
name: systemd-journald
|
||||||
state: restarted
|
state: restarted
|
||||||
enabled: yes
|
enabled: true
|
||||||
register: _restart
|
register: _restart
|
||||||
until: _restart is success
|
until: _restart is success
|
||||||
retries: 5
|
retries: 5
|
||||||
@@ -31,4 +31,4 @@
|
|||||||
|
|
||||||
- name: Systemd daemon reload
|
- name: Systemd daemon reload
|
||||||
systemd:
|
systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
|
@@ -78,7 +78,7 @@
|
|||||||
sysctl_set: "{{ item.set | default('yes') }}"
|
sysctl_set: "{{ item.set | default('yes') }}"
|
||||||
sysctl_file: "{{ openstack_hosts_sysctl_file }}"
|
sysctl_file: "{{ openstack_hosts_sysctl_file }}"
|
||||||
state: "{{ item.state | default('present') }}"
|
state: "{{ item.state | default('present') }}"
|
||||||
reload: no
|
reload: false
|
||||||
with_items: "{{ openstack_kernel_options + openstack_user_kernel_options }}"
|
with_items: "{{ openstack_kernel_options + openstack_user_kernel_options }}"
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
|
@@ -57,8 +57,8 @@
|
|||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/pam.d/sudo
|
path: /etc/pam.d/sudo
|
||||||
line: "session required pam_env.so readenv=1 user_readenv=0"
|
line: "session required pam_env.so readenv=1 user_readenv=0"
|
||||||
regexp: 'session\s+required\s+pam_env\.so'
|
regexp: "session\\s+required\\s+pam_env\\.so"
|
||||||
insertbefore: '^@include'
|
insertbefore: "^@include"
|
||||||
when: ansible_facts['distribution'] | lower == 'debian'
|
when: ansible_facts['distribution'] | lower == 'debian'
|
||||||
|
|
||||||
- name: Create systemd global directory
|
- name: Create systemd global directory
|
||||||
@@ -121,10 +121,10 @@
|
|||||||
sysctl:
|
sysctl:
|
||||||
name: "net.ipv4.tcp_retries2"
|
name: "net.ipv4.tcp_retries2"
|
||||||
value: "{{ keepalived_sysctl_tcp_retries | default(8) }}"
|
value: "{{ keepalived_sysctl_tcp_retries | default(8) }}"
|
||||||
sysctl_set: yes
|
sysctl_set: true
|
||||||
sysctl_file: "{{ openstack_hosts_sysctl_file }}"
|
sysctl_file: "{{ openstack_hosts_sysctl_file }}"
|
||||||
state: "{{ (keepalived_sysctl_tcp_retries | default(8) > 0) | ternary('present', 'absent') }}"
|
state: "{{ (keepalived_sysctl_tcp_retries | default(8) > 0) | ternary('present', 'absent') }}"
|
||||||
reload: yes
|
reload: true
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: Install distro packages
|
- name: Install distro packages
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0755'
|
mode: "0755"
|
||||||
|
|
||||||
- name: Validate repo config is deb822 format
|
- name: Validate repo config is deb822 format
|
||||||
vars:
|
vars:
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
apt:
|
apt:
|
||||||
name: "{{ openstack_hosts_package_list | rejectattr('state', 'equalto', 'absent') | map(attribute='name') | list }}"
|
name: "{{ openstack_hosts_package_list | rejectattr('state', 'equalto', 'absent') | map(attribute='name') | list }}"
|
||||||
state: "{{ openstack_hosts_package_state }}"
|
state: "{{ openstack_hosts_package_state }}"
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
cache_valid_time: "{{ cache_timeout }}"
|
cache_valid_time: "{{ cache_timeout }}"
|
||||||
register: _install_packages
|
register: _install_packages
|
||||||
until: _install_packages is success
|
until: _install_packages is success
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
- name: Update Apt cache
|
- name: Update Apt cache
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
when:
|
when:
|
||||||
- (_manage_apt_repositories is changed) or (_cleanup_apt_repositories is changed)
|
- (_manage_apt_repositories is changed) or (_cleanup_apt_repositories is changed)
|
||||||
register: _update_apt_cache
|
register: _update_apt_cache
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
section: main
|
section: main
|
||||||
option: enabled
|
option: enabled
|
||||||
value: "{{ (openstack_hosts_enable_yum_fastestmirror | bool) | ternary('1', '0') }}"
|
value: "{{ (openstack_hosts_enable_yum_fastestmirror | bool) | ternary('1', '0') }}"
|
||||||
no_extra_spaces: yes
|
no_extra_spaces: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
when:
|
when:
|
||||||
- fastestmirror_plugin_check.stat.exists
|
- fastestmirror_plugin_check.stat.exists
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
copy:
|
copy:
|
||||||
src: "{{ item.keyfile }}"
|
src: "{{ item.keyfile }}"
|
||||||
dest: "{{ item.key }}"
|
dest: "{{ item.key }}"
|
||||||
mode: '0644'
|
mode: "0644"
|
||||||
with_items: "{{ openstack_hosts_package_repos_keys | selectattr('keyfile', 'defined') | list }}"
|
with_items: "{{ openstack_hosts_package_repos_keys | selectattr('keyfile', 'defined') | list }}"
|
||||||
|
|
||||||
- name: Ensure GPG keys have the correct SELinux contexts applied
|
- name: Ensure GPG keys have the correct SELinux contexts applied
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
block: "{{ openstack_hosts_package_manager_default_conf + openstack_hosts_package_manager_extra_conf }}"
|
block: "{{ openstack_hosts_package_manager_default_conf + openstack_hosts_package_manager_extra_conf }}"
|
||||||
path: /etc/dnf/dnf.conf
|
path: /etc/dnf/dnf.conf
|
||||||
marker: "# {mark} OPENSTACK-ANSIBLE-OPENSTACK_HOSTS MANAGED BLOCK"
|
marker: "# {mark} OPENSTACK-ANSIBLE-OPENSTACK_HOSTS MANAGED BLOCK"
|
||||||
create: yes
|
create: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
when:
|
when:
|
||||||
- openstack_hosts_package_manager_extra_conf | length > 0 or openstack_hosts_package_manager_default_conf | length > 0
|
- openstack_hosts_package_manager_extra_conf | length > 0 or openstack_hosts_package_manager_default_conf | length > 0
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
section: main
|
section: main
|
||||||
option: enabled
|
option: enabled
|
||||||
value: "{{ (openstack_hosts_enable_yum_fastestmirror | bool) | ternary('1', '0') }}"
|
value: "{{ (openstack_hosts_enable_yum_fastestmirror | bool) | ternary('1', '0') }}"
|
||||||
no_extra_spaces: yes
|
no_extra_spaces: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
when:
|
when:
|
||||||
- fastestmirror_plugin_check.stat.exists
|
- fastestmirror_plugin_check.stat.exists
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
copy:
|
copy:
|
||||||
src: "{{ item.keyfile }}"
|
src: "{{ item.keyfile }}"
|
||||||
dest: "{{ item.key }}"
|
dest: "{{ item.key }}"
|
||||||
mode: '0644'
|
mode: "0644"
|
||||||
with_items: "{{ openstack_hosts_package_repos_keys | selectattr('keyfile', 'defined') | list }}"
|
with_items: "{{ openstack_hosts_package_repos_keys | selectattr('keyfile', 'defined') | list }}"
|
||||||
|
|
||||||
- name: Ensure GPG keys have the correct SELinux contexts applied
|
- name: Ensure GPG keys have the correct SELinux contexts applied
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
block: "{{ openstack_hosts_package_manager_default_conf + openstack_hosts_package_manager_extra_conf }}"
|
block: "{{ openstack_hosts_package_manager_default_conf + openstack_hosts_package_manager_extra_conf }}"
|
||||||
path: /etc/yum.conf
|
path: /etc/yum.conf
|
||||||
marker: "# {mark} OPENSTACK-ANSIBLE-OPENSTACK_HOSTS MANAGED BLOCK"
|
marker: "# {mark} OPENSTACK-ANSIBLE-OPENSTACK_HOSTS MANAGED BLOCK"
|
||||||
create: yes
|
create: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
when:
|
when:
|
||||||
- openstack_hosts_package_manager_extra_conf | length > 0 or openstack_hosts_package_manager_default_conf | length > 0
|
- openstack_hosts_package_manager_extra_conf | length > 0 or openstack_hosts_package_manager_default_conf | length > 0
|
||||||
|
@@ -33,6 +33,6 @@
|
|||||||
service:
|
service:
|
||||||
name: sysstat
|
name: sysstat
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
when:
|
when:
|
||||||
- ansible_facts['pkg_mgr'] == 'dnf'
|
- ansible_facts['pkg_mgr'] == 'dnf'
|
||||||
|
@@ -52,8 +52,8 @@
|
|||||||
dest: /etc/hosts
|
dest: /etc/hosts
|
||||||
block: "{{ (_etc_hosts_content + openstack_host_custom_hosts_records) | join('\n') }}"
|
block: "{{ (_etc_hosts_content + openstack_host_custom_hosts_records) | join('\n') }}"
|
||||||
marker: "### {mark} OPENSTACK-ANSIBLE {{ lookup('env', 'OSA_CONFIG_DIR') }} MANAGED BLOCK ###"
|
marker: "### {mark} OPENSTACK-ANSIBLE {{ lookup('env', 'OSA_CONFIG_DIR') }} MANAGED BLOCK ###"
|
||||||
run_once: True
|
run_once: true
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
become: True
|
become: true
|
||||||
when:
|
when:
|
||||||
- openstack_host_manage_deploy_hosts_file | bool
|
- openstack_host_manage_deploy_hosts_file | bool
|
||||||
|
@@ -20,7 +20,7 @@ openstack_host_sysstat_cron_file: /etc/cron.d/sysstat
|
|||||||
openstack_host_cron_template: sysstat.cron.redhat.j2
|
openstack_host_cron_template: sysstat.cron.redhat.j2
|
||||||
openstack_host_module_file: /etc/modules-load.d/openstack-ansible.conf
|
openstack_host_module_file: /etc/modules-load.d/openstack-ansible.conf
|
||||||
|
|
||||||
openstack_host_sysstat_cron_mode: '0600'
|
openstack_host_sysstat_cron_mode: "0600"
|
||||||
|
|
||||||
## Kernel modules loaded on hosts
|
## Kernel modules loaded on hosts
|
||||||
openstack_host_kernel_modules:
|
openstack_host_kernel_modules:
|
||||||
@@ -98,8 +98,8 @@ _package_repos_trunk:
|
|||||||
file: rdo-deps
|
file: rdo-deps
|
||||||
description: rdo-deps
|
description: rdo-deps
|
||||||
baseurl: "{{ openstack_hosts_rdo_deps_url }}"
|
baseurl: "{{ openstack_hosts_rdo_deps_url }}"
|
||||||
gpgcheck: no
|
gpgcheck: false
|
||||||
module_hotfixes: yes
|
module_hotfixes: true
|
||||||
|
|
||||||
_package_repos: |-
|
_package_repos: |-
|
||||||
{% if openstack_hosts_rdo_repo_type == 'trunk' %}
|
{% if openstack_hosts_rdo_repo_type == 'trunk' %}
|
||||||
|
Reference in New Issue
Block a user