<?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/zh/tags/ansible/</link>
    <description>Recent content in ansible on Christian Knedel</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-cn</language>
    <lastBuildDate>Fri, 25 Jun 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://www.christian-knedel.de/zh/tags/ansible/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>用Ansible远程控制PIs</title>
      <link>https://www.christian-knedel.de/zh/post/2021/june/20210725-ansible/</link>
      <pubDate>Fri, 25 Jun 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.christian-knedel.de/zh/post/2021/june/20210725-ansible/</guid>
      <description>在容器的伟大之处：Kubenetes集群和NFS存储教程中创建了一个Kubernetes集群后，我现在希望能够通过Ansible解决这些计算机。    为此需要一个新的钥匙。 x  &amp;ndash;  +   Terminal   $ ssh-keygen -b 4096   在所有服务器（服务器1、服务器2和服务器3）的&amp;quot;/home/pi/.ssh/authorised_keys &amp;ldquo;文件中添加了新的公钥。此外，Ansible必须安装这个包。 x  &amp;ndash;  +   Terminal   $ sudo apt-get install -y ansible   之后，必须在&amp;rdquo;/etc/ansible/hosts &amp;ldquo;文件中输入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;   见。      现在你可以执行playbooks或命令，例如重新启动所有服务器。 x  &amp;ndash;  +   Terminal   $ ansible raspi -m shell -a &amp;#39;sudo /sbin/reboot&amp;#39;</description>
    </item>
    
  </channel>
</rss>
