i’m just getting started with Ansible, and would appreciate some help on how best to compose functionality with tasks, roles and modules.
i’m thinking of a basic structure that i imagine is somewhat common, where
-
hosts have projects
-
projects have github repos
-
github repos have git module tasks that actually clone the repo
some pseudo code:
some-project
github_repo:
owner: nrser
name: some-project
github_repo
git:
repo: git@github.com:{{ owner }}/{{ name }}
dest: "{{ gh_root }}/{{ owner }}/{{ name }}
how should i accomplish this in Ansible? should some-project
and github_repo
be tasks, roles…?