xlab-si / xopera-opera

xOpera orchestrator compliant with TOSCA YAML v1.3 in the making
https://xlab-si.github.io/xopera-docs/
Apache License 2.0
35 stars 14 forks source link

Print debug output from a playbook #238

Closed abitrolly closed 2 years ago

abitrolly commented 2 years ago

I can't find a way to output debug info from a playbook.

Neither of this work.

- hosts: all
  gather_facts: false
  tasks:
  - name: Print all available facts
    ansible.builtin.debug:
      var: ansible_facts

  - name: Playbook debug
    debug:
      msg: "Amma printin'"

So it is hard to say which notebooks are being run and in which order.

anzoman commented 2 years ago

@abitrolly by default when deploying you will see which TOSCA operations are being executued and you will not get any ouput from xOpera TOSCA interface operation executors (=Ansible playbooks). So, to see exact Ansible playbook execution output you can use xOpera's debug mode (by using -v/--verbose flag) like this opera deploy --verbose service.yaml. The other way would be to use TOSCA ouptuts to extract variables during Ansible playbook execution and print them to standard output after the deployment with opera outputs CLI command (more about that is available here in our docs).