Ssh 通过ansible yum在CentOS 7上安装Xfce
我有一台新启动的Centos 7机器,它是从Ssh 通过ansible yum在CentOS 7上安装Xfce,ssh,ansible,centos7,yum,Ssh,Ansible,Centos7,Yum,我有一台新启动的Centos 7机器,它是从Centos/7vagrant base box启动的。我通过ansible提供箱子,但以下不起作用: - name: Install xfce yum: name: "@^Xfce" state: present enablerepo: "epel" 错误是: 任务[桌面:安装xfce] **************************************************致命:[xxx]:失败!=>{“更
Centos/7
vagrant base box启动的。我通过ansible提供箱子,但以下不起作用:
- name: Install xfce
yum:
name: "@^Xfce"
state: present
enablerepo: "epel"
错误是:
任务[桌面:安装xfce]
**************************************************致命:[xxx]:失败!=>{“更改”:错误,
“更改”:{“已安装”:[“@^Xfce”]},“消息”:“错误:无事可做\n”,
“rc”:1,“结果”:[“加载的插件:FastTestMirror\n加载的镜像”
缓存主机文件的速度\n*base:mirror.ratiokontakt.de\n*epel:
mirror.de.leaseweb.net\n*附加:centos.schlundtech.de\n*更新:
centos.schlundtech.de\n组Xfce不存在。\n“]}
但是,在机器内部运行以下命令仍然有效:
sudo-yum--enablerepo=epel-y组安装“Xfce”
我做错了什么?根据:
Yum本身有两种类型的组。“包组”在rpm本身中指定,而“环境组”在单独的文件中指定(通常由发行版)。不幸的是,对于ansible用户来说,这种划分变得很明显,因为ansible需要在单个事务中对包组进行操作,并且以这种方式使用时,yum要求以不同的方式指定组。包组指定为“@开发工具”,环境组指定为“@^gnome桌面环境”。使用“yum group list hidden ids”命令查看要安装的组属于哪个组类别
您正在将组指定为@^Xfce
,这是“环境组”的语法,但如果查看yum-group-list-hidden-id
的输出,则不存在“Xfce”环境组。有一个同名的软件包组,此playbook似乎已成功安装:
---
- hosts: localhost
gather_facts: false
tasks:
- name: install xfce
yum:
name: "@Xfce"
state: "present"
enablerepo: "epel"
根据报告:
Yum本身有两种类型的组。“包组”在rpm本身中指定,而“环境组”在单独的文件中指定(通常由发行版)。不幸的是,对于ansible用户来说,这种划分变得很明显,因为ansible需要在单个事务中对包组进行操作,并且以这种方式使用时,yum要求以不同的方式指定组。包组指定为“@开发工具”,环境组指定为“@^gnome桌面环境”。使用“yum group list hidden ids”命令查看要安装的组属于哪个组类别
您正在将组指定为@^Xfce
,这是“环境组”的语法,但如果查看yum-group-list-hidden-id
的输出,则不存在“Xfce”环境组。有一个同名的软件包组,此playbook似乎已成功安装:
---
- hosts: localhost
gather_facts: false
tasks:
- name: install xfce
yum:
name: "@Xfce"
state: "present"
enablerepo: "epel"