Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

User-settable IP for fqdn entry fixes #73 #1

Conversation

threepistons
Copy link

@threepistons threepistons commented Oct 17, 2018

Ubuntu 18.04, Puppet agent 6.0.2.

My Hiera:

hosts::export_host_resource: false
hosts::fqdn_ip: 127.0.1.1
hosts::fqdn_host_aliases:
  - "%{::hostname}"
  - "%{::hostname}.redactedaddomain.example.com"

My Puppet run:

root@redactedhost:~# puppet agent -t
Notice: Local environment: 'production' doesn't match server specified node environment 'master', switching agent to 'master'.
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for redactedhost.example.com
Info: Applying configuration version '1539779194'
Notice: /Stage[main]/Cs_applications/Package[rubygems]/ensure: created
Notice: /Stage[main]/Cs_applications/Package[freerdp-x11]/ensure: created
Notice: /Stage[main]/Msktutil::Service/Exec[keytabperms]/returns: executed successfully
Notice: /Stage[main]/Cups::Server::Config/Exec[cups::papersize]/returns: executed successfully
Info: Class[Cups::Server::Config]: Scheduling refresh of Class[Cups::Server::Services]
Info: Class[Cups::Server::Services]: Scheduling refresh of Service[cups]
Notice: /Stage[main]/Cups::Server::Services/Service[cups]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Hosts/Host[redactedhost.ncl.ac.uk]/ip: ip changed '10.70.16.193' to '127.0.1.1'
Info: Computing checksum on file /etc/hosts

My /etc/hosts:

root@redactedhost:~# cat /etc/hosts
# HEADER: This file was autogenerated at 2018-10-17 13:26:46 +0100
# HEADER: by puppet.  While it can still be managed manually, it
# HEADER: is definitely not recommended.
127.0.0.1	localhost.localdomain	localhost localhost4 localhost4.localdomain4
::1	localhost6.localdomain6	localhost6 localhost6.localdomain6
127.0.1.1	redactedhost.example.com	redactedhost redactedhost.redactedaddomain.example.com

Mobile workstations need to use 127.0.1.1 and not $::ipaddress.  Defaulting to $::ipaddress not to break existing behaviour
@blues-man
Copy link
Owner

LGTM 👍Thanks

@blues-man blues-man merged commit fd01137 into blues-man:optional_exported_resource Oct 17, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants