zoukankan      html  css  js  c++  java
  • ansible安装

    安装ansible需要epel源,所以第一步就是下载epel源,当然环境清理也是少不了的,做好前面的工作之后就可以安装ansible啦,

    第一步:安装epel源

    # yum install -y epel-release

    # yum makecache

    第二步:清理环境

    # systemctl status iptalbes

    # systemctl stop iptables

    # systemctl disable iptables

    # systemctl status firewalld

    # systemctl stop firewalld

    # systemctl disable firewalld

    # systemctl status NetworkManager

    # systemctl stop NetworkManager

    # systemctl disable NetworkManager

    # getenforce

    # vim /etc/selinux/config

        selinux=enforcing改成selinux=disabled

    第三步:安装ansible

    # yum install -y ansible

    # ansible --version

    #  vim /etc/ansible/hosts添加你要控制的主机(本机的IP 192.168.87.26  控制的主机IP 192.168.87.25 控制主机的密码是'nn123')

    [client]

    192.168.87.25 ansible_ssh_user=root ansible_ssh_pass='nn123'

    # ssh-keygen -t rsa

    # ssh-agent bsh

    # ssh-copy-id -i root@192.168.87.25(一路回车有输入密码的提示就输入密码即可)

    # ansible -m ping 192.168.87.25显示如下则是正确的

    然后ansible就安装完成啦。

  • 相关阅读:
    python的虚拟环境管理
    树的转换
    表达式·表达式树·表达式求值
    找和为K的两个元素
    最大奇数与最小偶数之差的绝对值
    L1-026 I Love GPLT (5分)
    L1-025 正整数A+B (15分)
    L1-024 后天 (5分)
    L1-023 输出GPLT (20分)
    L1-022 奇偶分家 (10分)
  • 原文地址:https://www.cnblogs.com/ping-7/p/8081313.html
Copyright © 2011-2022 走看看