Skip to content

hostname module: add support for Amazon Linux#5090

Merged
jctanner merged 1 commit intoansible:develfrom
dragon3:hostname_support_amazon_linux
Dec 3, 2013
Merged

hostname module: add support for Amazon Linux#5090
jctanner merged 1 commit intoansible:develfrom
dragon3:hostname_support_amazon_linux

Conversation

@dragon3
Copy link
Copy Markdown
Contributor

@dragon3 dragon3 commented Nov 28, 2013

I added support for Amazon Linux.

In order to add support for Amazon Linux,
I modified "get_distribution" method of module_utils/basic.py to get "Amazon" distribution,
but I'm not too sure if this is correct.

I found a similar method "get_distribution_facts" on setup module,
but this implementation is very different from module_utils/basic.py's get_distribution.

@ansible-jenkins
Copy link
Copy Markdown

Can one of the admins verify this patch?

@dragon3
Copy link
Copy Markdown
Contributor Author

dragon3 commented Dec 3, 2013

@ansible-jenkins Thanks 😄
Please let me know if I should fix or improve. 🙇

jctanner added a commit that referenced this pull request Dec 3, 2013
hostname module: add support for Amazon Linux
@jctanner jctanner merged commit 2670529 into ansible:devel Dec 3, 2013
@jctanner
Copy link
Copy Markdown
Contributor

jctanner commented Dec 3, 2013

@dragon3 thank you!

@dragon3
Copy link
Copy Markdown
Contributor Author

dragon3 commented Dec 3, 2013

@jctanner Thank you!!!

@dragon3 dragon3 deleted the hostname_support_amazon_linux branch December 3, 2013 22:13
@dragon3
Copy link
Copy Markdown
Contributor Author

dragon3 commented Dec 5, 2013

@jctanner Sorry... I made a mistake

if not distribution and os.path.is_file('/etc/system-release'):

"os.path.is_file" is mistake...
"os.path.isfile" is correct.

@jctanner
Copy link
Copy Markdown
Contributor

jctanner commented Dec 5, 2013

Interesting since the old code was "os.path.is_file". I'll take a look and fix.

jctanner added a commit that referenced this pull request Dec 5, 2013
@jctanner
Copy link
Copy Markdown
Contributor

jctanner commented Dec 5, 2013

@dragon3 thanks!

@dragon3
Copy link
Copy Markdown
Contributor Author

dragon3 commented Dec 6, 2013

@jctanner Thanks! Sorry for my mistake.

@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 4, 2018
@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature This issue/PR relates to a feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants