# salt.states.zabbix_usermacro

Management of Zabbix usermacros. :codeauthor: Raymond Kuiper <qix@the-wired.net>

salt.states.zabbix_usermacro.absent(name, hostid=None, **kwargs)

  Ensures that the mediatype does not exist, eventually deletes the mediatype.

  Parameters:

    - name -- name of the usermacro

    - hostid -- id's of the hosts to apply the usermacro on, if missing a global usermacro is assumed.

    - _connection_user -- Optional - zabbix user (can also be set in opts or pillar, see module's docstring)

    - _connection_password -- Optional - zabbix password (can also be set in opts or pillar, see module's docstring)

    - _connection_url -- Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)

      delete_usermacro:
          zabbix_usermacro.absent:
              - name: '{$SNMP_COMMUNITY}'

salt.states.zabbix_usermacro.present(name, value, hostid=None, **kwargs)

  Creates a new usermacro.

  Parameters:

    - name -- name of the usermacro

    - value -- value of the usermacro

    - hostid -- id's of the hosts to apply the usermacro on, if missing a global usermacro is assumed.

    - _connection_user -- Optional - zabbix user (can also be set in opts or pillar, see module's docstring)

    - _connection_password -- Optional - zabbix password (can also be set in opts or pillar, see module's docstring)

    - _connection_url -- Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)

      override host usermacro:
          zabbix_usermacro.present:
              - name: '{$SNMP_COMMUNITY}''
              - value: 'public'
              - hostid: 21