Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 通过ansible获取yum更新列表失败_Linux_Ansible_Yum - Fatal编程技术网

Linux 通过ansible获取yum更新列表失败

Linux 通过ansible获取yum更新列表失败,linux,ansible,yum,Linux,Ansible,Yum,味精: 在2.7.5版本上也有相同的问题。这似乎是缩进错误寄存器必须与yum位于同一列 ansible --version ansible 2.6.5 请将yml内容格式化为代码,以便我们可以看到您剧本的实际格式。 Unsupported parameters for (yum) module: register Supported parameters include: allow_downgrade, bugfix, conf_file, disable_gpg_check, disa

味精:


2.7.5版本上也有相同的问题。

这似乎是缩进错误<代码>寄存器
必须与
yum位于同一列

ansible --version
ansible 2.6.5

请将
yml
内容格式化为代码,以便我们可以看到您剧本的实际格式。
Unsupported parameters for (yum) module: register Supported parameters 
include: allow_downgrade, bugfix, conf_file, disable_gpg_check, 
disable_plugin, disablerepo, enable_plugin, enablerepo, exclude, 
install_repoquery, installroot, list, name, security, skip_broken, state, 
update_cache, update_only, validate_certs

to retry, use:
ansible --version
ansible 2.6.5
- hosts: all
  gather_facts: false
  become: yes
  user: username

  tasks:
  - name: List Available Patches (Non-Kernel)
    yum:
      list: updates
      update_cache: true
      exclude: kernel*
    register: yumoutput

  - debug: msg="{{ inventory_hostname}} {{ yumoutput.results }}"