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

Let ucs_dns take in multiple DNS servers #36

Open
vallard opened this issue Feb 20, 2018 · 1 comment
Open

Let ucs_dns take in multiple DNS servers #36

vallard opened this issue Feb 20, 2018 · 1 comment

Comments

@vallard
Copy link
Member

vallard commented Feb 20, 2018

Currently the DNS module only allows one DNS server, but we would like to allow a list of DNS servers so more than one could be added in a single task, similar to how we do with mac pools.

@SDBrett
Copy link
Contributor

SDBrett commented Jun 7, 2018

You can add multiple DNS servers in a task using with_items

dns_servers:
  - name: 2.2.2.2
    descr: Ansible managed DNS
    state: present
  - name: 1.1.1.1
    descr: Ansible managed DNS
    state: present

- name: set dns
  cisco_ucs_dns:
    name: "{{item.name}}"
    descr: "{{item.descr}}"
    state: "{{item.state}}"
    ucs_ip: "{{ucs_ip}}"
    ucs_username: "{{ucs_username}}"
    ucs_password: "{{ucs_password}}"
  with_items: "{{ dns_servers }}"

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