All Projects → ahuffman → ansible-resolv

ahuffman / ansible-resolv

Licence: MIT license
Ansible role to configure /etc/resolv.conf

Programming Languages

Jinja
831 projects

Projects that are alternatives of or similar to ansible-resolv

Graylog Ansible Role
Ansible role which installs and configures Graylog
Stars: ✭ 173 (+293.18%)
Mutual labels:  ansible-role
Rhel7 Stig
Ansible role for Red Hat 7 STIG Baseline
Stars: ✭ 230 (+422.73%)
Mutual labels:  ansible-role
ansible-role-virtualbox
Ansible Role - Installs headless Virtualbox and phpVirtualbox for remote access through Web GUI
Stars: ✭ 14 (-68.18%)
Mutual labels:  ansible-role
Rbenv
Ansible role for installing rbenv.
Stars: ✭ 187 (+325%)
Mutual labels:  ansible-role
Ansible Datadog
Ansible role for Datadog Agent
Stars: ✭ 223 (+406.82%)
Mutual labels:  ansible-role
Rvm1 Ansible
The official ansible RVM role to install and manage your Ruby versions.
Stars: ✭ 246 (+459.09%)
Mutual labels:  ansible-role
Ansible Relayor
An Ansible Role for Tor Relay Operators
Stars: ✭ 165 (+275%)
Mutual labels:  ansible-role
ansible-role-github-users
Ansible Role - GitHub Users
Stars: ✭ 49 (+11.36%)
Mutual labels:  ansible-role
Ansible Role Awx
Ansible Role - AWX
Stars: ✭ 228 (+418.18%)
Mutual labels:  ansible-role
kafka role
Ansible role to install Apache Kafka
Stars: ✭ 18 (-59.09%)
Mutual labels:  ansible-role
Ansible Vault
🔑 Ansible role for Hashicorp Vault
Stars: ✭ 189 (+329.55%)
Mutual labels:  ansible-role
Ansible Role Unattended Upgrades
Setup unattended-upgrades on Debian-based systems
Stars: ✭ 220 (+400%)
Mutual labels:  ansible-role
UBUNTU20-CIS
Ansible role for Ubuntu 2004 CIS Baseline
Stars: ✭ 136 (+209.09%)
Mutual labels:  ansible-role
Ansible Role Wireguard
Ansible role for installing WireGuard VPN. Supports Ubuntu, Debian, Archlinx, Fedora and CentOS.
Stars: ✭ 176 (+300%)
Mutual labels:  ansible-role
ansible-cloudflared
Install cloudflared and systemd service for DNS-Over-HTTPS
Stars: ✭ 18 (-59.09%)
Mutual labels:  ansible-role
Nexus3 Oss
Ansible role to install and provision sonatype nexus3-oss
Stars: ✭ 169 (+284.09%)
Mutual labels:  ansible-role
Ansible Playbook Grapher
A command line tool to create a graph representing your Ansible playbook tasks and roles
Stars: ✭ 234 (+431.82%)
Mutual labels:  ansible-role
ansible-role-cardano-node
Ansible role for the provisioning of Shelly Cardano binaries from source.
Stars: ✭ 20 (-54.55%)
Mutual labels:  ansible-role
RHEL8-STIG
Ansible role for Red Hat 8 STIG Baseline
Stars: ✭ 73 (+65.91%)
Mutual labels:  ansible-role
ansible-role-tailscale
Ansible role to install and configure a Tailscale node.
Stars: ✭ 189 (+329.55%)
Mutual labels:  ansible-role

Ansible Role

ahuffman.resolv

An Ansible role to configure /etc/resolv.conf

Role Variables

Defaults

Variable Name Required Description Default Value Type
resolv_nameservers yes A list of up to 3 nameserver IP addresses [] list
resolv_domain no Local domain name "" string
resolv_search no List of up to 6 domains to search for host-name lookup [] list
resolv_sortlist no List of IP-address and netmask pairs to sort addresses returned by gethostbyname. [] list
resolv_options no List of options to modify certain internal resolver variables. [] list

Example Playbooks

Role Invocation

    - name: "Role Invocation - ahuffman.resolv Example"
      hosts: "all"
      roles:
        - role: "ahuffman.resolv"
          resolv_nameservers:
            - "8.8.8.8"
            - "8.8.4.4"
          resolv_domain: "foo.org"
          resolv_search:
            - "foo.bar"
            - "foobar.com"
          resolv_options:
            - "timeout:2"
            - "rotate"

Role Invocation with externaly defined variables (group_vars / host_vars)

    - name: "Role Invocation - ahuffman.resolv Example"
      hosts: "all"
      roles:
        - role: "ahuffman.resolv"
          when:
            - resolv_nameservers is defined
            - resolv_nameservers | length > 0

Included Role

---
- name: "Included Role - ahuffman.resolv Example"
  hosts: "all"
  tasks:
    - name: "Configure resolv.conf"
      include_role:
        name: "ahuffman.resolv"
      vars:
        resolv_nameservers:
          - "8.8.8.8"
          - "8.8.4.4"
        resolv_domain: "foo.org"
        resolv_search:
          - "foo.bar"
          - "foobar.com"
        resolv_options:
          - "timeout:2"
          - "rotate"

License

MIT

Author Information

Andrew J. Huffman

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].