<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>ansible on Christian Knedel</title>
    <link>https://www.christian-knedel.de/ja/tags/ansible/</link>
    <description>Recent content in ansible on Christian Knedel</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>ja-jp</language>
    <lastBuildDate>Fri, 25 Jun 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://www.christian-knedel.de/ja/tags/ansible/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>AnsibleでPIをリモートで制御する</title>
      <link>https://www.christian-knedel.de/ja/post/2021/june/20210725-ansible/</link>
      <pubDate>Fri, 25 Jun 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.christian-knedel.de/ja/post/2021/june/20210725-ansible/</guid>
      <description>コンテナですごいこと：KubenetesクラスタとNFSストレージチュートリアルでKubernetesクラスターを作成した後、今度はAnsibleでこれらのコンピュータに対処できるようにしたいと思います。    そのためには、新しいキーが必要です。 x  &amp;ndash;  +   Terminal   $ ssh-keygen -b 4096   すべてのサーバー（Server 1, Server 2, Server 3）の &amp;ldquo;/home/pi/.ssh/authorized_keys&amp;rdquo; ファイルに新しい公開鍵を追加しました。また、Ansible では、このパッケージをインストールする必要があります。 x  &amp;ndash;  +   Terminal   $ sudo apt-get install -y ansible   その後、「/etc/ansible/hosts」ファイルにRaspberrysを入力する必要があります。
[raspi-kube.clust] ip-server-1:ssh-port ansible_ssh_user=username ip-server-2:ssh-port ansible_ssh_user=username ip-server-3:ssh-port ansible_ssh_user=username これで、以下のように設定を確認することができます。 x  &amp;ndash;  +   Terminal   $ ansible all -m ping --ssh-common-args=&amp;#39;-o StrictHostKeyChecking=no&amp;#39;   ご覧ください。      これで、すべてのサーバーを再起動するなどのプレイブックやコマンドを実行できるようになりました。 x  &amp;ndash;  +   Terminal   $ ansible raspi -m shell -a &amp;#39;sudo /sbin/reboot&amp;#39;</description>
    </item>
    
  </channel>
</rss>
