title: Remove u' from ansible output
body: <p>Having an issue with the output I am getting from running my playbook.
  How can I turn the debug output - <code>H/W Version     : 1.0</code> into <code>HW Version: 1.0</code></p>
  
  <p>and how can I clean up the output file to remove the u' and []</p>
  
  <pre><code>more /tmp/sw-facts
  </code></pre>
  
  <p><code>Hostname: switch Version: 5.2(1)N1(3)  Hardware: [u'H/W Version     : 1.0'] Serial: 000000000</code></p>
  
  <blockquote>
    <p>PLAY [Research] </p>
    
    <p>TASK [Stage 1 gathering version &amp; HW info] 
    ok: [switch]</p>
    
    <p>TASK [Stage 2 collect ansible facts] 
    ok: [switch]</p>
    
    <p>TASK [Stage 3 validating output from network device] 
    ok: [switch] =>
      msg:
      - - 'H/W Version     : 1.0'
      - 5.2(1)N1(3)</p>
    
    <p>TASK [write some facts to disk after formatting] 
    ok: [switch]</p>
  </blockquote>
  
  <pre><code>---
  # This playbook will retrieve version &amp; hw info from Nexus switches 
  - name: Research
    hosts: lab
    gather_facts: false
    tasks:
  
      - name: Stage 1 gathering version &amp; HW info
        nxos_command:
          commands:
            - "show sprom sup | inc 'H/W Version'"
        register: output
  
      - name: Stage 2 collect ansible facts
        nxos_facts:
          gather_subset: hardware
        register: version
  
      - name: Stage 3 validating output from network device
        debug:
          msg:
            - "{{ output.stdout }}"
            - "{{ ansible_net_version }}"
  
      - name: write some facts to disk after formatting
        copy:
          content: |
            #jinja2: lstrip_blocks: True
              {% for host in groups['lab'] if hostvars[host]['ansible_net_hostname'] is defined %}
              Hostname: {{ hostvars[host].ansible_net_hostname }} Version: {{ hostvars[host].ansible_net_version }}  Hardware: {{ hostvars[host].output.stdout }} Serial: {{ hostvars[host].ansible_ne$
              {% endfor %}
          dest: /tmp/sw-facts
        run_once: yes
  </code></pre>
  
  <p>thank you in advance for any help</p>