Ansible - Debug module

> Infrastructure as code > Ansible

1 - About

debug module

3 - Example

3.1 - One variable

tasks:
    - debug:
        var: test

3.2 - Several variable

tasks:
    - debug:
        var: item
      with_items: 
        - "{{ var1 }}"
        - "{{ var2 }}"

3.3 - Message

- name: 'Installation notes'
   vars:
      msg: |
        The installer is installed here:
             /tmp/install.dir.XXXXX/temp.lax
        A silent install command is started you can check it with the following command
            ps -ef | grep -i silent
 
        Logs can be found at
          * install log: /opt/informatica/1022/Informatica_10.2.2_Services_2019_08_28_15_52_09.log,
          * Console Redirections at install.log,
          * Error log are at /home/infa/silentErrorLog_....
 
        The silent installation is complete when the ervices_InstallLog<timestamp>.log file is created in the installation directory.
 
        The whole installation should not take more than 15 minutes.
    debug:
      msg: "{{ msg.split('\n') }}"
Advertising