In the framework of the theory of open systems based on completely positive quantum dynamical semigroups, we study the continuous variable entanglement for a system consisting of two independent harmonic oscillators interacting with a general environment. We solve the Kossakowski-Lindblad master equation for the time evolution of the considered system and describe the entanglement in terms of the covariance matrix for an arbitrary Gaussian input state. Using Peres-Simon necessary and sufficient criterion for separability of two-mode Gaussian states, we show that for certain values of diffusion and dissipation coefficients describing the environment, the state keeps for all times its initial type: separable or entangled. In other cases, entanglement generation, entanglement sudden death or a periodic collapse and revival of entanglement take place. We analyze also the time evolution of the logarithmic negativity, which characterizes the degree of entanglement of the quantum state.