---
- name: Configure hostname on NXOS device
  vars:
    ansible_connection: ansible.netcommon.network_cli
  ansible.netcommon.cli_config:
    config: |
      hostname foo
      feature nxapi

- name: Apply configuration from file using inline lookup
  ansible.netcommon.cli_config:
    config: "{{ lookup('ansible.builtin.template', 'basic/config_src_recommended.j2') }}"

- name: Remove Loopback998
  ansible.netcommon.cli_config:
    config: |
      no interface Loopback998
