Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure multi-line banner using dellemc.os10 #174

Open
bsyingst83 opened this issue Jul 1, 2024 · 1 comment
Open

Configure multi-line banner using dellemc.os10 #174

bsyingst83 opened this issue Jul 1, 2024 · 1 comment

Comments

@bsyingst83
Copy link

SUMMARY

Unable to find documentation for configuring a multi-line banner using dellemc.os10

ISSUE TYPE
  • Documentation Report
COMPONENT NAME

os10_config module, or maybe os10_copy_config role? There don't seem to be any roles that specifically configure a banner

ANSIBLE VERSION
ansible [core 2.16.3]
  config file = /home/ansible/Frontier/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.12/site-packages/ansible
  ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.12.1 (main, Feb 21 2024, 10:25:11) [GCC 8.5.0 20210514 (Red Hat 8.5.0-21)] (/usr/bin/python3.12)
  jinja version = 3.1.2
  libyaml = True

@sanderploegsma
Copy link

Just to weigh in here, I tried setting a motd banner using dellemc.os10.os10_config using the playbook below, but that eventually times out, probably because the first config line is somewhat interactive:

# configure-motd.yml
---
- name: Configure MOTD banner
  hosts: l3_switches
  tasks:
    - name: Gather OS10 facts
      dellemc.os10.os10_facts:
        gather_subset:
          - config
        register: os10_facts
    - name: Set motd banner
      dellemc.os10.os10_config:
        lines:
          - banner motd %
          - "{{ inventory_hostname }} - {{ os10_facts.ansible_facts.ansible_net_model }}"
          - "WARNING: This system configuration is managed by Ansible, do not edit by hand!"
          - "%"

So it seems like os10_config isn't the way to go here, so I'd appreciate another way to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants