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