ansible-lint: Fix jinja[spacing]
We need to use noqa for gather_facts_delegated_delegate_hosts because of the Python array syntax. Change-Id: Id2f298d22bc0f0031aded62bb1fb69dd08d64245
This commit is contained in:
@@ -28,7 +28,6 @@ skip_list:
|
|||||||
- command-instead-of-module
|
- command-instead-of-module
|
||||||
- command-instead-of-shell
|
- command-instead-of-shell
|
||||||
- deprecated-local-action
|
- deprecated-local-action
|
||||||
- jinja[spacing]
|
|
||||||
- key-order[task]
|
- key-order[task]
|
||||||
- name[play]
|
- name[play]
|
||||||
- risky-file-permissions
|
- risky-file-permissions
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
baremetal_nodes: >-
|
baremetal_nodes: >-
|
||||||
{{ query('inventory_hostnames', console_compute_node_limit |
|
{{ query('inventory_hostnames', console_compute_node_limit |
|
||||||
default('baremetal-compute') ) | unique }}
|
default('baremetal-compute')) | unique }}
|
||||||
|
|
||||||
- name: Reserve TCP ports for ironic serial consoles
|
- name: Reserve TCP ports for ironic serial consoles
|
||||||
include_role:
|
include_role:
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
vars:
|
vars:
|
||||||
matching_nodes: >-
|
matching_nodes: >-
|
||||||
{{ (nodes.stdout | from_json) | selectattr('Name', 'defined') |
|
{{ (nodes.stdout | from_json) | selectattr('Name', 'defined') |
|
||||||
selectattr('Name', 'equalto', inventory_hostname ) | list }}
|
selectattr('Name', 'equalto', inventory_hostname) | list }}
|
||||||
node: "{{ matching_nodes | first }}"
|
node: "{{ matching_nodes | first }}"
|
||||||
when:
|
when:
|
||||||
- cmd == "enable"
|
- cmd == "enable"
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
vars:
|
vars:
|
||||||
matching_nodes: >-
|
matching_nodes: >-
|
||||||
{{ (nodes.stdout | from_json) | selectattr('Name', 'defined') |
|
{{ (nodes.stdout | from_json) | selectattr('Name', 'defined') |
|
||||||
selectattr('Name', 'equalto', inventory_hostname ) | list }}
|
selectattr('Name', 'equalto', inventory_hostname) | list }}
|
||||||
node: "{{ matching_nodes | first }}"
|
node: "{{ matching_nodes | first }}"
|
||||||
when:
|
when:
|
||||||
- cmd == "disable"
|
- cmd == "disable"
|
||||||
|
@@ -3,28 +3,28 @@
|
|||||||
yum_repository:
|
yum_repository:
|
||||||
name: "{{ item.key }}"
|
name: "{{ item.key }}"
|
||||||
description: "{% if 'description' in item.value %}{{ item.value.description }}{% else %}{{ item.key }} repository{% endif %}"
|
description: "{% if 'description' in item.value %}{{ item.value.description }}{% else %}{{ item.key }} repository{% endif %}"
|
||||||
baseurl: "{{ item.value.baseurl | default(omit)}}"
|
baseurl: "{{ item.value.baseurl | default(omit) }}"
|
||||||
file: "{{ item.value.file | default(omit)}}"
|
file: "{{ item.value.file | default(omit) }}"
|
||||||
gpgkey: "{{ item.value.gpgkey | default(omit)}}"
|
gpgkey: "{{ item.value.gpgkey | default(omit) }}"
|
||||||
gpgcheck: "{{ item.value.gpgcheck | default(omit)}}"
|
gpgcheck: "{{ item.value.gpgcheck | default(omit) }}"
|
||||||
cost: "{{ item.value.cost | default(omit)}}"
|
cost: "{{ item.value.cost | default(omit) }}"
|
||||||
enabled: "{{ item.value.enabled | default(omit)}}"
|
enabled: "{{ item.value.enabled | default(omit) }}"
|
||||||
exclude: "{{ item.value.exclude | default(omit)}}"
|
exclude: "{{ item.value.exclude | default(omit) }}"
|
||||||
gpgcakey: "{{ item.value.gpgcakey | default(omit)}}"
|
gpgcakey: "{{ item.value.gpgcakey | default(omit) }}"
|
||||||
includepkgs: "{{ item.value.includepkgs | default(omit)}}"
|
includepkgs: "{{ item.value.includepkgs | default(omit) }}"
|
||||||
metadata_expire: "{{ item.value.metadata_expire | default(omit)}}"
|
metadata_expire: "{{ item.value.metadata_expire | default(omit) }}"
|
||||||
metalink: "{{ item.value.metalink | default(omit)}}"
|
metalink: "{{ item.value.metalink | default(omit) }}"
|
||||||
mirrorlist: "{{ item.value.mirrorlist | default(omit)}}"
|
mirrorlist: "{{ item.value.mirrorlist | default(omit) }}"
|
||||||
mirrorlist_expire: "{{ item.value.mirrorlist_expire | default(omit)}}"
|
mirrorlist_expire: "{{ item.value.mirrorlist_expire | default(omit) }}"
|
||||||
password: "{{ item.value.password | default(omit) }}"
|
password: "{{ item.value.password | default(omit) }}"
|
||||||
priority: "{{ item.value.priority | default(omit)}}"
|
priority: "{{ item.value.priority | default(omit) }}"
|
||||||
proxy: "{{ item.value.proxy | default(omit)}}"
|
proxy: "{{ item.value.proxy | default(omit) }}"
|
||||||
proxy_password: "{{ item.value.proxy_password | default(omit)}}"
|
proxy_password: "{{ item.value.proxy_password | default(omit) }}"
|
||||||
proxy_username: "{{ item.value.proxy_username | default(omit)}}"
|
proxy_username: "{{ item.value.proxy_username | default(omit) }}"
|
||||||
repo_gpgcheck: "{{ item.value.repo_gpgcheck | default(omit)}}"
|
repo_gpgcheck: "{{ item.value.repo_gpgcheck | default(omit) }}"
|
||||||
sslverify: "{{ item.value.sslverify | default(omit)}}"
|
sslverify: "{{ item.value.sslverify | default(omit) }}"
|
||||||
username: "{{ item.value.username | default(omit) }}"
|
username: "{{ item.value.username | default(omit) }}"
|
||||||
state: "{{ item.value.state | default(omit)}}"
|
state: "{{ item.value.state | default(omit) }}"
|
||||||
with_dict: "{{ dnf_custom_repos }}"
|
with_dict: "{{ dnf_custom_repos }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.key }}"
|
label: "{{ item.key }}"
|
||||||
|
@@ -4,5 +4,4 @@ gather_facts_delegated_batch_index: "{{ ansible_play_batch.index(inventory_hostn
|
|||||||
gather_facts_delegated_batch_count: "{{ ansible_play_batch | length }}"
|
gather_facts_delegated_batch_count: "{{ ansible_play_batch | length }}"
|
||||||
# Use a python list slice to divide the group up.
|
# Use a python list slice to divide the group up.
|
||||||
# Syntax: [<start index>:<end index>:<step size>]
|
# Syntax: [<start index>:<end index>:<step size>]
|
||||||
gather_facts_delegated_delegate_hosts: >-
|
gather_facts_delegated_delegate_hosts: "{{ gather_facts_delegated_limit_hosts[gather_facts_delegated_batch_index | int::gather_facts_delegated_batch_count | int] }}" # noqa jinja[spacing]
|
||||||
{{ gather_facts_delegated_limit_hosts[gather_facts_delegated_batch_index | int::gather_facts_delegated_batch_count | int] }}
|
|
||||||
|
@@ -23,9 +23,9 @@
|
|||||||
- name: Change system scope to all for Ironic operations
|
- name: Change system scope to all for Ironic operations
|
||||||
set_fact:
|
set_fact:
|
||||||
ipa_images_ironic_openstack_auth_env: "{{ ipa_images_openstack_auth_env |
|
ipa_images_ironic_openstack_auth_env: "{{ ipa_images_openstack_auth_env |
|
||||||
combine ({ 'OS_PROJECT_NAME': omit }) |
|
combine({'OS_PROJECT_NAME': omit}) |
|
||||||
combine ({ 'OS_PROJECT_DOMAIN_NAME': omit }) |
|
combine({'OS_PROJECT_DOMAIN_NAME': omit}) |
|
||||||
combine ({ 'OS_SYSTEM_SCOPE': 'all' }) }}"
|
combine({'OS_SYSTEM_SCOPE': 'all'}) }}"
|
||||||
|
|
||||||
- name: Get a list of ironic nodes
|
- name: Get a list of ironic nodes
|
||||||
command: |
|
command: |
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
local_action:
|
local_action:
|
||||||
module: command ssh-keyscan {{ item }}
|
module: command ssh-keyscan {{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ ansible_host|default(inventory_hostname) }}"
|
- "{{ ansible_host | default(inventory_hostname) }}"
|
||||||
register: keyscan_result
|
register: keyscan_result
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user