morla
morla

Reputation: 755

how to display a message in ansible

I'm trying to debug the ansible_hostname variable in order to have the names of the different hosts to display.

unfortunately I am unable for the moment to display the value of the variable even the name I wrote in the task (:

- name: display variable 
  debug: 
    msg: "value variable  {{ ansible_hostname }}"
    verbosity: 4 
  tags:
     - attrest

do i ve to add a parameters in my playbook or in other files ?

Upvotes: 1

Views: 1604

Answers (1)

user5879853
user5879853

Reputation:

msg: value variable  "{{ ansible_hostname }}"

Parenthesis to add in the playbook where variable is used

Upvotes: 1

Related Questions