Salt grains added as list

I am trying to add a grain to a server via CLI but the key is created as a list instead of a single value. I tried both grains.append and grains.set/grains.setval . The result is always either the grain is added as a list, which is not desired or that the value is not shown in the Foreman UI (but visible when querying via salt cmdlet).

Value not displayed:

Value createad as list:

But on the CLI I can see that the command was successful:

support@server0141:~$ sudo salt 'server0142*' grains.delval expire destructive=True

support@server0141:~$ sudo salt 'server0142*' grains.setval expire 2019-07-31
support@server0141:~$ sudo salt 'server0142*' saltutil.sync_grains
support@server0141:~$ sudo salt 'server0142*' grains.get expire

And if I use grains.append instead, it creates list grains:

$ sudo salt 'server0142*' grains.append expire 2019-07-31

Expected outcome:

I expect that after running grains.set (+ sync grains if necessary) I can see the new grain in the Facts window in Foreman web UI, like below:

Foreman and Proxy versions:

Foreman and Proxy plugin versions:


salt-common/unknown,unknown,now 2018.3.2+ds-1 all [installed,automatic]
salt-master/unknown,unknown,now 2018.3.2+ds-1 all [installed]
ruby-foreman-salt/plugins,plugins,now 10.1.0-1 all [installed]

Salt-Minion version:

salt-common/unknown,unknown,now 2018.3.2+ds-1 all [installed,automatic]
salt-minion/unknown,unknown,now 2018.3.2+ds-1 all [installed]

Other relevant data:
There is some communication between the salt-proxy and Foreman instance, as I can see in the log that the facts are updated. Indeed, I can delete and read grains without a problem - it’s how they appear in Foreman that is confusing me.

2018-11-07T06:39:07 [I|app|922bd] Import facts for '' completed. Added: 0, Updated: 23, Deleted 0 facts