自动化安装系统(三)

这篇具有很好参考价值的文章主要介绍了自动化安装系统(三)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Cobbler

简介

Cobbler是一款Linux生态的自动化运维工具,基于Python2开发,用于自动化批量部署安装操作系
统;其提供基于CLI的管理方式和WEB配置界面,其中WEB配置界面是基于Python2和Django框架开发。另外,cobbler还提供了API,方便二次开发。Cobbler属于C/S模型(客户端/服务器模型);

Cobbler主要用于快速网络安装linux操作系统,支持众多的Linux发行版如:Red Hat、Fedora、CentOS、Debian、Ubuntu和SuSE等,甚至支持windows的安装。

Cobbler实质是PXE的二次封装,将多种安装参数封装到一起,并提供统一的管理方法

Cobbler是在HTTP、TFTP、DHCP等各种服务的基础上进行相关操作的,实际安装的大体过程类似于基于PXE的网络安装:客户端(裸机)开机使用网卡引导启动,请求DHCP分配一个地址后从TFTP服务器获取启动文件,加载到客户端本地内存中运行,并显示出可安装的系统列表;在人为的选定安装的操作系统类型后,客户端会到HTTP服务器下载相应的系统安装文件并执行自动安装

工作原理

自动化安装系统(三),运维工具,# 系统部署,运维,linux

  • client裸机配置了从网络启动后,开机后会广播包请求DHCP服务器(cobbler server)发送其分配好的一个IP
  • DHCP服务器(cobbler server)收到请求后发送responese,包括其ip地址
  • client裸机拿到ip后再向cobbler server发送请求OS引导文件的请求
  • cobbler server告诉裸机OS引导文件的名字和TFTP server的ip和port
  • client裸机通过上面告知的TFTP server地址通信,下载引导文件
  • client裸机执行执行该引导文件,确定加载信息,选择要安装的os,期间会再向cobbler server请求kickstart文件和os image
  • cobbler server发送请求的kickstart和os iamge
  • client裸机加载kickstart文件
  • client裸机接收os image,安装该os image

相关文件

配置文件

/etc/cobbler/settings  #cobbler 主配置文件 
/etc/cobbler/iso/  #iso模板配置文件
/etc/cobbler/pxe   #pxe模板文件
/etc/cobbler/power  #电源配置文件 
/etc/cobbler/user.conf   #web服务授权配置文件 
/etc/cobbler/users.digest  #web访问的用户名密码配置文件 
/etc/cobbler/dhcp.template #dhcp服务器的的配置模板
/etc/cobbler/dnsmasq.template #dns服务器的配置模板
/etc/cobbler/tftpd.template  #tftp服务的配置模板
/etc/cobbler/modules.conf #cobbler模块的配置文件

数据目录

/var/lib/cobbler/config/     #用于存放distros,system,profiles 等信息的配置文件
/var/lib/cobbler/triggers/   #用于存放用户定义的cobbler命令
/var/lib/cobbler/kickstarts/  # 默认存放kickstart文件
/var/lib/cobbler/loaders/     #存放各种引导程序

镜像目录

/var/www/cobbler/ks_mirror/    #导入的发行版系统的所有数据
/var/www/cobbler/images/       #导入发行版kernel和initrd镜像用于远程网络启动
/var/www/cobbler/repo_mirror/   #yum 仓库存储目录

日志目录

/var/log/cobbler/installing  #客户端安装日志 
/var/log/cobbler/cobbler.log #cobbler日志

相关命令

cobbler check 核对当前设置是否有问题
cobbler list 列出所有的cobbler元素
cobbler report 列出元素的详细信息
cobbler sync 同步配置到数据目录,更改配置最好都要执行下
cobbler reposync 同步yum仓库
cobbler distro 查看导入的发行版系统信息,通过cobbler distro --help获取更多命令帮助
cobbler system 查看添加的系统信息
cobbler profile 查看配置信息

常见用法

