def METHOD_NAME(domain, master):
    """
    Save the certificate for master icinga2 node.
    Returns::
        icinga2 pki save-cert --key /etc/icinga2/pki/domain.tld.key --cert /etc/icinga2/pki/domain.tld.crt --trustedcert /etc/icinga2/pki/trusted-master.crt --host master.domain.tld
    CLI Example:
    .. code-block:: bash
        salt '*' icinga2.save_cert domain.tld master.domain.tld
    """
    result = __salt__["cmd.run_all"](
        [
            "icinga2",
            "pki",
            "save-cert",
            "--key",
            "{}{}.key".format(get_certs_path(), domain),
            "--cert",
            "{}{}.cert".format(get_certs_path(), domain),
            "--trustedcert",
            "{}trusted-master.crt".format(get_certs_path()),
            "--host",
            master,
        ],
        python_shell=False,
    )
    return result