<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[ansibleturkiye - Medium]]></title>
        <description><![CDATA[Ansible Deneyimleri - Medium]]></description>
        <link>https://medium.com/ansibleturkiye?source=rss----8e2f70d9d536---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>ansibleturkiye - Medium</title>
            <link>https://medium.com/ansibleturkiye?source=rss----8e2f70d9d536---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:48:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ansibleturkiye" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Set Oracle Environment]]></title>
            <link>https://medium.com/ansibleturkiye/set-oracle-environment-659be37a3d1c?source=rss----8e2f70d9d536---4</link>
            <guid isPermaLink="false">https://medium.com/p/659be37a3d1c</guid>
            <category><![CDATA[sqlplus]]></category>
            <category><![CDATA[oracle-environment]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[ansible]]></category>
            <dc:creator><![CDATA[Alican ŞAHİN]]></dc:creator>
            <pubDate>Tue, 05 Oct 2021 11:31:18 GMT</pubDate>
            <atom:updated>2021-10-05T11:39:56.485Z</atom:updated>
            <content:encoded><![CDATA[<p>ORACLE_HOME ve ORACLE_SID env değişkenlerini girdikten sonra shell modülünde echo “&lt;buraya&gt;” kısmına sorgunuzu yazıp ansible ile çalıştırabilirsiniz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/63207719753a2a9e70cd581c439caadb/href">https://medium.com/media/63207719753a2a9e70cd581c439caadb/href</a></iframe><p>Kolaylıklar dilerim,<br>İyi çalışmalar.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=659be37a3d1c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ansibleturkiye/set-oracle-environment-659be37a3d1c">Set Oracle Environment</a> was originally published in <a href="https://medium.com/ansibleturkiye">ansibleturkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ansible Tower için Microfocus UCMDB Dinamik Envanter Eklentisi]]></title>
            <link>https://medium.com/ansibleturkiye/ansible-tower-i%C3%A7in-microfocus-ucmdb-dinamik-envanter-eklentisi-6a49a52ddabb?source=rss----8e2f70d9d536---4</link>
            <guid isPermaLink="false">https://medium.com/p/6a49a52ddabb</guid>
            <category><![CDATA[ansible-dynamic-inventory]]></category>
            <category><![CDATA[ansible-tower]]></category>
            <category><![CDATA[micro-focus]]></category>
            <category><![CDATA[micro-focus-ucmdb]]></category>
            <category><![CDATA[ansible]]></category>
            <dc:creator><![CDATA[Alican ŞAHİN]]></dc:creator>
            <pubDate>Fri, 13 Mar 2020 20:46:01 GMT</pubDate>
            <atom:updated>2020-03-23T14:03:38.543Z</atom:updated>
            <content:encoded><![CDATA[<p>Ansible Tower’a statik envanter ekleyebileceğiniz gibi oVirt, CloudForms, VMware, Azure RM, AWS S2, UCMDB ve daha bir çok platformdan dinamik envanter de çekebilirsiniz.</p><p>Bu yazıda ucmdb üzerinde önceden hazırlanmış ve rhel sunucularının hostname, ip_address vb. ilgili alanlarını listeleyen tql query’nin sonucunu <a href="https://docs.microfocus.com/UCMDB/11.0/ucmdb-docs/docs/eng/doc_lib/Content/REST_API/REST_API_Reference.htm">Rest API</a> kullanarak çekip Ansible Tower’a nasıl eklediğimden bahsedeceğim.</p><blockquote><strong>Versiyonlar:<br></strong>Yazmış olduğum örnek plugin aşağıdaki versiyonlarda geliştirildi ve test edildi.<br>Ansible Tower=3.6.2<br>Ansible=2.9.1<br>Python=2.7.5<br>UCMDB=11.0 ( <a href="https://docs.microfocus.com/UCMDB/11.0/ucmdb-docs/docs/eng/doc_lib/Content/REST_API/REST_API_Reference.htm">rest api ref guide için tıkla</a> )</blockquote><p>Öncelikle neden bu entegrasyona ihtiyaç duyduğumuzdan bahsedelim ki yazının devamı daha anlamlı olsun. Özetle belirli aralıklarla rhel sunuculara otomatik patch geçilecek ve hangi gün hangi sunuculara hangi zaman diliminde patch geçileceği bilgisi ucmdb üzerinde olduğu için sunucu listesini ve diğer ilgili parametreleri buradan çekmemiz gerekti.</p><p>Ansible Tower v3.6, python 2.7 kullanıyor ancak dynamic inventory script’ini hangi dille yazacağınız size kalmış. Shell script, node.js, python 2.7, python’ın farklı versiyonları veya başka diller de kullanabilirsiniz. Tower bu konuda gayet esnek.</p><p>Aslında ansible esnek :)</p><p>Projeye başladığımda ansible’ın esnekliğine güvenerek script’i python 3.x ile yazdım ancak bu scripti çalıştırabilmek için custom venv kurulumu yapmam gerekiyordu. Kurulum için pip install yapmam gereken tower sunucusunda erişim kısıtlamaları sebebiyle ilgili repoya erişemediğim için scripti python 2.7 için tekrar düzenlemek zorunda kaldım. Ansible esnek ancak security ekipleri oldukça katı :)</p><p>Şimdi gelelim esas konuya.</p><p><strong>Nasıl oluyor da Ansible Tower herhangi bir dilde yazdığımız script’ten ihtiyacı olan bilgiyi okuyor?</strong> (<a href="https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html">detaylı bilgi için buraya</a>)<br>Aslında oldukça kolay. Tower, scripti nasıl yazdığınızla ilgilenmiyor ancak bazı şartları var;</p><p><strong>1- list</strong></p><pre>python test.py <strong>--list</strong></pre><p>list parametresi ile çalıştığında tüm sunucuları aşağıdaki formatta return etmelisiniz.<br><strong>örnek çıktı:</strong></p><pre>{<br>   &quot;all&quot;:{<br>      &quot;children&quot;:[<br>         &quot;unix&quot;<br>      ]<br>   },<br>   &quot;unix&quot;:{<br>      &quot;hosts&quot;:[<br>         &quot;test5&quot;,<br>         &quot;test1&quot;,<br>         &quot;test2&quot;,<br>         &quot;test4&quot;,<br>         &quot;test3&quot;<br>      ],<br>      &quot;children&quot;:[<br><br>      ]<br>   },<br>   &quot;_meta&quot;:{<br>      &quot;hostvars&quot;:{<br>         &quot;test1&quot;:{<br>            &quot;maintenance_interval&quot;:&quot;10:00 - 17:00&quot;,<br>            &quot;discovered_os_version&quot;:&quot;7.4&quot;,<br>            &quot;maintenance_date&quot;:&quot;Cumartesi&quot;,<br>            &quot;os_family&quot;:&quot;unix&quot;,<br>            &quot;ip_address&quot;:&quot;192.168.1.1&quot;,<br>            &quot;os_vendor&quot;:&quot;red_hat_software&quot;<br>         },<br>         &quot;test2&quot;:{<br>            &quot;maintenance_interval&quot;:&quot;10:00 - 17:00&quot;,<br>            &quot;discovered_os_version&quot;:&quot;6.9&quot;,<br>            &quot;maintenance_date&quot;:&quot;Cumartesi&quot;,<br>            &quot;os_family&quot;:&quot;unix&quot;,<br>            &quot;ip_address&quot;:&quot;192.168.1.2&quot;,<br>            &quot;os_vendor&quot;:&quot;red_hat_software&quot;<br>         },<br>         &quot;test3&quot;:{<br>            &quot;maintenance_interval&quot;:&quot;10:00 - 17:00&quot;,<br>            &quot;discovered_os_version&quot;:&quot;7.4&quot;,<br>            &quot;maintenance_date&quot;:&quot;Cumartesi&quot;,<br>            &quot;os_family&quot;:&quot;unix&quot;,<br>            &quot;ip_address&quot;:&quot;192.168.1.3&quot;,<br>            &quot;os_vendor&quot;:&quot;red_hat_software&quot;<br>         },<br>         &quot;test4&quot;:{<br>            &quot;maintenance_interval&quot;:&quot;10:00 - 17:00&quot;,<br>            &quot;discovered_os_version&quot;:&quot;7.4&quot;,<br>            &quot;maintenance_date&quot;:&quot;Cumartesi&quot;,<br>            &quot;os_family&quot;:&quot;unix&quot;,<br>            &quot;ip_address&quot;:&quot;192.168.1.4&quot;,<br>            &quot;os_vendor&quot;:&quot;red_hat_software&quot;<br>         },<br>         &quot;test5&quot;:{<br>            &quot;maintenance_interval&quot;:&quot;10:00 - 17:00&quot;,<br>            &quot;discovered_os_version&quot;:&quot;7.4&quot;,<br>            &quot;maintenance_date&quot;:&quot;Cumartesi&quot;,<br>            &quot;os_family&quot;:&quot;unix&quot;,<br>            &quot;ip_address&quot;:&quot;192.168.1.5&quot;,<br>            &quot;os_vendor&quot;:&quot;red_hat_software&quot;<br>         }<br>      }<br>   }<br>}</pre><p><strong>2- host &lt;hostname&gt;</strong></p><pre>python test.py <strong>--host &lt;hostname&gt;</strong></pre><p>hostname parametresi geçildiğinde de o hostname için ilgili tüm parametreleri dump etmelisiniz.<br><strong>örnek çıktı:</strong></p><pre>&quot;test5&quot;:{<br>  &quot;maintenance_interval&quot;:&quot;10:00 - 17:00&quot;,<br>  &quot;discovered_os_version&quot;:&quot;7.4&quot;,<br>  &quot;maintenance_date&quot;:&quot;Cumartesi&quot;,<br>  &quot;os_family&quot;:&quot;unix&quot;,<br>  &quot;ip_address&quot;:&quot;192.168.1.5&quot;,<br>  &quot;os_vendor&quot;:&quot;red_hat_software&quot;<br>}</pre><p>Yazıyı daha fazla uzatmamak adına json output’un nasıl olması gerektiği ile ilgili detaya girmiyorum. Detaylı bilgiye <a href="https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html">buradan </a>ulaşabilirsiniz.</p><p>Son olarak script’iniz başarıyla çalıştıysa tower’a eklemeden önce ansible.cfg dosyasında aşağıdaki kod bloğunda <strong>script</strong>’i enable etmeniz gerekmektedir. Aksi taktirde scriptiniz hata alacaktır.</p><p><strong>FILE:</strong>/etc/ansible/ansible.cfg<br> — — — <br>[inventory]<br>enable_plugins=<strong>script</strong>, host_list, auto, yam, ini, toml<br> — — —</p><p>Yukarıda bahsettiğim her adımı halledebildiyseniz aşağıdaki ekranlardan scriptinizi ekleyebilirsiniz.</p><p>(+) butonu ile Inventory Script ekle</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*WXne3ZzKoUHyMhSNcnyWVA.png" /></figure><p>Daha sonra scriptinizi aşağıdaki alana ekleyebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*n8yOGLC4pd5WxurOyZHWnQ.png" /></figure><p>Test edebilmek için Inventories kısmından yeni bir inventory ekleyin. Kaydettikten sonra <strong>sources </strong>sekmesinden (+) -create a new source- butonuna basın. Gelen sayfada Name girdikten sonra source listbox’ından <strong>custom script’</strong>i seçin. Seçtiğinizde aşağıya yeni alanlar gelecek. Buradan CUSTOM INVENTORY SCRIPT altından oluşturduğunuz script inventory’i seçin ve kaydedin.</p><p>Karşınıza aşağıdaki ekran gelecektir. Burada yuvarlak içine aldığım butona basarak scriptinizin çalışmasını sağlayabilirsiniz. Script çalışmaya başladığında soldaki yeşil bulut yanıp sönmeye başlayacak. Üzerine tıklarsanız script’in loglarını görüntüleyebilirsiniz. Bulut ikonu kırmızı olursa hata aldınız demektir. Yeşil sabit kalırsa script başarıyla çalışmış ve sunucuları eklemiş demektir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*m2ahbmfUutCtq7jJ7jI6uw.png" /></figure><p>Herşey yolunda gittiyse yukarıdaki ekrandan <strong>Hosts </strong>sekmesine tıklayıp sonucu görebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PkKamqc9GEImqN7TNV2HHw.png" /></figure><p>Listedeki sunuculardan herhangi birine tıklarsanız sunucuya ait parametrelerin de setlendiğini görebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4L9RRa4OlkWGJEohkYH43Q.png" /></figure><p>Yazdığım python kodunu buraya eklemedim. Aşağıdaki github hesabımdan kodu inceleyebilirsiniz.</p><p>Acele ile yazılmış bir script olduğu için kusura bakmayın :) Olabildiğince sade ve anlaşılır yazmaya çalıştım :)</p><p><a href="https://github.com/alcnsahin/ansible-tower-dynamic-ucmdb-inventory/blob/master/execute-tql-query-py2.py">alcnsahin/ansible-tower-dynamic-ucmdb-inventory</a></p><p><strong>Ek Bilgiler<br>1- </strong>Custom script’inizi farklı python virtualenv ile çalıştırmak istiyorsanız sizi <a href="https://github.com/ansible/awx/blob/devel/docs/custom_virtualenvs.md">şuraya</a> alalım.</p><p>2- Script’i doğrudan Tower üzerinde test etmek yerine önce sunucuda aşağıdaki komut ile çalıştırmayı deneyin. Daha anlamlı hatalar alır hızlı bir şekilde bug fix yapabilirsiniz.</p><pre>ansible-inventory -i execute-tql-query-py2.py --list -v</pre><p>Hepsi bu kadar. Sorunuz olursa lütfen bana mesaj atın.</p><p>İyi çalışmalar dilerim.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a49a52ddabb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ansibleturkiye/ansible-tower-i%C3%A7in-microfocus-ucmdb-dinamik-envanter-eklentisi-6a49a52ddabb">Ansible Tower için Microfocus UCMDB Dinamik Envanter Eklentisi</a> was originally published in <a href="https://medium.com/ansibleturkiye">ansibleturkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ansible Tower ile CyberArk AIM Entegrasyonu]]></title>
            <link>https://medium.com/ansibleturkiye/ansible-tower-ile-cyberark-aim-entegrasyonu-cef96009cb57?source=rss----8e2f70d9d536---4</link>
            <guid isPermaLink="false">https://medium.com/p/cef96009cb57</guid>
            <category><![CDATA[cyberark-aim]]></category>
            <category><![CDATA[ansible-tower]]></category>
            <dc:creator><![CDATA[Alican ŞAHİN]]></dc:creator>
            <pubDate>Tue, 10 Mar 2020 11:48:52 GMT</pubDate>
            <atom:updated>2020-03-10T11:48:52.624Z</atom:updated>
            <content:encoded><![CDATA[<p>Ansible Tower, işletim sistemlerine erişmek, cloud service provider’lar ile entegre olmak, soap yada rest api call etmek veya bir sanal sunucunun snap’ini almamız gereken durumlarda -örnekler çoğaltılabilir- kullanmak üzere kendi veritabanından yada 3rd party bir kasa’dan SSH Private key, password veya token çekmenizi sağlar.</p><p>Tower 3.5 versiyonu ile birlikte aşağıdaki kasalara destek vermektedir.</p><ul><li>CyberArk Application Identity Manager (AIM)</li><li>CyberArk Conjur</li><li>HashiCorp Vault Key-Value Store (KV)</li><li>HashiCorp Vault SSH Secrets Engine</li><li>Microsoft Azure Key Management System (KMS)</li></ul><p>Bu yazıda CyberArk AIM ile Tower’ı nasıl entegre edeceğimizden bahsedeceğim.</p><p>Öncelikle sol menü’deki Credentials linkine tıklayalım. Ardından gelen ekrandan aşağıdaki + butonuna tıklayıp yeni credential tanımlayalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*dHzbiWhEqyTuYLaANPaHLA.png" /></figure><p>(+) butonuna tıkladıktan sonra aşağıdaki ekran gelecek. Buradaki alanları tek tek açıklayalım.</p><ul><li><strong>Name</strong>: Credential adı</li><li><strong>Description</strong>: Credential ile ilgili açıklama</li><li><strong>Organization</strong>: Credential’ın içinde bulunacağı logic yapı (Buna başka bir başlıkta değineceğim)</li><li><strong>Credential Type</strong>: Tower’ın 3.6.2 sürümünde toplam 22 adet credential type mevcut. Örnek vermek gerekirse CyberArk AIM, CyberArk Conjur, AWS, Github gibi türler mevcut. Detaylarına sonra değineceğim.</li><li><strong>CyberArk AIM URL*</strong>: AIM URL <a href="https://host:port">https://host:port</a> şeklinde verilmeli. wsdl vermeyin ( /AIMWebService/v1.1/AIM.asmx eklemenize gerek yok ) :)</li><li><strong>Application ID</strong>: AIM Servis tanımlayıcısı (cyberark admin’inden temin edebilirsiniz)</li><li><strong>Client Key</strong>: CyberArk tarafından sağlandıysa eklenecek</li><li><strong>Client Certificate</strong>: CyberArk tarafından sağlandıysa BEGIN CERTIFICATE ve END CERTIFICATE satırları ile birlikte sertifika eklenecek.</li><li><strong>Verify SSL Certificates</strong>: URL https kullanıyorsa verify edebilirsiniz. verify edecekseniz sertifikayı belirtmeyi unutmayın. Kullanılan sertifika trusted ise bu alanı işaretlemeden de servise bağlanabilirsiniz.</li></ul><p>*’lı alanlar zorunludur!</p><figure><img alt="Ansible Tower — CyberArk AIM Entegrasyonu" src="https://cdn-images-1.medium.com/max/1024/1*WpRasr3itbu3NjTjAE9_jg.png" /></figure><p>Yukarıdaki alanları doldurduktan sonra test butonuna basıyoruz ve AIM havuzundan çekeceğimiz user için aşağıdaki gibi bir query yazıyoruz. Buradaki amaç AIM’den kullanıcı çekip çekemediğimizi görmek. Herşey yolunda ise aşağıdaki gibi test <strong>passed alert</strong>’ünü görmemiz gerekiyor.</p><p>OBJECT QUERY 1:</p><blockquote>safe=testSafe;Folder=root;UserName=testUserName;Address=testAddress</blockquote><p>OBJECT QUERY 2:</p><blockquote>UserName=testUserName</blockquote><p>Object query’de tırnak veya &amp; kullanmayın. key=value; şeklinde belirtmeniz yeterli. APP ID’yi belirttiğiniz için her iki query’de çalışacaktır diye umuyorum :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UWuoZ7Bos96zzRIRpYIdLQ.png" /></figure><p>Test başarılıysa save butonuna basip entegrasyonumuzu tamamlıyoruz. Artık CyberArk havuzudan bir kullanıcı ekleyelim. Credentials (+) butonuna tıklayıp yeni bir user ekleyelim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*dHzbiWhEqyTuYLaANPaHLA.png" /></figure><p>Bu örnek için Credential Type’ı Machine olarak belirtelim. Kullanıcı Adı’nı elle girelim. Ardindan password alanındaki büyüteç’e basıp CyberArk Entegrasyonunu yaptığımız user’ın adını tıklayıp next butonuna basalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*muGKcRGQsKwTrP1tOMDs5g.png" /></figure><p>Next butonuna tıkladıktan sonra aşağıdaki gibi bir ekran gelecektir. Burada çekmek istediğimiz kullanıcı adını giriyoruz. Test başarılı ise save edebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*OO_tVFijOdfVAlKAPGOQmg.png" /></figure><p>Hepsi bu kadar :) Sorunuz varsa mesaj atabilirsiniz.</p><p><em>Son olarak bu entegrasyon </em><strong><em>Ansible Tower 3.6.2</em></strong><em> sürümü ile yapılmıştır.</em></p><p>Herkese iyi çalışmalar.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cef96009cb57" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ansibleturkiye/ansible-tower-ile-cyberark-aim-entegrasyonu-cef96009cb57">Ansible Tower ile CyberArk AIM Entegrasyonu</a> was originally published in <a href="https://medium.com/ansibleturkiye">ansibleturkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>