ansible/test/integration
Micah Hunsberger 26d9341891 Add new windows module: win_hosts (#46450)
* Add win_hosts module

added win_hosts module for easier manipulation of hosts entries in "%windir%\system32\drivers\etc\hosts" for windows systems

* Update win_hosts.py

* Add alias support to win_hosts module (#1)

* win_hosts supports aliases

added support for adding / removing aliases from a host entry, rather than adding a new entry

added ability for win_hosts to detect aliases:
`192.168.1.1 alias1 alias2 alias3`
```
win_hosts:
  host_name: alias2
  ip_address: 192.168.1.1
```
will result in `192.168.1.1 alias1 alias3`

also includes `replace` and `add` as options for `ip_action` (`replace` is default)

for example:
```
192.168.1.1 my_reused_alias
192.168.1.2 my_reused_alias
```
with
```
win_hosts:
  host_name: my_reused_alias
  ip_address: 192.168.1.3
  ip_action: add
```
the result will be
```
192.168.1.1 my_reused_alias
192.168.1.2 my_reused_alias
```
but with `ip_action=replace` the result would be
```
192.168.1.3 my_reused_alias
```

* fixed metadata version and version added

* fix line endings

* upload fixed line endings

try to upload the file with the fixed line endings

* aliases and canonical names are separate entities. added IPv4 and IPv6 validation

* only makes changes if "check_mode" is false

* improved behavior for duplicate aliases/entries.

* adding tests

* missing aliases file

* fix trailing whitespace and uses explicit paths

* Tweak tests to copy and restore original hosts file
2019-04-01 06:54:05 +10:00
..
host_vars
targets Add new windows module: win_hosts (#46450) 2019-04-01 06:54:05 +10:00
cloud-config-aws.ini.template
cloud-config-azure.ini.template
cloud-config-cloudscale.ini.template
cloud-config-cs.ini.template
cloud-config-gcp.ini.template
cloud-config-gitlab.ini.template
cloud-config-hcloud.ini.template
cloud-config-hwc.yml.template cloud: huawei: Add new module hwc_network_vpc (#54102) 2019-03-30 17:20:54 +01:00
cloud-config-opennebula.ini.template
cloud-config-openshift.kubeconfig.template
cloud-config-tower.ini.template
cloud-config-vultr.ini.template
integration.cfg
integration_config.yml
inventory
inventory.networking.template
inventory.remote.template
inventory.winrm.template
network-integration.cfg
target-prefixes.network
windows-integration.cfg