When any animal shall be impounded pursu-ant to the provisions of this article, the animal control officer may impose such conditions on the release of such animal as may be necessary, or desirable, in order to avoid, forestall or prevent the reoccurrence of the violation leading to the impoundment of such animal; and no animal shall be redeemed by the owner of the animal or other person except upon an undertaking to comply with all the provisions of this chapter, which may include an undertaking by such person to keep such animal outside the city, an undertaking to pay for any damage done by such animal and any other condition reasonably calculated to protect the public health, safety and general welfare of the citizens of the county.