title: get comment during iteration in ruamel.yaml
body: <p>How can I get the comments when I iterate through the YAML object</p>
  
  <pre><code>yaml = YAML()
  
  with open(path, 'r') as f:
      yaml_data = yaml.load(f)
  
  for obj in yaml_data:
      # how to get the comments here?
  </code></pre>
  
  <p>This is the source data (an ansible playbook)</p>
  
  <pre><code>---
  - name: gather all complex custom facts using the custom module
    hosts: switches
    gather_facts: False
    connection: local
    tasks:
      # There is a bug in ansible 2.4.1 which prevents it loading
      # playbook/group_vars
      - name: ensure we're running a known working version
        assert:
          that:
            - 'ansible_version.major == 2'
            - 'ansible_version.minor == 4'
  </code></pre>
  
  <p>After Anthon comments, this is the way I found to access the comments in the child nodes (needs to be refined):</p>
  
  <pre><code>for idx, obj in enumerate(yaml_data):
      for i, item in enumerate(obj.items()):
          pprint(yaml_data[i].ca.items)
  </code></pre>