#列出当前导入的linux发行版条目
cobbler distro list 
#报告当前所有的linux发行版详细信息
cobbler distro report 

#列出启动菜单条目
cobbler profile list

#导入系统源文件生成仓库。 实质是复制源镜像文件。
#--name指明镜像在cobbler中显示的目录名称,--paht指明源镜像文件路径,--arch指明架构,可选
#cobbler将系统yum源文件存放在 /var/www/cobbler/ks_mirror目录下
cobbler import --name=centos-8.0-x86_64 --path=/mnt --arch=x86_64


#新增启动菜单条目 并将linux发行版系统与其对应的ks文件建立关联。
#-- name指定新增的菜单条目,--distro指定发行版镜像,--kickstart指定自定义的ks文件
cobbler profile add --name=centos7 --distro=centos7-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks7.cfg 

#在导入发行版系统是会自动生成distro发行版列表,使用下面命令删除指定发行版条目再使用上面命令关联自定义的ks
cobbler profile remove --name=PROFILE_NAME

实验

centos7基于Cobbler实现系统自动化安装

环境

NAT模式,关闭vmware的DHCP功能

centos7(192.168.28.141),部署cobbler、dhcp、httpd、tftp

关闭firewalld和selinux

软件包:cobbler(cobbler包位于epel源中,安装时解决依赖会自动安装httpd、tftp)、dhcp

过程

在centos7上安装软件包

[root@localhost ~]# yum -y install cobbler dhcp
[root@localhost ~]# systemctl enable --now cobblerd httpd tftp dhcpd
Created symlink from /etc/systemd/system/multi-user.target.wants/cobblerd.service to /usr/lib/systemd/system/cobblerd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Created symlink from /etc/systemd/system/sockets.target.wants/tftp.socket to /usr/lib/systemd/system/tftp.socket.
Created symlink from /etc/systemd/system/multi-user.target.wants/dhcpd.service to /usr/lib/systemd/system/dhcpd.service.
Job for dhcpd.service failed because the control process exited with error code. See "systemctl status dhcpd.service" and "journalctl -xe" for details.
#DHCP未配置直接启动会报错

若发现 systemctl status cobblerd 服务启动了但有报错:cannot touch ‘/usr/share/cobbler/web/cobbler.wsgi’: No such file or directory,是因为没安装cobbler-web,可选

修改cobbler配置

#cobbler需要配置的提示信息
[root@localhost ~]# cobbler check
The following are potential configuration items that you may want to fix:

1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work.  This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
3 : change 'disable' to 'no' in /etc/xinetd.d/tftp
4 : Some network boot-loaders are missing from /var/lib/cobbler/loaders.  If you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot.
5 : enable and start rsyncd.service with systemctl
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : ksvalidator was not found, install pykickstart
8 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
9 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

Restart cobblerd and then run 'cobbler sync' to apply changes.

#修改 /etc/cobbler/settings
[root@localhost ~]# vim /etc/cobbler/settings
...
#指定cobbler服务器IP
server: 192.168.28.141
...
#指定tftp服务器IP
next_server: 192.168.28.141
...
#设置root加密后的密码,默认是cobbler,通过openssl passwd -数字 密码 生成加密后的密码
default_password_crypted: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac."
...
#默认0,cobbler不管dhcp,需要手动配置dhcp;现改为1,通过cobbler生成dhcp配置文件
manage_dhcp: 1
...

#再次运行cobbler check会发现提示信息发生变化
[root@localhost ~]# cobbler check
The following are potential configuration items that you may want to fix:

1 : change 'disable' to 'no' in /etc/xinetd.d/tftp
2 : Some network boot-loaders are missing from /var/lib/cobbler/loaders.  If you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot.
3 : enable and start rsyncd.service with systemctl
4 : debmirror package is not installed, it will be required to manage debian deployments and repositories
5 : ksvalidator was not found, install pykickstart
6 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
7 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

Restart cobblerd and then run 'cobbler sync' to apply changes.


