Adding Dictionary as sub-key

master-1# salt 'minion-1' grains.set apache:modules

minion-1:

    ----------

    changes:

        ----------

        apache:

            ----------

            modules:

    comment:

    result:

        True

Appending a list to a dictionary-sub-key

[root@master-1 /]# salt 'minion-1' grains.append apache:modules php convert=true

minion-1:

    ----------

    apache:

        ----------

        modules:

            - php


Removing Dictionary sub-key from grains

[root@master-1 /]# salt 'minion-1' grains.delkey apache modules

minion-1:

    ----------

    changes:

        ----------

        apache:

            None

    comment:

    result:

        True

Removing a value from grains

[root@master-1 /]# salt 'minion-1' grains.delval apache:modules

minion-1:

    ----------

    changes:

        ----------

        apache:

            ----------

            modules:

                None

    comment:

    result:

        True

Removing key from grains including sub-keys

[root@master-1 /]# salt 'minion-1' grains.item apache

minion-1:

    ----------

    apache:

        ----------

        modules:

            None


[root@master-1 /]# salt 'minion-1' grains.delkey apache force=true

minion-1:

    ----------

    changes:

        ----------

        apache:

            None

    comment:

    result:

        True