当前位置:网站首页>CE第二次作业
CE第二次作业
2022-06-29 22:47:00 【Hanhan|】
创建一个 shell 脚本名为 adhoc.sh 用以运行 ad-hoc 命令 . 为每个受控节点配罝 yum仓库.
要求如下:
仓库1 :
Name: RH294_Base
Description: RH294 base software
Baseurl: http://content.example.com/rhel8.0/x86_64/dvd/BaseOS
需要验证钦件包 GPG 签名
GPG key 在: /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
启用此软件仓库
-仓库 2:
Name: RH294_Stream
Description : RH294 stream software
Baseurl: http://content.example.com/rhel8.0/x86_64/dvd/AppStream
需要验证软件包 GPG 签名
GPG key 在: /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
启用此软件仓库
配置思路:
1.配置yum源应该用什么模块
#ansible-doc -l | grep yum
yum Manages packa...
yum_repository Add or remove...
2.查看yum_repository模块的使用帮助
yum_repository:
name: epel
description: EPEL YUM repo
baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$ba>
gpgcheck: no
编辑shell脚本
ansible dev -m yum_repository \
> -a 'name="RH294_Base" \
> description="RH294 base software" \
> baseurl=http://content.example.com/rhel8.0/x86_64/dvd/BaseOS \
> gpgcheck=yes \
> gpgkey=/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release \
> enabled=yes'
servera | CHANGED => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": true,
"repo": "RH294_Base",
"state": "present"
}
执行脚本
[[email protected] ansible]$ chmod +x adhoc.sh
[[email protected] ansible]$ ./adhoc.sh

边栏推荐
- Processing of error b6267342 reported by AIX small machine in production environment
- 自己收藏的一些网址
- How to use filters in jfinal to monitor Druid for SQL execution?
- Does rapid software delivery really need to be at the cost of security?
- Cloud native enthusiast weekly: cool collection of grafana monitoring panels
- STM32 basic knowledge points
- Basic use of Nacos configuration center
- 论文阅读《Large-Scale Direct SLAM with Stereo Cameras》
- Mysql database: use the show profile command to analyze performance
- Go zero micro Service Practice Series (VII. How to optimize such a high demand)
猜你喜欢

wirehark数据分析与取证infiltration.pacapng

5-1 system vulnerability scanning

error: C2665: “QMessageBox::critical”: 4 个重载中没有一个可以转换所有参数类型

80-Redis详解

Number theory - division and blocking
![Realizing deep learning framework from zero -- LSTM from theory to practice [theory]](/img/ac/164140eff1a6518d49ce25599d9c7b.png)
Realizing deep learning framework from zero -- LSTM from theory to practice [theory]

2022年PMP项目管理考试敏捷知识点(5)

constexpr 函数

还天天熬夜加班做报表?其实你根本不懂如何高效做报表

Touch key and key control corresponding LED status reversal
随机推荐
VS无法定位程序输入点于动态链接库
Arrange the array into the smallest number_ Reverse pairs in an array (merge Statistics)_ Number of occurrences of a number in an ascending array_ Ugly number (Sword finger offer)
How tcpdump filters specific TCP flag bits
Conceptual understanding of deep learning (notes)
Problem solving metauniverse, multi communication scheme in online games
Vs cannot locate program input point to DLL
STM32基础知识点
leetcode 416. Partition Equal Subset Sum 分割等和子集(中等)
Cloud native enthusiast weekly: cool collection of grafana monitoring panels
PROJECT #1 - BUFFER POOL [CMU 15-445645]笔记
The server quickly sets up the alist integrated network disk website [pagoda panel one click deployment of alist]
Wechat applet: picture seconds plus watermark generation
Qdomdocument and qdomnode are used in QT to read XML
Code sharing for making and developing small programs on the dating platform
5-2web application vulnerability scanning
什么是IGMP?IGMP与ICMP有啥区别?
云原生爱好者周刊:炫酷的 Grafana 监控面板集合
uniapp复制内容到剪贴板
Talk about auto in MySQL in detail_ What is the function of increment
Is it safe to open an account on the flush? Where to apply for opening an account