Skip to content

section keys not displayed when values overlap with global defaults #50

@makesse

Description

@makesse

I am trying to manipulate my Ansible hosts.ini files, which looks like this:

host1.example.com
host2.example.com
host3.example.com
host4.example.com

[group1]
host1.example.com
host2.example.com

[group2]
host3.example.com
host4.example.com

When I want to get all hosts (global items), I run the following command:

$ crudini --get hosts.ini ''
host1.example.com
host2.example.com
host3.example.com
host4.example.com

However, when I want to display the hosts in section group1, I do not get any output at all:

$ crudini --get hosts.ini 'group1'
$

If I modify the ini file to look like this:

host1.example.com
host2.example.com
host3.example.com
host4.example.com

[group1]
host1.example.com=1
host2.example.com=1

[group2]
host3.example.com=1
host4.example.com=1

and run the same command again I get the following output:

$ crudini --get hosts.ini 'group1'
host1.example.com
host2.example.com

Is it possible to get identical behavior for the default and the other sections?

I am running crudini-0.9-1.el7.noarch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions