문제

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