#cobbler的DHCP模版文件,修改此文件cobbler会自动生成dhcp配置文件
[root@localhost ~]# vim /etc/cobbler/dhcp.template
...
subnet 192.168.28.0 netmask 255.255.255.0 {
     option routers             192.168.28.2;
     option domain-name-servers 180.76.76.76,223.5.5.5;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.28.145 192.168.28.149;
     default-lease-time         21600;
     max-lease-time             43200;
     next-server                $next_server;
     class "pxeclients" {
          match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
          if option pxe-system-type = 00:02 {
                  filename "ia64/elilo.efi";
          } else if option pxe-system-type = 00:06 {
                  filename "grub/grub-x86.efi";
          } else if option pxe-system-type = 00:07 {
                  filename "grub/grub-x86_64.efi";
          } else if option pxe-system-type = 00:09 {
                  filename "grub/grub-x86_64.efi";
          } else {
                  filename "pxelinux.0";
          }
     }

}
...

[root@wenzi ~]# systemctl restart cobblerd
[root@wenzi ~]# cobbler sync
#联网下载启动相关文件,会存放在 /var/lib/tftpboot/ 目录下
[root@localhost ~]# tree /var/lib/tftpboot/
/var/lib/tftpboot/
├── boot
│   └── grub
│       └── menu.lst
├── etc
├── grub
│   ├── efidefault
│   └── images -> ../images
├── images
├── images2
├── memdisk
├── menu.c32
├── ppc
├── pxelinux.0
├── pxelinux.cfg
│   └── default
└── s390x
    └── profile_list

10 directories, 7 files
[root@localhost ~]# cobbler get-loaders
No such command: get-loaders
踩坑:

执行cobbler get-loaders时,提示没有此命令。只需安装 yum -y install syslinux即可,No such command:get-loaders 可忽略。cobbler check 第二个警告翻译如下

2.Some network boot-loaders are missing from /var/lib/cobbler/loaders. If you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot

/var/lib/cobbler/loaders 中缺少一些网络引导加载器。如果您只想处理 x86/x86_64 网络引导,则可以确保已安装 syslinux 包的最新版本,并且可以完全忽略此消息。如果您想要支持所有体系结构,此目录中的文件应包括 pxelinux.0、menu.c32、elilo.efi 和 yaboot。

#修改启动菜单标题模版
[root@localhost ~]# vim /etc/cobbler/pxe/pxedefault.template
DEFAULT menu
PROMPT 0
# |后面是自定义标题
MENU TITLE Cobbler | WenZi Cobbler Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT $pxe_timeout_profile

LABEL local
        MENU LABEL (local)
        MENU DEFAULT
        LOCALBOOT -1

$pxe_menu_items

MENU end


[root@wenzi ~]# systemctl restart cobblerd
[root@wenzi ~]# cobbler sync
#查看自动生成的启动菜单
[root@localhost ~]# cat /var/lib/tftpboot/pxelinux.cfg/default
DEFAULT menu
PROMPT 0
MENU TITLE Cobbler | WenZi Cobbler Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL local
        MENU LABEL (local)
        MENU DEFAULT
        LOCALBOOT -1



MENU end


