Вопрос

i am just leaning ansible and so far i was able to ping the servers.

My main aim now is to install following modules like apache , git and if its already installed then should should not do anything.

I am not able to find how can i start with that

Это было полезно?

Решение

Use the packaging modules. For example:

# Install the package "foo"
- apt: pkg=foo state=present

As to "if its already installed", all ansible packages are idempotent and (whenever possible) do not re-do work that is already done.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top