且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Ansible apt-get 安装输出

更新时间:2023-02-02 20:39:25

您可以将 apt 模块执行的输出注册到一个变量中,然后将其打印出来.

You can register to a variable the output of the apt module execution and then print it.

- hosts: localhost
  sudo: true
  tasks:
    - name: get vi
      apt: state=latest name=vim
      register: aptout

    # show the content of aptout var
    - debug: var=aptout