The frequency adaptive repetitive controller (FARC) can offer high control accuracy for grid-connected inverters (GCIs) in the presence of grid voltage distortions and frequency variations. The conventional design guidelines for FARC are primarily based on the system's closed-loop transfer function, which is only able to assess the internal stability of GCIs. However, their external stability is uncertain in complex grid impedance conditions, such as a weak inductive grid, a capacitive grid, or a grid comprising multiple inverters. The frequency-domain passivity theory offers a sufficient stability condition for GCIs operated in complex grid impedance conditions and has been widely recognized and applied in the control design. This article establishes an optimization problem with constraints of internal stability condition, passivity compliance, and grid frequency variation for FARC-controlled LCL -type GCIs involving inverter-side or grid-side current control modes. By solving the established optimization problem, the system can fulfill a full-frequency passive output admittance, simultaneously achieving sufficient stability condition and high control accuracy regardless of grid voltage distortions, impedance and frequency variations. Finally, theoretical findings are verified by experimental results from a laboratory prototype.