質問

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