#导入系统镜像资源  虚拟机新加centos6/8 的镜像
[root@localhost ~]# mkdir /mnt/centos{6,7,8}
[root@localhost ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part
  ├─centos-root 253:0    0   17G  0 lvm  /
  └─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sr0              11:0    1  3.7G  0 rom
sr1              11:1    1  7.7G  0 rom
sr2              11:2    1  4.4G  0 rom
[root@localhost ~]# mount /dev/sr0 /mnt/centos6
[root@localhost ~]# mount /dev/sr2 /mnt/centos7
[root@localhost ~]# mount /dev/sr1 /mnt/centos8
#cobbler将系统yum源文件存放在 /var/www/cobbler/ks_mirror目录下
[root@localhost ~]# cobbler import --name=centos-8.2-x86_64 --path=/mnt/centos8 --arch=x86_64
[root@localhost ~]# cobbler import --name=centos-7.0-x86_64 --path=/mnt/centos7 --arch=x86_64
[root@localhost ~]# cobbler import --name=centos-6.8-x86_64 --path=/mnt/centos6 --arch=x86_64
#导入后重启、同步
[root@localhost ~]# systemctl restart cobblerd
[root@localhost ~]# cobbler sync
[root@localhost ~]# tree -d /var/www/cobbler/ks_mirror/
/var/www/cobbler/ks_mirror/
├── centos-6.8-x86_64
│   ├── EFI
│   │   └── BOOT
│   ├── images
│   │   └── pxeboot
│   ├── isolinux
│   ├── Packages
│   └── repodata
├── centos-7.0-x86_64
│   ├── EFI
│   │   └── BOOT
│   │       └── fonts
│   ├── images
│   │   └── pxeboot
│   ├── isolinux
│   ├── LiveOS
│   ├── Packages
│   └── repodata
├── centos-8.2-x86_64
│   ├── AppStream
│   │   ├── Packages
│   │   └── repodata
│   ├── BaseOS
│   │   ├── Packages
│   │   └── repodata
│   ├── EFI
│   │   └── BOOT
│   │       └── fonts
│   ├── images
│   │   └── pxeboot
│   └── isolinux
└── config

32 directories
#查看以导入的发行版信息
[root@localhost ~]# cobbler distro list
   centos-6.8-x86_64
   centos-7.0-x86_64
   centos-8.2-x86_64
#此时已经自动生成启动菜单文件,已关联ks文件
[root@localhost ~]# vim /var/lib/tftpboot/pxelinux.cfg/default
DEFAULT menu
PROMPT 0
MENU TITLE Cobbler | WenZi Cobbler Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL local
        MENU LABEL (local)
        MENU DEFAULT
        LOCALBOOT -1

LABEL centos-6.8-x86_64
        kernel /images/centos-6.8-x86_64/vmlinuz
        MENU LABEL centos-6.8-x86_64
        append initrd=/images/centos-6.8-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.28.141/cblr/svc/op/ks/profile/centos-6.8-x86_64
        ipappend 2

LABEL centos-7.0-x86_64
        kernel /images/centos-7.0-x86_64/vmlinuz
        MENU LABEL centos-7.0-x86_64
        append initrd=/images/centos-7.0-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.28.141/cblr/svc/op/ks/profile/centos-7.0-x86_64
        ipappend 2

LABEL centos-8.2-x86_64
        kernel /images/centos-8.2-x86_64/vmlinuz
        MENU LABEL centos-8.2-x86_64
        append initrd=/images/centos-8.2-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.28.141/cblr/svc/op/ks/profile/centos-8.2-x86_64
        ipappend 2



MENU end




#若使用自定义ks应答文件,则如下
#将写好的ks应答文件复制到 /var/lib/cobbler/kickstarts目录下
[root@localhost ~]# ls
anaconda-ks.cfg  centos6_ks.cfg  centos7_ks.cfg  centos8_ks.cfg
[root@localhost ~]# cp centos* /var/lib/cobbler/kickstarts/
#将ks文件中 url  改为 url --url=$tree
[root@localhost ~]# vim /var/lib/cobbler/kickstarts/centos6_ks.cfg
[root@localhost ~]# vim /var/lib/cobbler/kickstarts/centos7_ks.cfg
[root@localhost ~]# vim /var/lib/cobbler/kickstarts/centos8_ks.cfg
#删除导入镜像时自动生成的发行版条目(菜单选项)
[root@localhost ~]# cobbler profile remove --name=centos-8.2-x86_64
[root@localhost ~]# cobbler profile remove --name=centos-7.0-x86_64
[root@localhost ~]# cobbler profile remove --name=centos-6.8-x86_64
[root@localhost ~]# cobbler profile list
#新增6/7/8的启动菜单并将各自镜像与各自ks文件对应
[root@localhost ~]# cobbler profile add --name=centos6_wenzi --distro=centos-6.8-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos6_ks.cfg
[root@localhost ~]# cobbler profile add --name=centos7_wenzi --distro=centos-7.0-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos7_ks.cfg
[root@localhost ~]# cobbler profile add --name=centos8_wenzi --distro=centos-8.2-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos8_ks.cfg
#启动菜单列表
[root@localhost ~]# cobbler profile list
   centos6_wenzi
   centos7_wenzi
   centos8_wenzi
#镜像列表
[root@localhost ~]# cobbler distro list
   centos-6.8-x86_64
   centos-7.0-x86_64
   centos-8.2-x86_64
[root@localhost ~]# systemctl restart cobblerd
[root@localhost ~]# cobbler sync
#查看菜单配置
[root@localhost ~]# cat /var/lib/tftpboot/pxelinux.cfg/default
DEFAULT menu
PROMPT 0
MENU TITLE Cobbler | WenZi Cobbler Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL local
        MENU LABEL (local)
        MENU DEFAULT
        LOCALBOOT -1

LABEL centos6_wenzi
        kernel /images/centos-6.8-x86_64/vmlinuz
        MENU LABEL centos6_wenzi
        append initrd=/images/centos-6.8-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.28.141/cblr/svc/op/ks/profile/centos6_wenzi
        ipappend 2

LABEL centos7_wenzi
        kernel /images/centos-7.0-x86_64/vmlinuz
        MENU LABEL centos7_wenzi
        append initrd=/images/centos-7.0-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.28.141/cblr/svc/op/ks/profile/centos7_wenzi
        ipappend 2

LABEL centos8_wenzi
        kernel /images/centos-8.2-x86_64/vmlinuz
        MENU LABEL centos8_wenzi
        append initrd=/images/centos-8.2-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.28.141/cblr/svc/op/ks/profile/centos8_wenzi
        ipappend 2



MENU end
#查看详细信息
[root@localhost ~]# cobbler report

测试

自动化安装系统(三),运维工具,# 系统部署,运维,linux

踩坑:

自动安装centos8时出现问题,在下载文件页面停留两三分钟

自动化安装系统(三),运维工具,# 系统部署,运维,linux

然后出现报错,感觉是没找到kickstart文件

dracut- initqueue:Warning:dracut- initqueue timeout - starting timeout scripts

自动化安装系统(三),运维工具,# 系统部署,运维,linux

查看 /var/lib/tftpboot/pxelinux.cfg/default 中centos8的ks文件地址 ks=http://192.168.28.141/cblr/svc/op/ks/profile/centos8_wenzi ,通过浏览器访问发现无法正常查看ks文件内容,网页提示

# This kickstart had errors that prevented it from being rendered correctly.
# The cobbler.log should have information relating to this failure.

查看日志 /var/log/cobbler/cobbler.log ,与语言字符有关。

自动化安装系统(三),运维工具,# 系统部署,运维,linux

在安装centos8时,使用的是自动化安装系统(二)_笔落_惊风雨的博客-CSDN博客中的ks文件,包含中文注释,把中文部分删除,systemctl restart cobbler,重新生成配置 cobbler sync,就成功了。文章来源地址https://www.toymoban.com/news/detail-671604.html

到了这里,关于自动化安装系统(三)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 从小白到大神之路之学习运维第60天--------Ansible自动化运维工具(安装、操作、简单使用,模块的作用)

    第三阶段基础 时  间:2023年7月13日 参加人:全班人员 内  容: Ansible自动化运维工具 目录 一、Ansible概述 二、Ansible特点 三、Ansible应用 (一)使用者 (二)Ansible工具集合 (三)作用对象 四、Ansible的搭建 五、Ansible配置 六、Ansible命令 (一)ansible (二)Ansible-doc (三)

    2024年02月16日
    浏览(42)
  • 基于云计算的自动化部署与自动化运维:提高运维效率

    作者:禅与计算机程序设计艺术 随着互联网技术的飞速发展,网站流量日益增长,用户对网站功能及其可用性的需求也越来越高,越来越多的人开始担忧网站的安全和稳定性。因此,如何快速、准确地处理网站故障、迅速恢复网站服务并保障网站高可用,成为企业必须重点关

    2024年02月11日
    浏览(31)
  • ansible自动化IT工具安装部署与使用验证

    目录 一、环境配置 1、关闭防火墙 2、免密登录配置 3、同步时区 二、服务端配置 1、安装软件 2、查看版本  3、实现远程控制huyang3  4、测试  结果验证: systemctl stop firewalld iptables -F setenforce0 【huyang3】ssh-keygen 【huyang3】ssh-copy-id 192.168.1.116 ntpdate huyang1 yum -y install ansible ansi

    2024年02月11日
    浏览(34)
  • Ansible自动化运维工具

    Ansible是一个基于Python开发的配置管理和应用部署工具,现在也在自动化管理领域大放异彩。它融合了众多老牌运维工具的优点,Pubbet和Saltstack能实现的功能,Ansible基本上都可以实现。 ansible 自动化运维工具(机器管理工具) 可以实现批量管理多台(成百上千)主机,应用级

    2024年02月14日
    浏览(34)
  • Ansible 自动化运维工具

    目录 一: Ansible 简介   Ansible与其他自动化运维工具对比  二: ansible 环境安装部署   三:ansible 命令行模块 1、command 模块 2、 shell 模块 3、 cron 模块 4、 user 模块 5、 group 模块  6、copy 模块 7、 file 模块  8、hostname 模块 9、ping 模块 10、 yum 模块 11、 service/systemd 模块

    2024年02月15日
    浏览(30)
  • 自动化运维工具—Ansible

    Ansible是一个基于Python开发的配置管理和应用部署工具,现在也在自动化管理领域大放异彩。它融合了众多老牌运维工具的优点,Pubbet和Saltstack能实现的功能,Ansible基本上都可以实现。 市面上其他自动化工具:pupet(ruby语言) saltstack(python) chef(C/S模式)等 Ansible能批量配

    2024年02月10日
    浏览(33)
  • 自动化运维工具——Ansible

    Ansible是一个基于Python开发的配置管理和应用部署工具,现在也在自动化管理领域大放异彩。它融合了众多老牌运维工具的优点,Pubbet和Saltstack能实现的功能,Ansible基本上都可以实现。 Ansible能批量配置、部署、管理上千台主机。比如以前需要切换到每个主机上执行的一或多个

    2024年02月14日
    浏览(36)
  • 自动化运维工具之Ansible

    Ansible是一个基于Python开发的配置管理和应用部署工具,现在也在自动化管理领域大放异彩。它融合了众多老牌运维工具的优点,Pubbet和Saltstack能实现的功能,Ansible基本上都可以实现。 Ansible能批量配置、部署、管理上千台主机。比如以前需要切换到每个主机上执行的一或多个

    2024年02月08日
    浏览(54)
  • Ansible自动化运维工具的认识

    目录 一、Ansible概述 二、Ansible特点 三、Ansible应用 1、使用者 2、Ansible工具集合 3、作用对象 四、Ansible的搭建 1、实验环境 2、环境准备 Ansible: 3、创建ssh免密交互登录 client端环境准备 五、Ansible配置 六、Ansible命令 1、ansible 实验案例: 1.检查所有主机是否存活 2.列出Rich组中

    2024年02月16日
    浏览(32)
  • Ansible自动化运维工具---Playbook

    playbook是剧本的意思,通过 task 调用 ansible 的模块将多个 play 组织在一 个playbook中运行。 playbook各部分组成 : Tasks : 任务,即调用模块完成的某操作 Variables : 变量 emplates : 模板 Handlers : 处理器,当某条件满足时,触发执行的操作 Roles : 角色 playbook yaml语法 是换行空两格,-和

    2024年02月03日
    浏览(30)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包