.. versionadded:: 0.17.0 Delete a grain value from the grains config file. This will just set the grain value to ``None``. To completely remove the grain, run ``grains.delkey`` or pass ``destructive=True`` to ``grains.delval``. key The grain key from which to delete th
(key, destructive=False, force=False)
| 449 | |
| 450 | |
| 451 | def delval(key, destructive=False, force=False): |
| 452 | """ |
| 453 | .. versionadded:: 0.17.0 |
| 454 | |
| 455 | Delete a grain value from the grains config file. This will just set the |
| 456 | grain value to ``None``. To completely remove the grain, run ``grains.delkey`` |
| 457 | or pass ``destructive=True`` to ``grains.delval``. |
| 458 | |
| 459 | key |
| 460 | The grain key from which to delete the value. |
| 461 | |
| 462 | destructive |
| 463 | Delete the key, too. Defaults to False. |
| 464 | |
| 465 | force |
| 466 | Force remove the grain even when it is a mapped value. |
| 467 | Defaults to False |
| 468 | |
| 469 | CLI Example: |
| 470 | |
| 471 | .. code-block:: bash |
| 472 | |
| 473 | salt '*' grains.delval key |
| 474 | """ |
| 475 | return set(key, None, destructive=destructive, force=force) |
| 476 | |
| 477 | |
| 478 | def ls(): # pylint: disable=C0103 |