diff --git a/files/fas-client/nsswitch.conf b/files/fas-client/nsswitch.conf new file mode 100644 index 0000000000..fb4ff626ff --- /dev/null +++ b/files/fas-client/nsswitch.conf @@ -0,0 +1,45 @@ +# /etc/nsswitch.conf +# +# An example Name Service Switch config file. This file should be +# sorted with the most-used services at the beginning. +# +# The entry '[NOTFOUND=return]' means that the search for an +# entry should stop if the search in the previous entry turned +# up nothing. Note that if the search failed due to some other reason +# (like no NIS server responding) then the search continues with the +# next entry. +# +# Legal entries are: +# +# nisplus or nis+ Use NIS+ (NIS version 3) +# nis or yp Use NIS (NIS version 2), also called YP +# dns Use DNS (Domain Name Service) +# files Use the local files +# db Use the local database (.db) files +# compat Use NIS on compat mode +# hesiod Use Hesiod for user lookups +# [NOTFOUND=return] Stop searching if not found so far +# + +passwd: db files +shadow: db files +group: db files + +#hosts: db files nisplus nis dns +hosts: files dns + +bootparams: nisplus [NOTFOUND=return] files + +ethers: files +netmasks: files +networks: files +protocols: files +rpc: files +services: files + +netgroup: files + +publickey: nisplus + +automount: files +aliases: files nisplus diff --git a/files/hosts/arm.fedoraproject.org-hosts b/files/hosts/arm.fedoraproject.org-hosts new file mode 100644 index 0000000000..ba351e81c5 --- /dev/null +++ b/files/hosts/arm.fedoraproject.org-hosts @@ -0,0 +1,13 @@ +127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 +::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 +10.5.126.23 infrastructure.fedoraproject.org +10.5.125.63 koji.fedoraproject.org +10.5.125.36 kojipkgs.fedoraproject.org +10.5.126.23 infrastructure.fedoraproject.org +10.5.124.138 arm.koji.fedoraproject.org +10.5.125.44 pkgs.fedoraproject.org pkgs +# +# This is proxy01.phx2.fedoraproject.org +# +10.5.126.52 mirrors.fedoraproject.org +10.5.126.52 admin.fedoraproject.org diff --git a/playbooks/groups/arm-qa.yml b/playbooks/groups/arm-qa.yml index 5cfc7ae364..d44e00138c 100644 --- a/playbooks/groups/arm-qa.yml +++ b/playbooks/groups/arm-qa.yml @@ -2,7 +2,7 @@ - name: Setup arm-qa hosts hosts: arm-qa user: root - gather_facts: False + gather_facts: True tags: - arm-qa @@ -11,7 +11,9 @@ - ${private}/vars.yml tasks: - # This group uses fas_client for user management + # This task sets up fas_client for user management - include: $tasks/fas_client.yml - # This group includes our common scripts + # This task sets up /etc/hosts for us + - include: $tasks/hosts.yml + # This task includes our common scripts - include: $tasks/common_scripts.yml diff --git a/playbooks/groups/arm-releng.yml b/playbooks/groups/arm-releng.yml index 1a14b4d5bd..d2f32129ba 100644 --- a/playbooks/groups/arm-releng.yml +++ b/playbooks/groups/arm-releng.yml @@ -2,7 +2,7 @@ - name: Setup arm-releng hosts hosts: arm-releng user: root - gather_facts: False + gather_facts: True tags: - arm-releng @@ -11,7 +11,9 @@ - ${private}/vars.yml tasks: - # This group uses fas_client for user management + # This task sets up fas_client for user management - include: $tasks/fas_client.yml - # This group includes our common scripts + # This task sets up /etc/hosts for us + - include: $tasks/hosts.yml + # This task includes our common scripts - include: $tasks/common_scripts.yml diff --git a/tasks/fas_client.yml b/tasks/fas_client.yml index 1cd53e13ae..2bbac2ad44 100644 --- a/tasks/fas_client.yml +++ b/tasks/fas_client.yml @@ -22,6 +22,12 @@ tags: - packages +# +# setup /etc/nsswitch.conf to use nssdb +# +- name: setup /etc/nsswitch.conf for client use + action: copy src=$files/fas-client/nsswitch.conf dest=/etc/nsswitch.conf owner=root mode=644 + # # fasClients needs a valid /etc/fas.conf. # There's vars used in this template: diff --git a/tasks/hosts.yml b/tasks/hosts.yml new file mode 100644 index 0000000000..a1686b4904 --- /dev/null +++ b/tasks/hosts.yml @@ -0,0 +1,20 @@ +--- +# +# 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 client use + action: copy src=$item dest=/etc/hosts + with_first_found: + - $files/hosts/${ansible_fqdn}-hosts + - $files/hosts/${ansible_hostname}-hosts + - $files/hosts/${ansible_domain}-hosts + skip: true + tags: + - config