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

hostname - Correct distribution for various Linux distros based on output from distro library #56936

Open
wants to merge 3 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@samdoran
Copy link
Member

commented May 24, 2019

SUMMARY

Fixes #42726

Makes hostname work again on the following distributions:

  • OpenSUSE Leap
  • ArchARM
  • Oracle Linux
  • CoreOS

We switched to using distro.id() in Ansible 2.8 for identifying the distribution. Add new classes to fix distributions that were currently unsupported. Adjust the distribution string in existing classes to match the new output.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/modules/system/hostname.py

ADDITIONAL INFORMATION

Adjust hostname classes based on output from distro
Corrects the following:
- OpenSUSE Leap
- ArchARM
- Oracle Linux
@ansibot

This comment has been minimized.

Copy link
Contributor

commented May 24, 2019

@MarkusTeufelberger

This comment was marked as resolved.

Copy link
Contributor

commented May 25, 2019

Please also add

class CoreosHostname(Hostname):
    platform = 'Linux'
    distribution = 'Coreos'
    strategy_class = SystemdStrategy
@MarkusTeufelberger

This comment was marked as resolved.

Copy link
Contributor

commented May 25, 2019

Also

class ClearLinuxHostname(Hostname):
    platform = 'Linux'
    distribution = 'Clear-linux-os'
    strategy_class = SystemdStrategy

@samdoran samdoran force-pushed the samdoran:issue/42726-hostname-distro branch from 32c1617 to 7cb9cc5 May 28, 2019

@samdoran samdoran changed the title [WIP ] hostname - Correct distribution for various Linux distros based on output from distro library hostname - Correct distribution for various Linux distros based on output from distro library May 28, 2019

@ansibot ansibot added the stale_ci label Jun 5, 2019

@MarkusTeufelberger

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

I'd really need this (also backported for 2.8...) to be able to use CoreOS.

@alikins @saito-hideki - any comments? Please provide your reviews and sign off on these changes so the bot can merge this.

@samdoran: This change might also require a changelog entry.

@samdoran

This comment has been minimized.

Copy link
Member Author

commented Jun 7, 2019

@MarkusTeufelberger This is a bugfix so it will be backported to stable-2.8.

@ansibot ansibot removed the stale_ci label Jun 7, 2019

@samdoran samdoran force-pushed the samdoran:issue/42726-hostname-distro branch from e3eacde to 5d8f4a4 Jun 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.