The main challenge in the maintenance planing lies in the realistic modeling of the maintenance policy. However, the complexity of the industrial systems makes difficult the achievement of this prospect. To face the realistic constraints, the present paper provides an approach for the maintenance planning of utility systems on the basis of opportunistic maintenance policy and Bayesian theory. The reliability assessment, which can be updated according to the evolution of the environmental conditions using the Bayesian theory, is integrated in the maintenance model, in order to evaluate the optimal preventive maintenance times and to update them when new degradation data become available. The opportunistic replacement is used to take benefit from the non-operating state of some components, caused by the maintenance action on other components, in order to replace them opportunistically. The effectiveness of the proposed approach is illustrated through a numerical application on operating gas supply system.