In this paper we introduce variable exponent local Hardy spaces $$h_L^{p(\cdot )}({\mathbb {R}}^n)$$ associated with a non-negative self-adjoint operator L. We assume that, for every $$t>0$$, the operator $$e^{-tL}$$ has an integral representation whose kernel satisfies a Gaussian upper bound. We define $$h_L^{p(\cdot )}({\mathbb {R}}^n)$$ by using an area square integral involving the semigroup $$\{e^{-tL}\}_{t>0}$$. A molecular characterization of $$h_L^{p(\cdot )}({\mathbb {R}}^n)$$ is established. As an application of the molecular characterization, we prove that $$h_L^{p(\cdot )}({\mathbb {R}}^n)$$ coincides with the (global) Hardy space $$H_L^{p(\cdot )}({\mathbb {R}}^n)$$ provided that 0 does not belong to the spectrum of L. Also, we show that $$h_L^{p(\cdot )}({\mathbb {R}}^n)=H_{L+I}^{p(\cdot )}({\mathbb {R}}^{n})$$.