> For the complete documentation index, see [llms.txt](https://devops.1w2.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devops.1w2.net/ansible/componentler.md).

# Componentler

* Control Node

<figure><img src="/files/GHevuw5cuNJjQkRybM9M" alt=""><figcaption></figcaption></figure>

Ansible 'in yüklü olduğu herhangi bir sunucudur. Control node üzerinde, ansible playbook'ları, ya da ad-hoc komutlarını çalıştırabiliriz. Bir Windows cihazı, control node olarak kullanabiliriz. Birden fazla Control node olabilir. Linux olması daha güzel olur :)&#x20;

* Manage Node

Ansible ile yönettiğimiz sunucu(lar) ağı. Manage node'lara host ismi verebiliriz. Windows cihazı manage node olarak kullanabiliriz. Ansible manage node'lara kurulmuş olması gerekmez.

* Inventory

Manage node'ların listelendiği envanterdir. Aslında inventory dediğimiz şey bir <mark style="color:red;">**dosyadır.**</mark> <mark style="color:red;"></mark> Manage node bilgileri, isimleri, IP adresleri, Connection modu, Connection user 'ı, Connection şifresi gibi spesifik bilgiler inventory dosyası içerisinde bulunabilir. Node'ları istersek tek tek, istersek grup halinde ekleyip düzenleyebiliriz.

Inventory Örnek 1&#x20;

```
/etc/ansible/hosts

mail.1w2.net

[webservers]
webserver1.1w2.net
appserver1.1w2.net

[dbservers]
oracle.1w2.net
mysql2.1w2.net
mysql3.1w2.net
```

Inventory Örnek 2

```
# /etc/ansible/hosts

all:
  hosts:
    mail.1w2.net:
  children:
    webservers:
      hosts:
        webserver1.1w2.net:
        appserver1.1w2.net:
    dbservers:
      hosts:
        oracle.1w2.net:
        mysql2.1w2.net:
        mysql3.1w2.net:
```

* Modules

Ansible 'ın çalıştırdığı kod birimleri, asıl işi yapan komponentlerdir. Her modül belirli bir kullanıma sahiptir. Örneğin, database kullanıcılarını yönetebiliriz, network ayarları yapabiliriz. Bir task ile single modül çağırabiliriz. Yada birden fazla modülü bir araya getirip taskları yada playbookları çağırabiliriz.

{% hint style="info" %}
[Bilmeniz gereken 10 Ansible modülü - İngilizce](https://opensource.com/article/19/9/must-know-ansible-modules)
{% endhint %}

* Task

Ansible 'da yürütülen görevlerdir. Bu tasklar içerisinde yapılması istenilen işler vardır. Ansible 'da her task için, bir modül yer alabilir. Yani bir task bir modül çalıştırabilir. ad-hoc ile de, single task çalıştırarak modülü çalıştırabiliriz.

<figure><img src="/files/D34MSOTBcFOMC6o7Amra" alt=""><figcaption></figcaption></figure>

* Ad-Hoc

Manage node'larda, bir taskı çalıştırmak için kullandığımız komutlardır.

<figure><img src="/files/UyLHCKCMo9Regzrt2NHT" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/CaqlNmXyIVuPtm1DMCYP" alt=""><figcaption></figcaption></figure>

* Playbook

Bir veya birden fazla task 'ın, sıralanmış listeli hali diyebiliriz. Bunları yaml dosyalarına yazarız. Playbook 'lar, yazılan tüm taskları çalıştırmak ile yükümlüdür. Playbook'lar çalıştırılırken, bir task için hata aldığında, playbook'ların çalışması sona erer. Hatanın düzeltilmesi gerekir. Düzeltildikten sonra playbook 'un tekrar çalıştırılması gerekir. Modüller'den, task'ları, task'lardan play'leri, play'lerden, playbook'lar oluşur.

<figure><img src="/files/vkljLcwbWseQRlipnOiV" alt=""><figcaption></figcaption></figure>

* Collection & Role

Plugin, modülleri, rolleri, ve playbook'ları, içeren ansible contentleri için içerik ağı oluşturmak için kullanılır.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://devops.1w2.net/ansible/componentler.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
