{"id":35473,"date":"2025-11-30T04:40:36","date_gmt":"2025-11-30T01:40:36","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=35473"},"modified":"2025-11-30T04:40:36","modified_gmt":"2025-11-30T01:40:36","slug":"ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/","title":{"rendered":"Ansible Playbook&#8217;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r?"},"content":{"rendered":"<p><body><\/p>\n<h2>Ansible Playbook&#8217;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r?<\/h2>\n<p>Ansible, otomasyon d\u00fcnyas\u0131nda basitli\u011fi, arac\u0131s\u0131z mimarisi ve g\u00fc\u00e7l\u00fc yetenekleriyle \u00f6ne \u00e7\u0131kan bir ara\u00e7t\u0131r. Ancak otomasyon, her zaman d\u00fcz bir yol izlemez; \u00e7o\u011fu zaman farkl\u0131 durumlara, sistem yap\u0131land\u0131rmalar\u0131na veya kullan\u0131c\u0131 tercihlerine g\u00f6re farkl\u0131 eylemlerin ger\u00e7ekle\u015ftirilmesi gerekir. \u0130\u015fte bu noktada &#8220;ko\u015fullu ifadeler&#8221; (conditionals) devreye girer. Ansible playbook&#8217;lar\u0131n\u0131z\u0131n dinamik, esnek ve ak\u0131ll\u0131 olmas\u0131n\u0131 sa\u011flayan ko\u015fullu ifadeler, belirli bir ko\u015fulun do\u011fru olup olmad\u0131\u011f\u0131na ba\u011fl\u0131 olarak g\u00f6revleri, rolleri veya di\u011fer otomasyon ad\u0131mlar\u0131n\u0131 y\u00fcr\u00fctmenize olanak tan\u0131r.<\/p>\n<p>Bu makalede, Ansible playbook&#8217;lar\u0131nda ko\u015fullu ifadelerin nas\u0131l kullan\u0131laca\u011f\u0131n\u0131, farkl\u0131 senaryolara y\u00f6nelik \u00e7e\u015fitli teknikleri ve en iyi uygulamalar\u0131 derinlemesine inceleyece\u011fiz.<\/p>\n<h3>Ko\u015fullu \u0130fadeler Neden \u00d6nemlidir?<\/h3>\n<p>Otomasyonun temel prensiplerinden biri, &#8220;idempotency&#8221; yani bir i\u015flemin birden \u00e7ok kez tekrarland\u0131\u011f\u0131nda ayn\u0131 sonucu vermesidir. Ko\u015fullu ifadeler, bu prensibi desteklemede kritik bir rol oynar. \u00d6rne\u011fin, bir paketi yaln\u0131zca y\u00fckl\u00fc de\u011filse kurmak, bir hizmeti yaln\u0131zca \u00e7al\u0131\u015fm\u0131yorsa ba\u015flatmak veya bir yap\u0131land\u0131rma dosyas\u0131n\u0131 yaln\u0131zca belirli bir i\u015fletim sisteminde da\u011f\u0131tmak gibi senaryolarda ko\u015fullu ifadeler vazge\u00e7ilmezdir.<\/p>\n<p>Ko\u015fullu ifadeler sayesinde:<br \/>\n*   <strong>Esneklik:<\/strong> Playbook&#8217;lar\u0131n\u0131z farkl\u0131 ortamlar ve sistemler aras\u0131nda daha esnek hale gelir.<br \/>\n*   <strong>Verimlilik:<\/strong> Gereksiz g\u00f6revlerin \u00e7al\u0131\u015fmas\u0131n\u0131 engelleyerek otomasyon s\u00fcre\u00e7lerinizi h\u0131zland\u0131r\u0131r.<br \/>\n*   <strong>Hata Tolerans\u0131:<\/strong> Hatal\u0131 veya istenmeyen durumlar\u0131n olu\u015fmas\u0131n\u0131 \u00f6nlemeye yard\u0131mc\u0131 olur.<br \/>\n*   <strong>Dinamik Davran\u0131\u015f:<\/strong> Sistemden toplanan bilgilere (facts) veya harici verilere g\u00f6re playbook&#8217;lar\u0131n\u0131z\u0131n davran\u0131\u015f\u0131n\u0131 de\u011fi\u015ftirebilirsiniz.<\/p>\n<h3>Temel Ko\u015fullu Yap\u0131: <code>when<\/code> Anahtar Kelimesi<\/h3>\n<p>Ansible&#8217;da ko\u015fullu ifadelerin en temel ve yayg\u0131n kullan\u0131m \u015fekli <code>when<\/code> anahtar kelimesidir. <code>when<\/code> ifadesi, bir g\u00f6revin (task), blo\u011fun (block) veya hatta bir rol\u00fcn (role) yaln\u0131zca belirli bir ko\u015ful do\u011fruysa y\u00fcr\u00fct\u00fclmesini sa\u011flar.<\/p>\n<p><code>when<\/code> ifadesi, Jinja2 \u015fablon motorunu kullanarak de\u011ferlendirilen bir Python ifadesi al\u0131r. Bu ifade, <code>True<\/code> veya <code>False<\/code> olarak sonu\u00e7lanmal\u0131d\u0131r.<\/p>\n<h4>G\u00f6rev D\u00fczeyinde <code>when<\/code> Kullan\u0131m\u0131<\/h4>\n<p>Bir g\u00f6revin yaln\u0131zca belirli bir ko\u015ful alt\u0131nda \u00e7al\u0131\u015fmas\u0131n\u0131 istiyorsan\u0131z, <code>when<\/code> ifadesini do\u011frudan g\u00f6reve ekleyebilirsiniz:<\/p>\n<pre><code class=\"language-yaml\">- name: Apache web sunucusunu kur\n  ansible.builtin.apt:\n    name: apache2\n    state: present\n  when: ansible_os_family == \"Debian\"\n\n- name: Nginx web sunucusunu kur\n  ansible.builtin.yum:\n    name: nginx\n    state: present\n  when: ansible_os_family == \"RedHat\"<\/code><\/pre>\n<p>Yukar\u0131daki \u00f6rnekte, <code>ansible_os_family<\/code> bir Ansible fact&#8217;idir ve \u00e7al\u0131\u015ft\u0131r\u0131ld\u0131\u011f\u0131 sistemin i\u015fletim sistemi ailesini belirtir. Debian tabanl\u0131 bir sistemde Apache, RedHat tabanl\u0131 bir sistemde ise Nginx kurulacakt\u0131r.<\/p>\n<h4>Birden Fazla Ko\u015ful Kullan\u0131m\u0131: <code>and<\/code>, <code>or<\/code>, <code>not<\/code><\/h4>\n<p>Karma\u015f\u0131k senaryolarda birden fazla ko\u015fulu birle\u015ftirmek gerekebilir. Bunun i\u00e7in <code>and<\/code> (ve), <code>or<\/code> (veya) ve <code>not<\/code> (de\u011fil) mant\u0131ksal operat\u00f6rlerini kullanabilirsiniz:<\/p>\n<pre><code class=\"language-yaml\">- name: Apache'yi yaln\u0131zca Debian ve \u00fcretim ortam\u0131nda ba\u015flat\n  ansible.builtin.service:\n    name: apache2\n    state: started\n  when: ansible_os_family == \"Debian\" and environment == \"production\"\n\n- name: Uygulamay\u0131 yaln\u0131zca test veya geli\u015ftirme ortam\u0131nda da\u011f\u0131t\n  ansible.builtin.git:\n    repo: 'https:\/\/github.com\/my\/app.git'\n    dest: \/var\/www\/my_app\n  when: environment == \"test\" or environment == \"development\"\n\n- name: Yaln\u0131zca k\u00f6k kullan\u0131c\u0131 de\u011filse bir dosya olu\u015ftur\n  ansible.builtin.file:\n    path: \/tmp\/user_file.txt\n    state: touch\n  when: ansible_user_id != \"root\"<\/code><\/pre>\n<p>Parantez kullanarak ko\u015fullar\u0131n de\u011ferlendirme s\u0131ras\u0131n\u0131 belirleyebilirsiniz:<\/p>\n<pre><code class=\"language-yaml\">- name: Geli\u015fmi\u015f ko\u015fullu g\u00f6rev\n  ansible.builtin.debug:\n    msg: \"Bu g\u00f6rev \u00e7al\u0131\u015f\u0131yor!\"\n  when: (ansible_os_family == \"Debian\" and ansible_distribution_major_version == \"10\") or environment == \"staging\"<\/code><\/pre>\n<h4>De\u011fi\u015fken Varl\u0131\u011f\u0131n\u0131 Kontrol Etme: <code>is defined<\/code>, <code>is not defined<\/code><\/h4>\n<p>Bir de\u011fi\u015fkenin tan\u0131ml\u0131 olup olmad\u0131\u011f\u0131n\u0131 veya bo\u015f olup olmad\u0131\u011f\u0131n\u0131 kontrol etmek s\u0131k\u00e7a kar\u015f\u0131la\u015f\u0131lan bir durumdur. Bu, \u00f6zellikle iste\u011fe ba\u011fl\u0131 de\u011fi\u015fkenler veya dinamik olarak olu\u015fturulan de\u011fi\u015fkenlerle \u00e7al\u0131\u015f\u0131rken \u00f6nemlidir.<\/p>\n<pre><code class=\"language-yaml\">- name: Yaln\u0131zca 'my_variable' tan\u0131ml\u0131ysa bir mesaj g\u00f6ster\n  ansible.builtin.debug:\n    msg: \"my_variable de\u011feri: {{ my_variable }}\"\n  when: my_variable is defined\n\n- name: Yaln\u0131zca 'my_list' tan\u0131ml\u0131 de\u011filse bir liste olu\u015ftur\n  ansible.builtin.set_fact:\n    my_list: []\n  when: my_list is not defined\n\n- name: Yaln\u0131zca 'my_string' bo\u015f de\u011filse bir dosya olu\u015ftur\n  ansible.builtin.file:\n    path: \/tmp\/my_file.txt\n    state: touch\n  when: my_string is not none and my_string | length > 0 # veya my_string | default('') | length > 0<\/code><\/pre>\n<p><code>is none<\/code> ve <code>is not none<\/code> de kullan\u0131labilir. Bir de\u011fi\u015fken tan\u0131ml\u0131 de\u011filse, Jinja2 bunu <code>none<\/code> olarak kabul eder.<\/p>\n<h4>Liste \u0130\u00e7eriklerini Kontrol Etme<\/h4>\n<p>Bir listenin belirli bir \u00f6\u011feyi i\u00e7erip i\u00e7ermedi\u011fini kontrol etmek i\u00e7in <code>in<\/code> operat\u00f6r\u00fcn\u00fc kullanabilirsiniz:<\/p>\n<pre><code class=\"language-yaml\">- name: \"webserver\" grubundaki host'lar i\u00e7in Apache'yi kur\n  ansible.builtin.apt:\n    name: apache2\n    state: present\n  when: \"'webserver' in group_names\" # group_names, host'un dahil oldu\u011fu gruplar\u0131n listesidir\n\n- name: \"Ubuntu\" veya \"Debian\" ise bir g\u00f6rev \u00e7al\u0131\u015ft\u0131r\n  ansible.builtin.debug:\n    msg: \"Bu bir Debian tabanl\u0131 sistemdir.\"\n  when: ansible_distribution in ['Ubuntu', 'Debian']<\/code><\/pre>\n<h3>Geli\u015fmi\u015f Ko\u015fullu Senaryolar<\/h3>\n<p>Ansible, <code>when<\/code> anahtar kelimesinin \u00f6tesinde daha karma\u015f\u0131k ko\u015fullu mant\u0131klar i\u00e7in \u00e7e\u015fitli mekanizmalar sunar.<\/p>\n<h4>Ko\u015fullu D\u00f6ng\u00fcler (Conditionals with Loops)<\/h4>\n<p>D\u00f6ng\u00fclerle birlikte <code>when<\/code> kullanmak, bir listedeki \u00f6\u011feleri belirli ko\u015fullara g\u00f6re filtrelemenizi veya her bir \u00f6\u011fe i\u00e7in farkl\u0131 eylemler ger\u00e7ekle\u015ftirmenizi sa\u011flar.<\/p>\n<pre><code class=\"language-yaml\">- name: Belirli kullan\u0131c\u0131lar\u0131 olu\u015ftur\n  ansible.builtin.user:\n    name: \"{{ item.name }}\"\n    state: present\n    groups: \"{{ item.groups | default('') }}\"\n  loop:\n    - { name: 'john', groups: 'dev' }\n    - { name: 'jane', groups: 'ops' }\n    - { name: 'bob', groups: 'dev' }\n  when: item.groups == 'dev'<\/code><\/pre>\n<p>Yukar\u0131daki \u00f6rnekte, sadece <code>groups<\/code> de\u011feri &#8216;dev&#8217; olan kullan\u0131c\u0131lar olu\u015fturulacakt\u0131r.<\/p>\n<h4>Ko\u015fullu Rol ve G\u00f6rev Dahil Etme<\/h4>\n<p>B\u00fcy\u00fck ve mod\u00fcler playbook&#8217;larda, belirli rolleri veya g\u00f6rev dosyalar\u0131n\u0131 ko\u015fullu olarak dahil etmek isteyebilirsiniz. Bu, playbook&#8217;lar\u0131n\u0131z\u0131n daha d\u00fczenli ve y\u00f6netilebilir olmas\u0131n\u0131 sa\u011flar.<\/p>\n<p><code>include_role<\/code>, <code>import_role<\/code>, <code>include_tasks<\/code>, <code>import_tasks<\/code> mod\u00fclleri ile <code>when<\/code> kullanabilirsiniz.<\/p>\n<pre><code class=\"language-yaml\">- name: Apache rol\u00fcn\u00fc yaln\u0131zca Debian tabanl\u0131 sistemlerde dahil et\n  ansible.builtin.include_role:\n    name: apache\n  when: ansible_os_family == \"Debian\"\n\n- name: Nginx rol\u00fcn\u00fc yaln\u0131zca RedHat tabanl\u0131 sistemlerde dahil et\n  ansible.builtin.include_role:\n    name: nginx\n  when: ansible_os_family == \"RedHat\"\n\n- name: Geli\u015ftirme ortam\u0131 g\u00f6revlerini dahil et\n  ansible.builtin.include_tasks: develop_tasks.yml\n  when: environment == \"development\"<\/code><\/pre>\n<p><strong>Not:<\/strong> <code>import_role<\/code> ve <code>import_tasks<\/code> statik dahil etmelerdir ve <code>when<\/code> ko\u015fullar\u0131 playbook ayr\u0131\u015ft\u0131r\u0131l\u0131rken de\u011ferlendirilir. <code>include_role<\/code> ve <code>include_tasks<\/code> dinamik dahil etmelerdir ve <code>when<\/code> ko\u015fullar\u0131 \u00e7al\u0131\u015fma zaman\u0131nda de\u011ferlendirilir. \u00c7o\u011fu durumda <code>include_*<\/code> tercih edilir, \u00e7\u00fcnk\u00fc daha esnektir.<\/p>\n<h4>Ko\u015fullu De\u011fi\u015fken Tan\u0131mlama<\/h4>\n<p>Bazen bir de\u011fi\u015fkenin de\u011ferini belirli bir ko\u015fula g\u00f6re ayarlaman\u0131z gerekebilir. Bunu <code>set_fact<\/code> mod\u00fcl\u00fcyle veya Jinja2 filtreleriyle yapabilirsiniz.<\/p>\n<pre><code class=\"language-yaml\">- name: Uygulama portunu ortama g\u00f6re ayarla\n  ansible.builtin.set_fact:\n    app_port: 8080\n  when: environment == \"production\"\n\n- name: Uygulama portunu geli\u015ftirme i\u00e7in ayarla\n  ansible.builtin.set_fact:\n    app_port: 8000\n  when: environment == \"development\"\n\n- name: Varsay\u0131lan portu ayarla (e\u011fer \u00f6ncekiler \u00e7al\u0131\u015fmad\u0131ysa)\n  ansible.builtin.set_fact:\n    app_port: 9000\n  when: app_port is not defined # veya else gibi d\u00fc\u015f\u00fcnebilirsiniz<\/code><\/pre>\n<p>Daha k\u0131sa bir yol i\u00e7in <code>default<\/code> filtresi veya <code>ternary<\/code> filtresi kullan\u0131labilir:<\/p>\n<pre><code class=\"language-yaml\">- name: Portu tek bir de\u011fi\u015fkende tan\u0131mla\n  ansible.builtin.set_fact:\n    app_port: \"{{ 8080 if environment == 'production' else 8000 }}\"<\/code><\/pre>\n<h4>Ko\u015fullu Hata Y\u00f6netimi: <code>failed_when<\/code> ve <code>changed_when<\/code><\/h4>\n<p>Ansible, bir g\u00f6revin ba\u015far\u0131l\u0131 m\u0131 yoksa ba\u015far\u0131s\u0131z m\u0131 oldu\u011funu veya bir de\u011fi\u015fikli\u011fe neden olup olmad\u0131\u011f\u0131n\u0131 varsay\u0131lan olarak belirli \u00e7\u0131k\u0131\u015f kodlar\u0131na veya durumlar\u0131na g\u00f6re belirler. Ancak bu davran\u0131\u015f\u0131 <code>failed_when<\/code> ve <code>changed_when<\/code> ile \u00f6zelle\u015ftirebilirsiniz.<\/p>\n<p>*   <strong><code>failed_when<\/code><\/strong>: Bir g\u00f6revin \u00e7\u0131k\u0131\u015f\u0131na veya durumuna bakarak g\u00f6revin ne zaman ba\u015far\u0131s\u0131z say\u0131laca\u011f\u0131n\u0131 tan\u0131mlar. \u00d6zellikle bir komut veya betik mod\u00fcl\u00fc kullan\u0131rken ve \u00e7\u0131k\u0131\u015f kodunun her zaman 0 olmad\u0131\u011f\u0131 ancak yine de ba\u015far\u0131l\u0131 oldu\u011fu durumlar i\u00e7in kullan\u0131\u015fl\u0131d\u0131r.<\/p>\n<pre><code class=\"language-yaml\">- name: Bir komutu \u00e7al\u0131\u015ft\u0131r ve belirli bir \u00e7\u0131kt\u0131 varsa ba\u015far\u0131s\u0131z say\n      ansible.builtin.shell: \/usr\/local\/bin\/my_custom_script.sh\n      register: script_output\n      failed_when: \"'ERROR' in script_output.stderr\"<\/code><\/pre>\n<p>*   <strong><code>changed_when<\/code><\/strong>: Bir g\u00f6revin ne zaman &#8220;de\u011fi\u015ftirildi&#8221; (changed) olarak raporlanaca\u011f\u0131n\u0131 tan\u0131mlar. Bu, idempotency&#8217;yi sa\u011flamak ve Ansible raporlamas\u0131n\u0131 do\u011fru hale getirmek i\u00e7in \u00e7ok \u00f6nemlidir. \u00d6rne\u011fin, bir komut her zaman \u00e7al\u0131\u015f\u0131r ancak yaln\u0131zca belirli bir ko\u015fulda sistemde ger\u00e7ek bir de\u011fi\u015fiklik yapar.<\/p>\n<pre><code class=\"language-yaml\">- name: Bir dosyay\u0131 g\u00fcncelle, ancak yaln\u0131zca i\u00e7erik de\u011fi\u015firse \"changed\" olarak i\u015faretle\n      ansible.builtin.shell: \/usr\/local\/bin\/update_config.sh\n      register: update_result\n      changed_when: \"'UPDATED' in update_result.stdout\"\n      # E\u011fer script her zaman 0 d\u00f6nd\u00fcr\u00fcyor ama bazen bir hata varsa, failed_when de ekleyebiliriz\n      failed_when: \"'FAILED' in update_result.stderr\"<\/code><\/pre>\n<h3>Ansible Fact&#8217;leri ve Ko\u015fullar<\/h3>\n<p>Ansible facts, y\u00f6netilen host&#8217;lar hakk\u0131nda toplanan dinamik verilerdir (i\u015fletim sistemi, a\u011f aray\u00fczleri, bellek, disk vb.). Bu bilgiler, playbook&#8217;lar\u0131n\u0131zda ko\u015fullu ifadeler i\u00e7in temel bir kaynakt\u0131r. <code>setup<\/code> mod\u00fcl\u00fc varsay\u0131lan olarak t\u00fcm playbook&#8217;lar\u0131n ba\u015f\u0131nda fact&#8217;leri toplar.<\/p>\n<p>Yayg\u0131n kullan\u0131lan fact&#8217;ler ve \u00f6rnekleri:<br \/>\n*   <code>ansible_os_family<\/code>: &#8220;Debian&#8221;, &#8220;RedHat&#8221;, &#8220;Windows&#8221;<br \/>\n*   <code>ansible_distribution<\/code>: &#8220;Ubuntu&#8221;, &#8220;CentOS&#8221;, &#8220;Fedora&#8221;<br \/>\n*   <code>ansible_distribution_major_version<\/code>: &#8220;20&#8221;, &#8220;8&#8221;<br \/>\n*   <code>ansible_processor_count<\/code>: CPU \u00e7ekirdek say\u0131s\u0131<br \/>\n*   <code>ansible_memtotal_mb<\/code>: Toplam bellek miktar\u0131 (MB)<br \/>\n*   <code>ansible_hostname<\/code>: Host ad\u0131<br \/>\n*   <code>ansible_default_ipv4.address<\/code>: Varsay\u0131lan IPv4 adresi<\/p>\n<pre><code class=\"language-yaml\">- name: Yaln\u0131zca 4'ten fazla CPU \u00e7ekirde\u011fi olan host'larda CPU yo\u011fun bir uygulama kur\n  ansible.builtin.package:\n    name: high_perf_app\n    state: present\n  when: ansible_processor_count > 4\n\n- name: Yaln\u0131zca belirli bir IP adresine sahip host'larda \u00f6zel bir yap\u0131land\u0131rma uygula\n  ansible.builtin.template:\n    src: special_config.j2\n    dest: \/etc\/special_app.conf\n  when: ansible_default_ipv4.address == \"192.168.1.100\"<\/code><\/pre>\n<p>Kendi \u00f6zel fact&#8217;lerinizi de olu\u015fturabilir ve bunlar\u0131 ko\u015fullu ifadelerde kullanabilirsiniz. Bunun i\u00e7in <code>set_fact<\/code> mod\u00fcl\u00fcn\u00fc veya <code>fact_caching<\/code> \u00f6zelli\u011fini kullanabilirsiniz.<\/p>\n<h3>Jinja2 \u015eablon Motoru ve Ko\u015fullar<\/h3>\n<p>Ansible, yap\u0131land\u0131rma dosyalar\u0131n\u0131 dinamik olarak olu\u015fturmak i\u00e7in Jinja2 \u015fablon motorunu kullan\u0131r. Jinja2&#8217;nin kendi i\u00e7inde de ko\u015fullu ifadeler bulunur (<code>{% if %}<\/code>, <code>{% elif %}<\/code>, <code>{% else %}<\/code>, <code>{% endif %}<\/code>). Bu, bir dosyan\u0131n i\u00e7eri\u011finin belirli ko\u015fullara g\u00f6re de\u011fi\u015fmesini sa\u011flamak i\u00e7in idealdir.<\/p>\n<pre><code class=\"language-jinja2\"># templates\/my_app.conf.j2\nserver {\n    listen {{ app_port }};\n    server_name {{ inventory_hostname }};\n\n    {% if environment == \"production\" %}\n    access_log \/var\/log\/nginx\/{{ inventory_hostname }}_access.log main;\n    error_log \/var\/log\/nginx\/{{ inventory_hostname }}_error.log warn;\n    {% else %}\n    access_log \/var\/log\/nginx\/{{ inventory_hostname }}_dev_access.log debug;\n    error_log \/var\/log\/nginx\/{{ inventory_hostname }}_dev_error.log debug;\n    {% endif %}\n\n    location \/ {\n        proxy_pass http:\/\/localhost:{{ backend_port }};\n    }\n}<\/code><\/pre>\n<p>Playbook&#8217;ta bu \u015fablonu kullan\u0131rken:<\/p>\n<pre><code class=\"language-yaml\">- name: Uygulama yap\u0131land\u0131rma dosyas\u0131n\u0131 da\u011f\u0131t\n  ansible.builtin.template:\n    src: my_app.conf.j2\n    dest: \/etc\/nginx\/conf.d\/my_app.conf\n  vars:\n    app_port: 80\n    backend_port: 8080\n    environment: \"production\" # Bu de\u011fi\u015fken Jinja2 \u015fablonu i\u00e7inde kullan\u0131lacak<\/code><\/pre>\n<p>Burada, <code>environment<\/code> de\u011fi\u015fkeninin de\u011ferine g\u00f6re <code>access_log<\/code> ve <code>error_log<\/code> ayarlar\u0131 farkl\u0131 olacakt\u0131r.<\/p>\n<p>Jinja2 ayr\u0131ca listeler \u00fczerinde ko\u015fullu filtreleme yapmak i\u00e7in <code>select<\/code> ve <code>reject<\/code> gibi filtreler sunar:<\/p>\n<pre><code class=\"language-yaml\">- name: Yaln\u0131zca belirli bir ko\u015fulu kar\u015f\u0131layan \u00f6\u011feleri i\u015fle\n  ansible.builtin.debug:\n    msg: \"\u00d6\u011fe: {{ item }}\"\n  loop: \"{{ my_list | selectattr('status', 'equalto', 'active') | list }}\"\n  vars:\n    my_list:\n      - { name: 'user1', status: 'active' }\n      - { name: 'user2', status: 'inactive' }\n      - { name: 'user3', status: 'active' }<\/code><\/pre>\n<p>Bu \u00f6rnekte, <code>my_list<\/code> i\u00e7indeki sadece <code>status: active<\/code> olan \u00f6\u011feler d\u00f6ng\u00fcye al\u0131nacakt\u0131r.<\/p>\n<h3>En \u0130yi Uygulamalar ve \u0130pu\u00e7lar\u0131<\/h3>\n<p>*   <strong>Okunabilirlik ve Sadelik:<\/strong> Karma\u015f\u0131k <code>when<\/code> ifadelerini m\u00fcmk\u00fcn oldu\u011funca basitle\u015ftirin. Gerekirse birden fazla <code>when<\/code> ifadesini ayr\u0131 ayr\u0131 sat\u0131rlarda kullan\u0131n veya karma\u015f\u0131k mant\u0131\u011f\u0131 de\u011fi\u015fkenlere atay\u0131n. Parantezleri do\u011fru kullanarak mant\u0131ksal operat\u00f6rlerin s\u0131ras\u0131n\u0131 netle\u015ftirin.<br \/>\n*   <strong>De\u011fi\u015fken Kapsam\u0131:<\/strong> Ko\u015fullu ifadelerde kullan\u0131lan de\u011fi\u015fkenlerin do\u011fru kapsamda (host, grup, play, rol, g\u00f6rev) tan\u0131mland\u0131\u011f\u0131ndan emin olun.<br \/>\n*   <strong>Fact&#8217;leri Ak\u0131ll\u0131ca Kullan\u0131n:<\/strong> Ansible fact&#8217;leri, sistem hakk\u0131nda g\u00fcvenilir bilgi sa\u011flar. Ko\u015fullar\u0131n\u0131z\u0131 olu\u015ftururken bu fact&#8217;lerden faydalan\u0131n. Ancak, \u00e7ok fazla fact toplamak performans\u0131 etkileyebilir, bu nedenle gereksiz fact toplamay\u0131 (<code>gather_facts: false<\/code>) devre d\u0131\u015f\u0131 b\u0131rakmay\u0131 d\u00fc\u015f\u00fcnebilirsiniz.<br \/>\n*   <strong>Test Edilebilirlik:<\/strong> Ko\u015fullu mant\u0131\u011f\u0131n\u0131z\u0131 k\u00fc\u00e7\u00fck, izole testlerle do\u011frulay\u0131n. <code>debug<\/code> mod\u00fcl\u00fc, de\u011fi\u015fken de\u011ferlerini ve ko\u015fullu ifadelerin sonucunu kontrol etmek i\u00e7in \u00e7ok faydal\u0131d\u0131r.<\/p>\n<pre><code class=\"language-yaml\">- name: Ko\u015fulu test et\n      ansible.builtin.debug:\n        msg: \"Ko\u015ful do\u011fru mu? {{ ansible_os_family == 'Debian' and environment == 'production' }}\"<\/code><\/pre>\n<p>*   <strong>Performans:<\/strong> M\u00fcmk\u00fcnse, ko\u015fullar\u0131 daha \u00fcst seviyelerde (\u00f6rne\u011fin, play veya rol d\u00fczeyinde) de\u011ferlendirerek gereksiz g\u00f6revlerin veya rol dahil etmelerinin \u00f6n\u00fcne ge\u00e7in.<br \/>\n*   <strong>Idempotency&#8217;yi Destekleme:<\/strong> <code>changed_when<\/code> ve <code>failed_when<\/code> gibi ifadelerle Ansible&#8217;\u0131n raporlamas\u0131n\u0131 do\u011fru hale getirerek otomasyonunuzun ger\u00e7ekten idempotent olmas\u0131n\u0131 sa\u011flay\u0131n.<br \/>\n*   <strong><code>register<\/code> Kullan\u0131m\u0131:<\/strong> Bir \u00f6nceki g\u00f6revin \u00e7\u0131kt\u0131s\u0131n\u0131 <code>register<\/code> ile bir de\u011fi\u015fkene kaydederek, bu \u00e7\u0131kt\u0131y\u0131 sonraki g\u00f6revlerdeki <code>when<\/code> ifadelerinde kullanabilirsiniz.<\/p>\n<pre><code class=\"language-yaml\">- name: Bir komut \u00e7al\u0131\u015ft\u0131r\n      ansible.builtin.shell: ls \/tmp\/my_file.txt\n      register: file_check_result\n      ignore_errors: true # Dosya yoksa hata vermesin\n\n    - name: Dosya varsa bir i\u015flem yap\n      ansible.builtin.debug:\n        msg: \"Dosya var!\"\n      when: file_check_result.rc == 0 # return code 0 ise dosya var demektir<\/code><\/pre>\n<h3>S\u0131k\u00e7a Yap\u0131lan Hatalar<\/h3>\n<p>*   <strong>Tan\u0131mlanmam\u0131\u015f De\u011fi\u015fkenler:<\/strong> Bir de\u011fi\u015fken tan\u0131ml\u0131 de\u011filse ve <code>is defined<\/code> kontrol\u00fc yapmadan onu bir ko\u015fulda kullanmaya \u00e7al\u0131\u015f\u0131rsan\u0131z, Ansible bir hata verir. Daima de\u011fi\u015fkenlerin varl\u0131\u011f\u0131n\u0131 kontrol edin (<code>my_var is defined<\/code>).<br \/>\n*   <strong>T\u00fcr Uyumsuzluklar\u0131:<\/strong> Kar\u015f\u0131la\u015ft\u0131rma yaparken de\u011fi\u015fkenlerin t\u00fcrlerini (string, integer, boolean) g\u00f6z \u00f6n\u00fcnde bulundurun. \u00d6rne\u011fin, <code>ansible_processor_count<\/code> bir say\u0131 iken, <code>environment<\/code> bir dize olabilir.<br \/>\n*   <strong>Karma\u015f\u0131k Mant\u0131k Hatalar\u0131:<\/strong> \u00d6zellikle <code>and<\/code> ve <code>or<\/code> operat\u00f6rlerini bir arada kullan\u0131rken parantezlerin do\u011fru yerle\u015ftirilmesi \u00e7ok \u00f6nemlidir. Yanl\u0131\u015f parantez kullan\u0131m\u0131, beklenmedik sonu\u00e7lara yol a\u00e7abilir.<br \/>\n*   <strong><code>when<\/code> ve <code>failed_when<\/code> Kar\u0131\u015f\u0131kl\u0131\u011f\u0131:<\/strong> <code>when<\/code> bir g\u00f6revin \u00e7al\u0131\u015f\u0131p \u00e7al\u0131\u015fmayaca\u011f\u0131n\u0131 kontrol ederken, <code>failed_when<\/code> \u00e7al\u0131\u015fan bir g\u00f6revin ba\u015far\u0131l\u0131 m\u0131 yoksa ba\u015far\u0131s\u0131z m\u0131 say\u0131laca\u011f\u0131n\u0131 kontrol eder. Ama\u00e7lar\u0131n\u0131 kar\u0131\u015ft\u0131rmay\u0131n.<br \/>\n*   <strong>Liste Elemanlar\u0131n\u0131 Yanl\u0131\u015f Kontrol Etme:<\/strong> Bir listenin belirli bir \u00f6\u011feyi i\u00e7erip i\u00e7ermedi\u011fini kontrol etmek i\u00e7in do\u011frudan <code>when: my_list == 'item'<\/code> yerine <code>when: 'item' in my_list<\/code> kullan\u0131n.<\/p>\n<h3>Sonu\u00e7<\/h3>\n<p>Ansible playbook&#8217;lar\u0131nda ko\u015fullu ifadeler, otomasyonunuzu daha dinamik, esnek ve ak\u0131ll\u0131 hale getiren temel bir ara\u00e7t\u0131r. <code>when<\/code> anahtar kelimesinden <code>failed_when<\/code>, <code>changed_when<\/code> gibi geli\u015fmi\u015f se\u00e7eneklere ve Jinja2 \u015fablonlar\u0131 i\u00e7indeki ko\u015fullara kadar geni\u015f bir yelpazede kullan\u0131m imkan\u0131 sunarlar. Ansible fact&#8217;lerini etkin bir \u015fekilde kullanarak sistemleriniz hakk\u0131nda bilgi toplayabilir ve bu bilgiyi otomasyon kararlar\u0131n\u0131zda kullanabilirsiniz.<\/p>\n<p>Bu makalede ele al\u0131nan teknikleri ve en iyi uygulamalar\u0131 benimseyerek, daha sa\u011flam, bak\u0131m\u0131 kolay ve hataya dayan\u0131kl\u0131 Ansible playbook&#8217;lar\u0131 olu\u015fturabilirsiniz. Unutmay\u0131n, iyi yaz\u0131lm\u0131\u015f ko\u015fullu ifadeler, otomasyonunuzun sadece \u00e7al\u0131\u015fmas\u0131n\u0131 de\u011fil, ayn\u0131 zamanda do\u011fru, verimli ve \u00f6ng\u00f6r\u00fclebilir bir \u015fekilde \u00e7al\u0131\u015fmas\u0131n\u0131 sa\u011flar. Otomasyon yolculu\u011funuzda ko\u015fullu ifadelerin g\u00fcc\u00fcn\u00fc ke\u015ffetmeye devam edin!<br \/>\n<\/body><\/p>\n","protected":false},"excerpt":{"rendered":"Ansible Playbook&#8217;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r?\nAnsible, otomasyon d\u00fcnyas\u0131nda basitli\u011fi, arac\u0131s\u0131z mimarisi ve g\u00fc\u00e7l\u00fc yetenekle","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-35473","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-genel","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ansible Playbook&#039;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ansible Playbook&#039;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r?\" \/>\n<meta property=\"og:description\" content=\"Ansible Playbook&#039;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r? Ansible, otomasyon d\u00fcnyas\u0131nda basitli\u011fi, arac\u0131s\u0131z mimarisi ve g\u00fc\u00e7l\u00fc yetenekle\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-30T01:40:36+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"Ansible Playbook&#8217;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r?\",\"datePublished\":\"2025-11-30T01:40:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/\"},\"wordCount\":1657,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/\",\"name\":\"Ansible Playbook'larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-11-30T01:40:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ansible Playbook&#8217;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ansible Playbook'larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/","og_locale":"tr_TR","og_type":"article","og_title":"Ansible Playbook'larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r?","og_description":"Ansible Playbook'larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r? Ansible, otomasyon d\u00fcnyas\u0131nda basitli\u011fi, arac\u0131s\u0131z mimarisi ve g\u00fc\u00e7l\u00fc yetenekle","og_url":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-11-30T01:40:36+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"13 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"Ansible Playbook&#8217;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r?","datePublished":"2025-11-30T01:40:36+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/"},"wordCount":1657,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/","url":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/","name":"Ansible Playbook'larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-11-30T01:40:36+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/ansible-playbooklarda-kosullu-ifadeler-nasil-kullanilir\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Ansible Playbook&#8217;larda Ko\u015fullu \u0130fadeler Nas\u0131l Kullan\u0131l\u0131r?"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/35473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=35473"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/35473\/revisions"}],"predecessor-version":[{"id":35474,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/35473\/revisions\/35474"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=35473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=35473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=35473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}