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: Ib52a0b06e5beda167de7dcf3b7fb42bc9818be62
This commit is contained in:
parent
5b577e819e
commit
b6966bb57c
1
.gitignore
vendored
1
.gitignore
vendored
@ -45,6 +45,7 @@ logs/*
|
|||||||
# OS generated files #
|
# OS generated files #
|
||||||
######################
|
######################
|
||||||
._*
|
._*
|
||||||
|
.ansible
|
||||||
.tox
|
.tox
|
||||||
*.egg-info
|
*.egg-info
|
||||||
.eggs
|
.eggs
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
# Enable/Disable barbican configurations
|
# Enable/Disable barbican configurations
|
||||||
zun_barbican_enabled: "{{ (groups['barbican_all'] is defined) and (groups['barbican_all'] | length > 0) }}"
|
zun_barbican_enabled: "{{ (groups['barbican_all'] is defined) and (groups['barbican_all'] | length > 0) }}"
|
||||||
# Enable/Disable designate configurations
|
# Enable/Disable designate configurations
|
||||||
@ -24,7 +22,7 @@ zun_notifications_designate: notifications_designate
|
|||||||
zun_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
zun_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||||
|
|
||||||
## Verbosity Options
|
## Verbosity Options
|
||||||
debug: False
|
debug: false
|
||||||
|
|
||||||
# python venv executable
|
# python venv executable
|
||||||
zun_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}"
|
zun_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}"
|
||||||
@ -65,7 +63,7 @@ zun_pip_install_args: "{{ pip_install_options | default('') }}"
|
|||||||
zun_venv_tag: "{{ venv_tag | default('untagged') }}"
|
zun_venv_tag: "{{ venv_tag | default('untagged') }}"
|
||||||
zun_bin: "/openstack/venvs/zun-{{ zun_venv_tag }}/bin"
|
zun_bin: "/openstack/venvs/zun-{{ zun_venv_tag }}/bin"
|
||||||
|
|
||||||
zun_fatal_deprecations: False
|
zun_fatal_deprecations: false
|
||||||
|
|
||||||
## Zun user information
|
## Zun user information
|
||||||
zun_system_user_name: zun
|
zun_system_user_name: zun
|
||||||
@ -110,7 +108,7 @@ zun_docker_bind_host: "{{ openstack_service_bind_address | default('0.0.0.0') }}
|
|||||||
zun_docker_bind_port: 2375
|
zun_docker_bind_port: 2375
|
||||||
|
|
||||||
# Should Docker image cache data be periodically cleaned up?
|
# Should Docker image cache data be periodically cleaned up?
|
||||||
zun_docker_prune_images: False
|
zun_docker_prune_images: false
|
||||||
|
|
||||||
# Time period for which to clean up old Docker data. The options are hour, day,
|
# Time period for which to clean up old Docker data. The options are hour, day,
|
||||||
# month, or year. (string value)
|
# month, or year. (string value)
|
||||||
@ -290,7 +288,7 @@ zun_services:
|
|||||||
condition: "{{ inventory_hostname in groups['zun_compute'] }}"
|
condition: "{{ inventory_hostname in groups['zun_compute'] }}"
|
||||||
init_config_overrides: "{{ zun_kuryr_init_defaults | combine(zun_kuryr_init_overrides, recursive=True) }}"
|
init_config_overrides: "{{ zun_kuryr_init_defaults | combine(zun_kuryr_init_overrides, recursive=True) }}"
|
||||||
start_order: 3
|
start_order: 3
|
||||||
wsgi_app: True
|
wsgi_app: true
|
||||||
wsgi: kuryr_libnetwork.server:app
|
wsgi: kuryr_libnetwork.server:app
|
||||||
uwsgi_bind_address: "{{ zun_kuryr_service_address }}"
|
uwsgi_bind_address: "{{ zun_kuryr_service_address }}"
|
||||||
uwsgi_port: "{{ zun_kuryr_service_port }}"
|
uwsgi_port: "{{ zun_kuryr_service_port }}"
|
||||||
@ -302,7 +300,7 @@ zun_services:
|
|||||||
service_name: zun-api
|
service_name: zun-api
|
||||||
init_config_overrides: "{{ zun_api_init_overrides }}"
|
init_config_overrides: "{{ zun_api_init_overrides }}"
|
||||||
start_order: 1
|
start_order: 1
|
||||||
wsgi_app: True
|
wsgi_app: true
|
||||||
wsgi_path: "{{ zun_bin }}/zun-api-wsgi"
|
wsgi_path: "{{ zun_bin }}/zun-api-wsgi"
|
||||||
uwsgi_bind_address: "{{ zun_service_address }}"
|
uwsgi_bind_address: "{{ zun_service_address }}"
|
||||||
uwsgi_port: "{{ zun_service_port }}"
|
uwsgi_port: "{{ zun_service_port }}"
|
||||||
@ -339,7 +337,7 @@ zun_services:
|
|||||||
service_name: docker
|
service_name: docker
|
||||||
init_config_overrides: {}
|
init_config_overrides: {}
|
||||||
start_order: 4
|
start_order: 4
|
||||||
systemd_overrides_only: True
|
systemd_overrides_only: true
|
||||||
systemd_overrides: "{{ zun_docker_init_defaults | combine(zun_docker_init_overrides, recursive=True) }}"
|
systemd_overrides: "{{ zun_docker_init_defaults | combine(zun_docker_init_overrides, recursive=True) }}"
|
||||||
|
|
||||||
# Common pip packages
|
# Common pip packages
|
||||||
@ -427,7 +425,7 @@ zun_pki_setup_host: "{{ openstack_pki_setup_host | default('localhost') }}"
|
|||||||
zun_pki_keys_path: "{{ zun_pki_dir ~ '/certs/private/' }}"
|
zun_pki_keys_path: "{{ zun_pki_dir ~ '/certs/private/' }}"
|
||||||
zun_pki_certs_path: "{{ zun_pki_dir ~ '/certs/certs/' }}"
|
zun_pki_certs_path: "{{ zun_pki_dir ~ '/certs/certs/' }}"
|
||||||
zun_pki_intermediate_cert_name: "{{ openstack_pki_service_intermediate_cert_name | default('ExampleCorpIntermediate') }}"
|
zun_pki_intermediate_cert_name: "{{ openstack_pki_service_intermediate_cert_name | default('ExampleCorpIntermediate') }}"
|
||||||
zun_pki_regen_cert: ''
|
zun_pki_regen_cert: ""
|
||||||
zun_pki_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',IP:' ~ management_address) }}"
|
zun_pki_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',IP:' ~ management_address) }}"
|
||||||
zun_pki_certificates:
|
zun_pki_certificates:
|
||||||
- name: "zun_{{ ansible_facts['hostname'] }}"
|
- name: "zun_{{ ansible_facts['hostname'] }}"
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Gather zun facts
|
- name: Gather zun facts
|
||||||
hosts: zun_all
|
hosts: zun_all
|
||||||
gather_facts: True
|
gather_facts: true
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- name: Install zun services
|
- name: Install zun services
|
||||||
hosts: zun_all
|
hosts: zun_all
|
||||||
gather_facts: False
|
gather_facts: false
|
||||||
serial:
|
serial:
|
||||||
- 1
|
- 1
|
||||||
- "100%"
|
- "100%"
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
- name: Stop containerd
|
- name: Stop containerd
|
||||||
systemd:
|
systemd:
|
||||||
name: "containerd"
|
name: "containerd"
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: "stopped"
|
state: "stopped"
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
register: _stop
|
register: _stop
|
||||||
until: _stop is success
|
until: _stop is success
|
||||||
retries: 5
|
retries: 5
|
||||||
@ -28,9 +28,9 @@
|
|||||||
- name: Start containerd
|
- name: Start containerd
|
||||||
systemd:
|
systemd:
|
||||||
name: "containerd"
|
name: "containerd"
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: "started"
|
state: "started"
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
register: _start
|
register: _start
|
||||||
until: _start is success
|
until: _start is success
|
||||||
retries: 5
|
retries: 5
|
||||||
@ -40,9 +40,9 @@
|
|||||||
- name: Stop docker
|
- name: Stop docker
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: "stopped"
|
state: "stopped"
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
with_items:
|
with_items:
|
||||||
- docker
|
- docker
|
||||||
- kuryr-libnetwork
|
- kuryr-libnetwork
|
||||||
@ -55,9 +55,9 @@
|
|||||||
- name: Start docker
|
- name: Start docker
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: "started"
|
state: "started"
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
with_items:
|
with_items:
|
||||||
- kuryr-libnetwork
|
- kuryr-libnetwork
|
||||||
- docker
|
- docker
|
||||||
@ -70,9 +70,9 @@
|
|||||||
- name: Stop services
|
- name: Stop services
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ item.service_name }}"
|
name: "{{ item.service_name }}"
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: "stopped"
|
state: "stopped"
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
with_items: "{{ filtered_zun_services }}"
|
with_items: "{{ filtered_zun_services }}"
|
||||||
register: _stop
|
register: _stop
|
||||||
until: _stop is success
|
until: _stop is success
|
||||||
@ -87,9 +87,9 @@
|
|||||||
- name: Start services
|
- name: Start services
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ item.service_name }}"
|
name: "{{ item.service_name }}"
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: "started"
|
state: "started"
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
with_items: "{{ filtered_zun_services }}"
|
with_items: "{{ filtered_zun_services }}"
|
||||||
register: _start
|
register: _start
|
||||||
until: _start is success
|
until: _start is success
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
- name: Retrieve the constraints URL
|
- name: Retrieve the constraints URL
|
||||||
uri:
|
uri:
|
||||||
url: "{{ zun_upper_constraints_url }}"
|
url: "{{ zun_upper_constraints_url }}"
|
||||||
return_content: yes
|
return_content: true
|
||||||
register: _u_c_contents
|
register: _u_c_contents
|
||||||
|
|
||||||
- name: Install the python venv
|
- name: Install the python venv
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
- name: Update Apt cache
|
- name: Update Apt cache
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
when: (add_nv_repos is changed) or (_cleanup_apt_repositories is changed)
|
when: (add_nv_repos is changed) or (_cleanup_apt_repositories is changed)
|
||||||
register: update_apt_cache
|
register: update_apt_cache
|
||||||
until: update_apt_cache is success
|
until: update_apt_cache is success
|
||||||
@ -95,8 +95,8 @@
|
|||||||
description: "{{ item.description }}"
|
description: "{{ item.description }}"
|
||||||
baseurl: "{{ item.repo }}"
|
baseurl: "{{ item.repo }}"
|
||||||
gpgkey: "{{ item.gpgkey | default(omit) }}"
|
gpgkey: "{{ item.gpgkey | default(omit) }}"
|
||||||
gpgcheck: yes
|
gpgcheck: true
|
||||||
enabled: yes
|
enabled: true
|
||||||
priority: 25
|
priority: 25
|
||||||
register: add_docker_repos
|
register: add_docker_repos
|
||||||
until: add_docker_repos is success
|
until: add_docker_repos is success
|
||||||
@ -131,7 +131,7 @@
|
|||||||
get_url:
|
get_url:
|
||||||
url: "{{ zun_kata_package_source }}"
|
url: "{{ zun_kata_package_source }}"
|
||||||
dest: "/opt/{{ zun_kata_package_source | basename }}"
|
dest: "/opt/{{ zun_kata_package_source | basename }}"
|
||||||
mode: '0440'
|
mode: "0440"
|
||||||
checksum: "{{ zun_kata_package_checksum }}"
|
checksum: "{{ zun_kata_package_checksum }}"
|
||||||
register: _kata_downloaded
|
register: _kata_downloaded
|
||||||
|
|
||||||
@ -139,7 +139,7 @@
|
|||||||
unarchive:
|
unarchive:
|
||||||
src: "/opt/{{ zun_kata_package_source | basename }}"
|
src: "/opt/{{ zun_kata_package_source | basename }}"
|
||||||
dest: /opt/
|
dest: /opt/
|
||||||
remote_src: True
|
remote_src: true
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
extra_opts:
|
extra_opts:
|
||||||
@ -282,7 +282,7 @@
|
|||||||
user:
|
user:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
groups: "{{ zun_docker_groupname }}"
|
groups: "{{ zun_docker_groupname }}"
|
||||||
append: yes
|
append: true
|
||||||
with_items: "{{ zun_docker_users }}"
|
with_items: "{{ zun_docker_users }}"
|
||||||
|
|
||||||
- name: Drop sudoers file
|
- name: Drop sudoers file
|
||||||
@ -306,7 +306,7 @@
|
|||||||
systemd:
|
systemd:
|
||||||
name: multipathd
|
name: multipathd
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
|
|
||||||
- name: Create script to clean up old Docker data
|
- name: Create script to clean up old Docker data
|
||||||
template:
|
template:
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
- name: Synchronize the zun DB schema
|
- name: Synchronize the zun DB schema
|
||||||
command: "{{ zun_bin }}/zun-db-manage --config-dir /etc/zun upgrade"
|
command: "{{ zun_bin }}/zun-db-manage --config-dir /etc/zun upgrade"
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ zun_system_user_name }}"
|
become_user: "{{ zun_system_user_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
|
@ -22,7 +22,6 @@ zun_docker_repo:
|
|||||||
repo: "https://download.docker.com/linux/centos/{{ ansible_facts['distribution_major_version'] }}/$basearch/stable"
|
repo: "https://download.docker.com/linux/centos/{{ ansible_facts['distribution_major_version'] }}/$basearch/stable"
|
||||||
gpgkey: "https://download.docker.com/linux/centos/gpg"
|
gpgkey: "https://download.docker.com/linux/centos/gpg"
|
||||||
|
|
||||||
|
|
||||||
# Common yum packages
|
# Common yum packages
|
||||||
zun_distro_packages:
|
zun_distro_packages:
|
||||||
- git
|
- git
|
||||||
|
Loading…
x
Reference in New Issue
Block a user