Assume a production/staging/dev multistage environment project using ansible best practices layout. Another custom project A in a separate git repo. The project build produces an artifact that is deployed to a host at each stage . I don’t want to duplicate the inventory files/ group vars from ansible provision project to → project A. Project A has specific properties as well as global properties from infrastructure project. What is the best approach to handle this use case?
The other custom project can include ansible if needed, but it does not have ansible at the moment. it uses maven lifecycle to build & release artifacts. Typical CI system - github change → build → deploy snapshot. or triggered by user release build which will call maven release lifecycle. Basically how can these projects be linked to general infrastructure projects. Thanks
In general what approaches do you guys use to combine infrastructure inventories/vars with other projects so they can use system level properties as needed. Coming from puppet we typically had a project repo with a provisioning repo. the provisioning repo inherited from a base infrastructure init.pp. What is a good way to do something similar to this in ansible? e.g.
inventories are tied to environments (staging / production / development). group vars can be used to group variables per environment. “all” can be used for all properties not included in a given group. This makes sense, but i would like to reuse this setup for other projects to use vars from this setup — Single place for all variables partitioned prod/dev/stage and inherited by other projects.