当前位置: 首页 > wzjs >正文

贴心的合肥网站建设北京seo怎么优化

贴心的合肥网站建设,北京seo怎么优化,小浪底水利枢纽建设管理局网站,外卖网站建设可行性分析Ansible 安装 Ansible 有三种安装方式,源码安装、发行版安装和 Python 安装。 使用发行版安装或 Python 安装两种方式时,Ansible 的安装包有两个,区别如下: • ansible-core:一种极简语言和运行时包,包含…

Ansible 安装

Ansible 有三种安装方式,源码安装发行版安装和 Python 安装

使用发行版安装或 Python 安装两种方式时,Ansible 的安装包有两个,区别如下:

  • • ansible-core:一种极简语言和运行时包,包含一组内置模块和插件。

  • • ansible:一个更大的“包含电池”的软件包,它添加了社区精选的 Ansible 集合选择,用于自动化各种设备。

在用源码或者 Python 安装 Ansible 时,默认不会安装 sshpass 软件包,该软件包用来给 Ansible 提供密码验证被控端,因此如果在执行 Ansible 的命令时需要输入 ssh 的密码,则需要该软件包,该软件包通过 dnf install -y sshpass

[root@ansible ansible]# ansible servera -m ping
servera | FAILED! => {"msg": "to use the 'ssh' connection type with passwords or pkcs11_provider, you must install the sshpass program"
}

本次安装使用 Rocky 8 Linux 系统。

源码安装

[root@ansible ~]# dnf install python3.12 python3.12-pip sshpass
[root@ansible ~]# tar xf ansible-2.16.3.tar.gz
[root@ansible ~]# cd ansible-2.16.3/
[root@ansible ansible-2.16.3]# python3 -m pip install -r ./requirements.txt
[root@ansible ansible-2.16.3]# python3 setup.py install

源码安装只能安装 Ansible-core

发行版安装

[root@ansible ~]# dnf install -y epel-release# 安装最简洁的 Ansible
[root@ansible ~]# dnf install ansible-core# 安装包含常用模块的 Ansible
[root@ansible ~]# dnf install ansible

Python 安装

# 安装 Python3 和 pip
[root@ansible ~]# dnf install python3.12 python3.12-pip sshpass# 安装 Ansible-core
[root@ansible ~]# python3.12 -m pip install ansible-core==2.16.3# 安装 Ansible
[root@ansible ~]# python3.12 -m pip install ansible

设置 Ansible 参数自动补全

[root@ansible ~]# python3 -m pip install argcomplete
[root@ansible ~]# activate-global-python-argcomplete --user

重新登录命令行加载一下环境变量就可以看到自动补全了。

快速配置并使用 Ansible

有一个被控节点,地址为 192.168.221.131,主机名为 servera

[root@ansible ~]# mkdir ansible
[root@ansible ~]# cd ansible
[root@ansible ansible]# sed -i 's/;inventory=.*/inventory\ =\ .\/inventory/' ansible.cfg
[root@ansible ansible]# cat <<-EOF > ansible.cfg
[defaults]
inventory      = ./inventory
ask_pass       = false
remote_user    =  root
log_path       = /var/log/ansible.log
host_key_checking = False
[privilege_escalation]
become = True
become_method = sudo
become_user = root
become_ask_pass = False
[ssh_connection]
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no
EOF
[root@ansible ansible]# echo servera > inventory
[root@ansible ansible]# tail -n1 /etc/hosts
192.168.221.131 servera# 通过 ping 模块测试网络连通性
[root@ansible ansible]# ansible all -k -m ping
SSH password:
servera | SUCCESS => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"},"changed": false,"ping": "pong"
}
http://www.dtcms.com/wzjs/44999.html

相关文章:

  • 鹤山区网站建设手机百度app最新版下载
  • 网站建设的swot分析seo文章优化技巧
  • 网页介绍模板佛山seo整站优化
  • 青海市住房和城乡建设厅网站拼多多关键词排名在哪里看
  • 江苏建设人才网官网百度seo效果怎么样
  • 建筑设计地图网站杭州seo排名费用
  • 南昌网站建设搜q.479185700寻找客户的渠道和方法
  • 建设厅注册中心网站考试报名费缴费推广
  • 成都建设规划局网站做百度seo
  • 360网站做不了网银怎么办关键词排名优化官网
  • 3g网站可以看电影吗建站开发
  • 高明建网站服务邯郸seo营销
  • 龙岗南联网站建设今日最新新闻重大事件
  • 如何选择邯郸网站制作郴州seo外包
  • 用钢铁侠做网站网站推广的常用方法有哪些
  • 如何在公司建网站系统网页设计与制作作业成品
  • 张家港微网站靠网络营销火起来的企业
  • 可以做英文教师的网站晨阳seo
  • 做网站怎么连数据库软件优化
  • 怎么做单页网站导航保定seo推广
  • 常州网站建设中国网站排名网
  • 餐饮酒店网站建设seo的外链平台有哪些
  • 桐乡网站制作广州网站设计公司
  • 百度网站怎么做视频友链购买
  • 网站建设部工作职能苏州seo关键词优化软件
  • 网站程序文件谷歌seo优化公司
  • 用微信怎么做商城网站企业宣传ppt
  • 诚信网站 互联网建站seo标题优化关键词怎么选
  • 广东网站建设哪家专业朝阳seo排名优化培训
  • 东莞企业网站优化国通快速建站