{"id":14056,"date":"2025-05-12T11:06:51","date_gmt":"2025-05-12T08:06:51","guid":{"rendered":"https:\/\/www.inetmar.com\/blog\/?p=14056"},"modified":"2025-05-12T12:06:48","modified_gmt":"2025-05-12T09:06:48","slug":"ansible-nedir-ne-ise-yarar","status":"publish","type":"post","link":"https:\/\/www.inetmar.com\/blog\/ansible-nedir-ne-ise-yarar\/","title":{"rendered":"Ansible Nedir? Ne \u0130\u015fe Yarar?"},"content":{"rendered":"<p>G\u00fcn\u00fcm\u00fcz sistem y\u00f6neticilerinin ve DevOps m\u00fchendislerinin kar\u015f\u0131la\u015ft\u0131\u011f\u0131 en b\u00fcy\u00fck zorluklardan biri, onlarca hatta y\u00fczlerce sunucuyu manuel olarak y\u00f6netmenin getirdi\u011fi karma\u015fa ve zaman kayb\u0131d\u0131r. Tam da bu noktada devreye <strong>Ansible<\/strong> girer.<\/p>\n<h2>Ansible Nedir?<\/h2>\n<p>Ansible a\u00e7\u0131k kaynak kodlu ve Python tabanl\u0131 bir <strong>otomasyon arac\u0131d\u0131r<\/strong>. Red Hat taraf\u0131ndan desteklenen bu ara\u00e7, <a href=\"https:\/\/www.inetmar.com\/sunucu\/\" target=\"_blank\" rel=\"noopener\">sunucu<\/a> yap\u0131land\u0131rmalar\u0131n\u0131, yaz\u0131l\u0131m kurulumlar\u0131n\u0131 ve g\u00f6rev otomasyonunu kolayla\u015ft\u0131rmak i\u00e7in geli\u015ftirilmi\u015ftir. Kullan\u0131m\u0131 olduk\u00e7a basittir ve <strong>agent gerektirmez<\/strong>, yani y\u00f6netmek istedi\u011finiz sunuculara ekstra bir yaz\u0131l\u0131m kurman\u0131z gerekmez. Sadece SSH eri\u015fimi yeterlidir.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14059 aligncenter\" src=\"https:\/\/www.inetmar.com\/blog\/wp-content\/uploads\/2025\/05\/ansible-300x200.png\" alt=\"ansible\" width=\"713\" height=\"475\" srcset=\"https:\/\/www.inetmar.com\/blog\/wp-content\/uploads\/2025\/05\/ansible-300x200.png 300w, https:\/\/www.inetmar.com\/blog\/wp-content\/uploads\/2025\/05\/ansible-1024x683.png 1024w, https:\/\/www.inetmar.com\/blog\/wp-content\/uploads\/2025\/05\/ansible-768x512.png 768w, https:\/\/www.inetmar.com\/blog\/wp-content\/uploads\/2025\/05\/ansible.png 1536w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/p>\n<h2>Ansible Ne \u0130\u015fe Yarar?<\/h2>\n<p>Ansible ile bir\u00e7ok i\u015flemi h\u0131zl\u0131 ve hatas\u0131z \u015fekilde ger\u00e7ekle\u015ftirebilirsiniz. \u00d6rne\u011fin:<\/p>\n<ul>\n<li>Yeni bir web sunucusu kurmak,<\/li>\n<li>Veritaban\u0131 ayarlar\u0131n\u0131 yap\u0131land\u0131rmak,<\/li>\n<li>G\u00fcvenlik g\u00fcncellemelerini otomatik olarak da\u011f\u0131tmak,<\/li>\n<li>Y\u00fczlerce sunucuda ayn\u0131 i\u015flemi senkron \u015fekilde uygulamak,<\/li>\n<li>Yedekleme, servis y\u00f6netimi, kullan\u0131c\u0131 olu\u015fturma gibi g\u00f6revleri <strong>Ansible ile otomasyon<\/strong> \u015feklinde ger\u00e7ekle\u015ftirmek.<\/li>\n<\/ul>\n<h2>Ansible Kurulumu (Detayl\u0131)<\/h2>\n<h3>Ubuntu \/ Debian \u0130\u00e7in<\/h3>\n<pre><code>\r\napt update &amp;&amp; apt upgrade -y\r\napt install software-properties-common -y\r\nadd-apt-repository --yes --update ppa:ansible\/ansible\r\napt install ansible -y\r\nansible --version\r\n  <\/code><\/pre>\n<h3>CentOS \/ RHEL \u0130\u00e7in<\/h3>\n<pre><code>\r\nyum install epel-release -y   # CentOS 7\r\ndnf install epel-release -y   # CentOS 8 \/ RHEL 8+\r\nyum install ansible -y\r\nansible --version\r\n  <\/code><\/pre>\n<h3>SSH Anahtar\u0131yla Eri\u015fim<\/h3>\n<pre><code>\r\nssh-keygen\r\nssh-copy-id root@192.168.1.101\r\n  <\/code><\/pre>\n<h3>\u00d6rnek Envanter Dosyas\u0131<\/h3>\n<pre><code>\r\n[websunuculari]\r\n192.168.1.101\r\n192.168.1.102\r\n\r\n[veritabani]\r\n192.168.1.200\r\n  <\/code><\/pre>\n<h2>Ansible Playbook \u00d6rne\u011fi<\/h2>\n<p>YAML format\u0131nda yaz\u0131lan playbook&#8217;lar, i\u015flemlerin hangi s\u0131rayla ve nas\u0131l yap\u0131laca\u011f\u0131n\u0131 belirler. \u00d6rnek bir Apache kurulumu playbook&#8217;u:<\/p>\n<pre><code>\r\n- name: Apache Kurulumu\r\n  hosts: websunuculari\r\n  become: yes\r\n  tasks:\r\n    - name: Apache paketini kur\r\n      apt:\r\n        name: apache2\r\n        state: present\r\n\r\n    - name: Apache servisini ba\u015flat\r\n      service:\r\n        name: apache2\r\n        state: started\r\n        enabled: yes\r\n  <\/code><\/pre>\n<h2>Linux Yap\u0131land\u0131rma Y\u00f6netimi<\/h2>\n<p><strong>Linux yap\u0131land\u0131rma y\u00f6netimi<\/strong> i\u00e7in Ansible, en pratik \u00e7\u00f6z\u00fcmlerden biridir. Kullan\u0131c\u0131 olu\u015fturma, servis y\u00f6netimi, firewall ayarlar\u0131 gibi i\u015flemleri tek komutla halledebilirsiniz. Tekrarlanabilir, g\u00fcvenli ve takip edilebilir bir altyap\u0131 sa\u011flar.<\/p>\n<h2>Ansible Avantajlar\u0131<\/h2>\n<ul>\n<li><strong>Basit<\/strong> ve \u00f6\u011frenmesi kolay.<\/li>\n<li><strong>Agent gerektirmez<\/strong>, yaln\u0131zca SSH yeterlidir.<\/li>\n<li><strong>YAML<\/strong> ile kolay okunabilir yap\u0131.<\/li>\n<li><strong>\u0130dempotent<\/strong> \u2013 ayn\u0131 i\u015flem tekrarland\u0131\u011f\u0131nda zarar vermez.<\/li>\n<li>Geni\u015f <strong>topluluk deste\u011fi<\/strong> ve mod\u00fcl zenginli\u011fi.<\/li>\n<\/ul>\n<h2>DevOps Ara\u00e7lar\u0131 Aras\u0131nda Ansible<\/h2>\n<p><strong>DevOps ara\u00e7lar\u0131<\/strong> i\u00e7inde Ansible, Puppet, Chef ve SaltStack gibi rakiplerine k\u0131yasla \u00e7ok daha h\u0131zl\u0131 kurulabilir, \u00f6\u011frenilmesi kolayd\u0131r. Hem bireysel kullan\u0131c\u0131lar hem de b\u00fcy\u00fck ekipler i\u00e7in g\u00fc\u00e7l\u00fc bir alternatiftir.<\/p>\n<p><strong>Ansible nedir<\/strong> sorusuna \u00f6zetle; i\u015fleri otomatikle\u015ftiren, h\u0131zl\u0131, g\u00fcvenli ve hatas\u0131z sistem y\u00f6netimi sa\u011flayan bir ara\u00e7 cevab\u0131n\u0131 verebiliriz. <strong>Ansible ile otomasyon<\/strong> sayesinde zaman kazan\u0131r, insan hatalar\u0131n\u0131 minimize eder ve sistemlerinizi profesyonelce y\u00f6netebilirsiniz.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>G\u00fcn\u00fcm\u00fcz sistem y\u00f6neticilerinin ve DevOps m\u00fchendislerinin kar\u015f\u0131la\u015ft\u0131\u011f\u0131 en b\u00fcy\u00fck zorluklardan biri, onlarca hatta y\u00fczlerce sunucuyu manuel olarak y\u00f6netmenin getirdi\u011fi karma\u015fa ve zaman kayb\u0131d\u0131r. Tam da bu noktada devreye Ansible girer. Ansible Nedir? Ansible a\u00e7\u0131k kaynak&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":14061,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[],"class_list":["post-14056","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sunucu"],"_links":{"self":[{"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/posts\/14056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/comments?post=14056"}],"version-history":[{"count":4,"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/posts\/14056\/revisions"}],"predecessor-version":[{"id":14062,"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/posts\/14056\/revisions\/14062"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/media\/14061"}],"wp:attachment":[{"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/media?parent=14056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/categories?post=14056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inetmar.com\/blog\/wp-json\/wp\/v2\/tags?post=14056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}