-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Description
SUMMARY
Using ansible.controller.inventory_source against Satellite 6 the resulting host_filter is incorrectly quoted.
When using ansible.controller.inventory_source against Satellite 6 the resulting host_filter is incorrectly quoted.
For example:
ansible.controller.inventory_source:
credential: "My Satellite"
overwrite: True
update_on_launch: True
organization: "{{ org }}"
source: satellite6
source_vars:
group_prefix: satellite6_
host_filters: >-
organization="My Org" and
(hostgroup_title="hg-683/rhel8/remote" or
hostgroup_title="hg-683/rhel8/local" or
hostgroup_title="hg-683/rhel9/remote" or
hostgroup_title="hg-683/rhel9/local")
Results in
{
"group_prefix": "satellite6_",
"host_filters": "organization=\"My Org\" and (hostgroup_title=\"hg-683/rhel8/remote\" or hostgroup_title=\"hg-683/rhel8/local\" or hostgroup_title=\"hg-683/rhel9/remote\" or hostgroup_title=\"hg-683/rhel9/local\")",
}
But should be
{
"group_prefix": "satellite6_",
"host_filters": organization="My Org" and (hostgroup_title="hg-683/rhel8/remote" or hostgroup_title="hg-683/rhel8/local" or hostgroup_title="hg-683/rhel9/remote" or hostgroup_title="hg-683/rhel9/local"),
}
ISSUE TYPE
- Bug Report
ANSIBLE VERSION
AAP 2.4
Ansible Core 2.14
##### COLLECTION VERSION
ansible.controller 4.5.15
STEPS TO REPRODUCE
ansible.controller.inventory_source:
credential: "My Satellite"
overwrite: True
update_on_launch: True
organization: "{{ org }}"
source: satellite6
source_vars:
group_prefix: satellite6_
host_filters: >-
organization="My Org" and
(hostgroup_title="hg-683/rhel8/remote" or
hostgroup_title="hg-683/rhel8/local" or
hostgroup_title="hg-683/rhel9/remote" or
hostgroup_title="hg-683/rhel9/local")
##### EXPECTED RESULTS:
~~~
{
"group_prefix": "satellite6_",
"host_filters": organization="My Org" and (hostgroup_title="hg-683/rhel8/remote" or hostgroup_title="hg-683/rhel8/local" or hostgroup_title="hg-683/rhel9/remote" or hostgroup_title="hg-683/rhel9/local"),
}
~~~
##### ACTUAL RESULTS:
~~~
{
"group_prefix": "satellite6_",
"host_filters": "organization=\"My Org\" and (hostgroup_title=\"hg-683/rhel8/remote\" or hostgroup_title=\"hg-683/rhel8/local\" or hostgroup_title=\"hg-683/rhel9/remote\" or hostgroup_title=\"hg-683/rhel9/local\")",
}
~~~
Metadata
Metadata
Assignees
Labels
No labels