# I am using ansible to collect the network device's dispaly cu, and in the collected content all the digit 1s are replaced with \*\*\*\*\*\*\*\*.

**URL:** <https://forum.ansible.com/t/i-am-using-ansible-to-collect-the-network-devices-dispaly-cu-and-in-the-collected-content-all-the-digit-1s-are-replaced-with/44696>\
**Category:** Get Help\
**Created:** [October 16, 2025, 7:39am UTC](https://forum.ansible.com/t/i-am-using-ansible-to-collect-the-network-devices-dispaly-cu-and-in-the-collected-content-all-the-digit-1s-are-replaced-with/44696 "2025-10-16T07:39:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![razerblade](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@razerblade](https://forum.ansible.com/u/razerblade)\
**Post date:** [October 16, 2025, 7:39am UTC](https://forum.ansible.com/t/i-am-using-ansible-to-collect-the-network-devices-dispaly-cu-and-in-the-collected-content-all-the-digit-1s-are-replaced-with/44696/1 "2025-10-16T07:39:37Z")

</div>

I am using ansible to collect the network device’s dispaly cu, and in the collected content all the digit 1s are replaced with \*\*\*\*\*\*\*\*. Is this a bug or a feature? How can I turn it off?

1. I did not define no\_log in my playbook
2. ansible version: 2.9.27
3. My custom module: using the paramiko library to log in to the network device, session.send to send commands, output = session.recv(2048).decode(“utf-8”, “replace”) to receive the device’s returned value.

```auto
---
- name: xunjian
  hosts: sw
  gather_facts: no
# become: true
# become_method: enable
  vars:
    skip_lldp_hosts:
      - "172.XXXXXXX"
  tasks:

    - name: get date
      local_action:
        module: raw date +"%Y-%m-%d"
      register: "current_date"
      
    - name: show_ip_all
      cyw_ssh_more:
        ip: "{{baoleiji_host}}"
        name: "{{ ansible_ssh_user}}"
        password: "{{ ansible_ssh_pass }}"
        enable: "0"
        enable_command: "enable"
        enable_password: "1"
        command: "disp curr"
        port: "{{ansible_ssh_port}}"
        type: "hw"
      delegate_to: localhost
      register: dis_curr

    - name: lldp
      cyw_ssh_more:
        ip: "{{baoleiji_host}}"
        name: "{{ ansible_ssh_user}}"
        password: "{{ ansible_ssh_pass }}"
        enable: "0"
        enable_command: "enable"
        enable_password: "1"
        command: "disp lldp nei"
        port: "{{ansible_ssh_port}}"
        type: "hw"
      delegate_to: localhost
      register: lldp
      when: inventory_hostname not in skip_lldp_hosts

    - name: ipv4mac
      cyw_ssh_more:
        ip: "{{baoleiji_host}}"
        name: "{{ ansible_ssh_user}}"
        password: "{{ ansible_ssh_pass }}"
        enable: "0"
        enable_command: "enable"
        enable_password: "1"
        command: "disp mac-address"
        port: "{{ansible_ssh_port}}"
        type: "hw"
      delegate_to: localhost
      register: ipv4mac

    - name: log
      set_fact:
        info_log:
          show_ip_all: "{{dis_curr.output}}"
          lldp: "{{lldp.output}}"
          ipv4mac: "{{ipv4mac.output}}"

    - name: save log_info to file
      append_file:
        flag: "{{hostname}} info_log:"
        content: "{{info_log}}"
        file_path: "/root/xunjian/sw_{{current_date.stdout_lines[0]}}.txt"
      delegate_to: localhost

```

- Set at least one tag (the experts follow the tags, so the right people will find you if you tag)

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [October 16, 2025, 7:41am UTC](https://forum.ansible.com/t/i-am-using-ansible-to-collect-the-network-devices-dispaly-cu-and-in-the-collected-content-all-the-digit-1s-are-replaced-with/44696/2 "2025-10-16T07:41:37Z")

</div>

Is your password for some reason maybe `1`? Or does the `cyw_ssh_more` module use `no_log=True` for `enable_password` in the argument spec? Without knowing what `cyw_ssh_more` is and what it does it’s hard to say…

---

<div class="post-metadata">

**Author:** ![razerblade](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@razerblade](https://forum.ansible.com/u/razerblade)\
**Post date:** [October 16, 2025, 9:12am UTC](https://forum.ansible.com/t/i-am-using-ansible-to-collect-the-network-devices-dispaly-cu-and-in-the-collected-content-all-the-digit-1s-are-replaced-with/44696/3 "2025-10-16T09:12:41Z")

</div>

I just found out that indeed the enablepass was set to 1, and it’s nolog. Thank you very much for your explanation!!!

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [October 16, 2025, 2:18pm UTC](https://forum.ansible.com/t/i-am-using-ansible-to-collect-the-network-devices-dispaly-cu-and-in-the-collected-content-all-the-digit-1s-are-replaced-with/44696/4 "2025-10-16T14:18:15Z")

</div>

If you set `no_log=True` because ansible-test complained that the argument didn’t have `no_log`, note that you can also set `no_log=False` to mark arguments that are not sensitive, but that trigger the ansible-test warning 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 15, 2025, 2:19pm UTC](https://forum.ansible.com/t/i-am-using-ansible-to-collect-the-network-devices-dispaly-cu-and-in-the-collected-content-all-the-digit-1s-are-replaced-with/44696/5 "2025-11-15T14:19:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
