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: I3978b58a26db45f2efd06aaca0cd8be508bd0653
This commit is contained in:
parent
80afdc7fba
commit
d33faaf5c3
1
.gitignore
vendored
1
.gitignore
vendored
@ -45,6 +45,7 @@ logs/*
|
||||
# OS generated files #
|
||||
######################
|
||||
._*
|
||||
.ansible
|
||||
.tox
|
||||
*.egg-info
|
||||
.eggs
|
||||
|
@ -18,7 +18,7 @@ systemd_group_name: root
|
||||
systemd_slice_name: system
|
||||
|
||||
# Restart services when a change occurs
|
||||
systemd_service_restart_changed: yes
|
||||
systemd_service_restart_changed: true
|
||||
|
||||
# This is the prefix used for all temp files of a given type.
|
||||
systemd_tempd_prefix: tempd
|
||||
@ -53,7 +53,7 @@ systemd_after_targets:
|
||||
systemd_unit_docs: []
|
||||
|
||||
# Set the service enabled state. Valid options are: [yes, no]
|
||||
systemd_service_enabled: yes
|
||||
systemd_service_enabled: true
|
||||
|
||||
# Set global service overrides used within the service unit file.
|
||||
systemd_service_config_overrides: {}
|
||||
|
@ -1,5 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Create a systemd unit file for ServiceX
|
||||
hosts: localhost
|
||||
become: true
|
||||
@ -13,7 +12,7 @@
|
||||
After: network-online.target
|
||||
Wants: network-online.target
|
||||
Service:
|
||||
RemainAfterExit: yes
|
||||
RemainAfterExit: true
|
||||
service_type: oneshot
|
||||
execstarts:
|
||||
- "/bin/bash -c 'echo start1'"
|
||||
@ -21,7 +20,7 @@
|
||||
execstops:
|
||||
- "/bin/bash -c 'echo stop1'"
|
||||
- "/bin/bash -c 'echo stop2'"
|
||||
enabled: yes
|
||||
enabled: true
|
||||
state: started
|
||||
systemd_tempd_prefix: openstack
|
||||
systemd_lock_path: /var/lock/networking
|
||||
|
@ -17,7 +17,7 @@
|
||||
include_tasks: handlers/socket_restart.yml
|
||||
listen: systemd socket changed
|
||||
when:
|
||||
- 'socket_results is changed'
|
||||
- "socket_results is changed"
|
||||
loop: "{{ systemd_socket.results }}"
|
||||
loop_control:
|
||||
loop_var: socket_results
|
||||
@ -28,7 +28,6 @@
|
||||
tags:
|
||||
- systemd-service
|
||||
|
||||
|
||||
- name: Restart changed services
|
||||
include_tasks: handlers/systemd_restart.yml
|
||||
vars:
|
||||
@ -42,10 +41,10 @@
|
||||
tags:
|
||||
- systemd-service
|
||||
when:
|
||||
- 'services_results.item.restart_changed | default(systemd_service_restart_changed) | bool'
|
||||
- 'services_results.item.state is not defined'
|
||||
- 'services_results.item.enabled | default(systemd_service_enabled) | bool'
|
||||
- 'services_results is changed'
|
||||
- services_results.item.restart_changed | default(systemd_service_restart_changed) | bool
|
||||
- services_results.item.state is not defined
|
||||
- services_results.item.enabled | default(systemd_service_enabled) | bool
|
||||
- services_results is changed
|
||||
loop: "{{ systemd_services_result.results }}"
|
||||
loop_control:
|
||||
loop_var: services_results
|
||||
|
@ -162,7 +162,7 @@
|
||||
|
||||
- name: Reload systemd on unit change
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
daemon_reload: true
|
||||
when:
|
||||
- (systemd_services_result is changed) or
|
||||
(systemd_timer_result is changed) or
|
||||
|
Loading…
x
Reference in New Issue
Block a user