mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-30 08:50:55 +08:00
19 lines
526 B
YAML
19 lines
526 B
YAML
---
|
|
#
|
|
# This task sets up /etc/hosts on a machine.
|
|
#
|
|
# This should only be used in rare cases
|
|
#
|
|
|
|
#
|
|
# This will move a /etc/hosts in place if it's setup in files for that host/domain
|
|
# Note that if it's not set it will just skip this play and do nothing.
|
|
#
|
|
- name: setup /etc/hosts for some clients
|
|
action: copy src=$item dest=/etc/hosts
|
|
with_first_found:
|
|
- files: $files/hosts/{{ ansible_fqdn }}-hosts $files/hosts/{{ ansible_hostname }}-hosts $files/hosts/{{ ansible_domain }}-hosts
|
|
skip: true
|
|
tags:
|
|
- config
|