0

My org has a monolithic ansible repository that we manually run from an engineer's machine. We do not have an ansible server.

I want to re-use an ansible role that can be installed using galaxy. However, since we don't have an ansible server, I need to integrate this role into our versioned repo so that it can be run by anyone on any machine.

Do I just start copying the directory structure of this locally-installed ansible role into the root of our ansible project?

liltitus27
  • 1,530
  • 4
  • 28
  • 39
  • 1
    Have a look at [this answer](https://stackoverflow.com/questions/55773505/where-to-place-requirements-yml-for-ansible-and-use-it-to-resolve-dependencies/55774721#55774721) dealing with how to write and where to place a roles requirements file. Duplicating the role in your own VCS is the worse solution. – Zeitounator Sep 10 '19 at 15:25

1 Answers1

0

Not sure what sort of repo solution you use, but Ansible Galaxy can be used with private GitHub. For example:

- src: "git+ssh://git@github.example.com/org/my-ansible-role.git"
  name: __remote_role
  version: 0.0.1

You can change the ssh protocol to https, but might require some git config on your machine.

Tony Wu
  • 21
  • 1