You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using controller_inventoriesvariables with a config block with multiple spaces, the spaces are collapsed to single spaces.
Issue Type
Bug Report
Ansible, Collection, Controller details
ansible --versioncore 2.15.11ansible-galaxy collection listinfra.controller_configuration:2.8.1Controller version: installed from 2.4.7 bundle.
ansible installation method: one of source, pip, OS package, EE
OS / ENVIRONMENT
Desired Behavior
Actual Behavior
Please give some details of what is actually happening.
Include a [minimum complete verifiable example] with:
playbook / task
configuration file / list
error
controller_inventories:
- name: helix_test
organization: Infrastructure_Services
variables:
ansible_connection: ssh
ansible_user: ansible
ansible_become_user: root
managed_ansible: |
#######################################
## DO NOT EDIT! ##
## This file is managed by Ansible ##
## DO NOT EDIT! ##
#######################################
motd_template: doublehelix
This turns up in the inventory in the gui as:
managed_ansible: |
#######################################
##DO NOT EDIT!##
## This file is managed by Ansible##
##DO NOT EDIT!##
#######################################
I have checked the source for tabs or any odd control characters; its just spaces and ASCII codes.
$ cat a
---
controller_inventories:
- name: helix_test
variables:
managed_ansible: |
#######################################
## DO NOT EDIT! ##
## This file is managed by Ansible ##
## DO NOT EDIT! ##
#######################################
$ od -a a
0000000 - - - nl c o n t r o l l e r _ i
0000020 n v e n t o r i e s : nl sp sp - sp
0000040 n a m e : sp h e l i x _ t e s t
0000060 nl sp sp sp sp v a r i a b l e s : nl
0000100 sp sp sp sp sp sp m a n a g e d _ a n
0000120 s i b l e : sp | nl sp sp sp sp sp sp sp
0000140 sp # # # # # # # # # # # # # # #
0000160 # # # # # # # # # # # # # # # #
0000200 # # # # # # # # nl sp sp sp sp sp sp sp
0000220 sp # # sp sp sp sp sp sp sp sp sp sp sp sp D
0000240 O sp N O T sp E D I T ! sp sp sp sp sp
0000260 sp sp sp sp sp sp # # nl sp sp sp sp sp sp sp
0000300 sp # # sp T h i s sp f i l e sp i s
0000320 sp m a n a g e d sp b y sp A n s i
0000340 b l e sp sp sp # # nl sp sp sp sp sp sp sp
0000360 sp # # sp sp sp sp sp sp sp sp sp sp sp sp D
0000400 O sp N O T sp E D I T ! sp sp sp sp sp
0000420 sp sp sp sp sp sp # # nl sp sp sp sp sp sp sp
0000440 sp # # # # # # # # # # # # # # #
0000460 # # # # # # # # # # # # # # # #
0000500 # # # # # # # # nl
0000511
STEPS TO REPRODUCE
$ cat controller_automator_dev.yml
---
- name: Add objects to Automation Controllerhosts: controller_devconnection: localroles:
- infra.controller_configuration.dispatch$ cat base_config/host_vars/controller_dev/inventories.yml
---
controller_inventories:
- name: helix_testorganization: Demovariables:
managed_ansible: | ####################################### ## DO NOT EDIT! ## ## This file is managed by Ansible ## ## DO NOT EDIT! ## #######################################ansible_connection: ssh$ ansible-playbook controller_automator_dev.yml -i base_config
The text was updated successfully, but these errors were encountered:
This section of the readme explains why we strip spaces. I'll see if I can do something more clever with this
Formating Variables
Variables can use a standard Jinja templating format to describe the resource.
Example:
{{ variable }}
Because of this it is difficult to provide controller with the required format for these fields.
The workaround is to use the following format:
{ { variable }}
The role will strip the double space between the curly bracket in order to provide controller with the correct format for the Variables.
Summary
When using
controller_inventories
variables
with a config block with multiple spaces, the spaces are collapsed to single spaces.Issue Type
Ansible, Collection, Controller details
OS / ENVIRONMENT
Desired Behavior
Actual Behavior
Please give some details of what is actually happening.
Include a [minimum complete verifiable example] with:
This turns up in the inventory in the gui as:
I have checked the source for tabs or any odd control characters; its just spaces and ASCII codes.
STEPS TO REPRODUCE
The text was updated successfully, but these errors were encountered: