Turkish parliament ratifies motion on Iraq, Syria