Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix(changes): set-fqdn should not always change state #36

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions hostsfile/hostname.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
{%- set fqdn = grains['id'] %}
{%- if grains['os_family'] == 'Debian' %}
{% set hostname = fqdn.split('.')[0] %}
{% else %}
{% set hostname = fqdn %}
{%- else %}
{%- set hostname = fqdn %}
{% endif %}

{%- if grains['os_family'] == 'RedHat' %}
Expand All @@ -32,6 +32,8 @@ etc-sysconfig-network:
- contents: {{ hostname }}
- backup: false
{% endif %}
- onchanges_in:
- cmd: set-fqdn
Copy link
Member

@aboe76 aboe76 Sep 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noelmcloughlin this should be:

- cmd: hostsfile-set-fqdn

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed inhttps://github.com//issues/39


set-fqdn:
cmd.run:
Expand Down