Skip to content

Commit a80a43f

Browse files
author
Andrew J Huffman
committed
Updated documentation format.
1 parent f169446 commit a80a43f

File tree

1 file changed

+48
-42
lines changed

1 file changed

+48
-42
lines changed

README.md

Lines changed: 48 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,58 @@
1-
ahuffman.resolv
2-
=========
3-
1+
# ahuffman.resolv
42
An Ansible role to configure /etc/resolv.conf
53

6-
Role Variables
7-
--------------
8-
4+
## Role Variables
95
### Defaults
10-
* resolv_nameservers: ''
11-
A list of up to 3 nameservers
12-
13-
* resolv_domain: ''
14-
Local domain name
15-
16-
* resolv_search: ''
17-
List of up to 6 domains to search for host-name lookup
18-
19-
* resolv_sortlist: ''
20-
List of IP-address and netmask pairs to sort addresses returned by gethostbyname.
21-
22-
* resolv_options: ''
23-
List of options to modify certain internal resolver variables.
24-
25-
26-
Example Playbook
27-
----------------
28-
29-
- hosts: all
6+
| Variable Name | Required | Description | Default Value | Type |
7+
| --- | :---: | --- | :---: | :---: |
8+
|resolv_nameservers| yes | A list of up to 3 nameserver IP addresses | [] | list |
9+
| resolv_domain | no | Local domain name | "" | string |
10+
| resolv_search | no | List of up to 6 domains to search for host-name lookup | [] | list |
11+
| resolv_sortlist | no | List of IP-address and netmask pairs to sort addresses returned by gethostbyname. | [] | list |
12+
| resolv_options | no | List of options to modify certain internal resolver variables. | [] | list |
13+
14+
15+
## Example Playbooks
16+
### Role Invocation
17+
```yaml
18+
- name: "Role Invocation - ahuffman.resolv Example"
19+
hosts: "all"
20+
roles:
21+
- role: "ahuffman.resolv"
22+
resolv_nameservers:
23+
- "8.8.8.8"
24+
- "8.8.4.4"
25+
resolv_domain: "foo.org"
26+
resolv_search:
27+
- "foo.bar"
28+
- "foobar.com"
29+
resolv_options:
30+
- "timeout:2"
31+
- "rotate"
32+
```
33+
### Included Role
34+
```yaml
35+
---
36+
- name: "Included Role - ahuffman.resolv Example"
37+
hosts: "all"
38+
tasks:
39+
- name: "Configure resolv.conf"
40+
include_role:
41+
name: "ahuffman.resolv"
3042
vars:
3143
resolv_nameservers:
32-
- 8.8.8.8
33-
- 8.8.4.4
34-
resolv_domain: foo.org
44+
- "8.8.8.8"
45+
- "8.8.4.4"
46+
resolv_domain: "foo.org"
3547
resolv_search:
36-
- foo.bar
37-
- foobar.com
48+
- "foo.bar"
49+
- "foobar.com"
3850
resolv_options:
39-
- timeout:2
40-
- rotate
41-
roles:
42-
- ahuffman.resolv
43-
44-
License
45-
-------
46-
51+
- "timeout:2"
52+
- "rotate"
53+
```
54+
## License
4755
[MIT](LICENSE)
4856
49-
Author Information
50-
------------------
51-
57+
## Author Information
5258
[Andrew J. Huffman](https://github.com/ahuffman)

0 commit comments

Comments
 (0)