Commit Graph

57 Commits (97e7266633cd29dbb85a8035eddc6282cc7ebe7c)

Author SHA1 Message Date
Sam Doran bf28b5ceca
Use distro.id() instead of distro.name() (#52199)
* Update sys_info unit tests

* Correct distribution values in hostname.py

* Normalize Rhel to Redhat
7 years ago
Marcos Paulo de Souza fa83a711b6 hostname.py: Fix openSUSE distribution name (#47020)
All openSUSE distributions changed to the way they are returned from distro.id().

This patches fix the openSUSE Leap and SLES distro names, and adds one entry for Tumbleweed.

These descriptions are capitilized, as expected by Ansible's hostname module.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
7 years ago
Stephan Müller ffac260c66 add support for hostname on Raspbian (#51273) 7 years ago
Isaac McDonald 371d9596f4 Add Sangoma linux (#45430)
Fixes https://github.com/ansible/ansible/issues/45300
7 years ago
Matt Martz c282e4e00f
Replace LooseVersion comparison with int/float comparison. Fixes #35435 (#35519) 8 years ago
Yadnyawalkya Tale a2d34e914e PEP8 fixes: Ansible system module and playbook base.py (#32322)
* Ansible files module sanity pep8 fixes

* Ansible system module and playbook base.py

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Undo blank lines not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Various changes

* Undo blank line changes not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Various changes

* Missing piece after merge

* Blank lines

* Blank line

* Line too long

* Fix typo

* Unnecessary quotes

* Fix example error
8 years ago
Dag Wieers 32775b0caa
hostname: PEP8 compliancy and doc fixes (#30886)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
8 years ago
Martin Krizek efec43dd1e hostname: fix for a new version of rhel (#31839)
Fixes #31811
8 years ago
Adrian Likins 78bb48a0f6 Add diff mode support to hostname module (#28781)
More or less a rebase of https://github.com/ansible/ansible/pull/23271
8 years ago
emmetfryan 4b0ee9a5e7 Add support for 'KDE Neon' to hostname module (#25262)
Added the class "NeonHostname" to add support for KDE Neon.
8 years ago
dsilakov b12925fcdb Support Virtuozzo Linux Host in hostname module (#25963) 8 years ago
Adrian Likins f040a37c9f Fix hostname GenericStrategy.update_current_hostname() (#28774) 8 years ago
Giovanni Tirloni 5b21ef3e2c Add check_mode support to hostname module (#27700) 8 years ago
Toshio Kuratomi f203ca7907 Update metadata to 1.1 8 years ago
Toshio Kuratomi 4e6cce354e Remove wildcard imports
Made the following changes:

* Removed wildcard imports
* Replaced long form of GPL header with short form
* Removed get_exception usage
* Added from __future__ boilerplate
  * Adjust division operator to // where necessary

For the following files:

* web_infrastructure modules
* system modules
* linode, lxc, lxd, atomic, cloudscale, dimensiondata, ovh, packet,
  profitbricks, pubnub, smartos, softlayer, univention modules
* compat dirs (disabled as its used intentionally)
8 years ago
Abhijeet Kasurde aa32f4e80c Add support for Red Hat Atomic Host (#25906)
Fix adds support for Red Hat Enterprise Linux Atomic Host.
RHEL Atomic host uses same RHEL Server strategy for
modifying hostname.

Fixes #25903

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
9 years ago
Abhijeet Kasurde ba4f6de35a Add support for Devuan in hostname module (#25525)
Fixes #25395

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
9 years ago
KATO Tomoyuki cbe87d0af7 doc: fix missing period for hostname.py (#25392) 9 years ago
Adrian Likins 087b5277f1 Make ServiceMgrFactCollector.is_systemd_managed() a static method (#25316)
Fix 'hostname' module Facts is not defined by updating
'hostname' module to use it.

is_systemd_managed() was previously on the module_utils.facts.Facts
class that no longer exists.

Fixes #25289
9 years ago
Aurimas Lapiene 10167d83ee Add Cloudlinux support for hostname.py
**SUMMARY**

Add Cloudlinux 6 and Cloudlinux 7 support

**ISSUE TYPE**

Feature Pull Request

**COMPONENT NAME**

lib/ansible/modules/system/hostname.py

**ANSIBLE VERSION**
```
2.4
```
9 years ago
Dylan Silva bba4549b43 Downgraded more modules from Curated to Community (#24751) 9 years ago
Toshio Kuratomi eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
9 years ago
Brian Coca f8f0c4abc8 added formatting 9 years ago
Brian Coca f00490007c actually fix tickets in previous commit
both modules had similar issues and i conflated them
9 years ago
Michael Scherer db8719cf8b Add support for NetBSD
While I only checked on NetBSD 7.0, it seems to use the same
rc system as FreeBSD so it should be working for now.
9 years ago
Toshio Kuratomi 7319104552 Refreshed metadata for core modules 9 years ago
Sam Doran b56a9852ee Examples syntax batch4 (#5620)
* Change example syntax on authorized_key module

* Change example syntax on cron module

* Change example syntax on group module

* Change example syntax on hostname module

* Change example syntax on seboolean module

* Change example syntax on selinux module

* Change example syntax on service module

* Change example syntax on sysctl module

* Change example syntax on systemd module

* Change example syntax on user module

* Change example syntax on debug module

* Change example syntax on fail module

* Change example syntax on include module

* Change example syntax on include_role module

* Change example syntax on include_vars module

* Change example syntax on pause module

* Change example syntax on wait_for module

* Change example syntax on apache2_module module

* > Change example syntax on django_manage module

* Change example syntax on htpasswd module
9 years ago
Hiroaki Nakamura c2d37f1db9 hostname: add support for alpine linux (#4837)
* Add update_current_and_permanent_hostname to the hostname module

* Add support for Alpine Linux to the hostname module
9 years ago
Jonathan Mainguy 51313e6da8 update maintainer 9 years ago
Riccardo Murri 6733d1c72c hostname: Support "Scientific Linux CERN" (#4855)
CERN maintains its own fork of "Scientific Linux",
which identifies as "Scientific Linux CERN SLC".
This commit lets Ansible know that this is again
another variant of RHEL.
9 years ago
Michael Scherer 338a8c8632 Convert command output to native string (#4559)
Without it, the module always return changed on python3,
which is harmless but add noise and can have some side effects.
9 years ago
Indrajit Raychaudhuri fb255b3607 Improve hostname module to support systemd in more generic way (#4382)
Now that there is general purpose `Fact` helper to detect if systemd
is active, we would be able to rely on that to apply SystemdStrategy.

Detecting presence of systemd at runtime would be more reliable than
distribution version based heuristics. (e.g., Debian, Ubuntu allows
user to change the default init system, Gentoo allows switching as
well, and so on).
9 years ago
Michael Scherer 907b3fb667 Port hostname to a py24 and py3 compatible syntax (#3676) 9 years ago
Joao Carreira 92d76e8828 added support for sles 10 & 11 9 years ago
Toshio Kuratomi b6ff36bed3 Fix documentation build in hostname 9 years ago
Hiroaki Nakamura f2246deaf9 Doc: Add NOTE about hostname modules does not modify /etc/hosts 9 years ago
Michael Scherer 55f2345829 Remove a unneeded use of use_unsafe_shell
Since use_unsafe_shell is suspicious from a security point
of view (or it wouldn't be unsafe), the less we have, the less
code we have to toroughly inspect for a security audit.
9 years ago
Sina Sadeghi 2ad9c6c9e5 Update hostname.py
Added support for FreeBSD. (http://www.freebsd.org)
9 years ago
Jordi De Groof 7aa57219f6 Update facts when hostname is changed
ansible_hostname contains the unqualified hostname
9 years ago
Tim Rupp 223cac3f39 Add hostname support for Kali linux 2.0
This patch allows the hostname module to detect and set the hostname for a
Kali Linux 2.0 installation. Without this patch, the hostname module raises
the following error

   hostname module cannot be used on platform Linux (Kali)

Kali is based off of Debian.
9 years ago
saito-hideki 19cd35806f Add Solaris support in hostname module
feature_pull_request: #1804
9 years ago
Hagai Kariti b46a1ff3e1 Hostname module should update ansible_hostname 9 years ago
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 9 years ago
Vladislav Lewin 36ce019beb add SLE12 support to hostname.py 9 years ago
Jonathan Mainguy 06cd532cc5 added nice error for systemd hosts where name > 64 chars 9 years ago
Jonathan Mainguy f4b07b105b added openbsd to hostname module 9 years ago
Evgenii Terechkov 37d6c10133 Add ALT Linux support to hostname module 9 years ago
Philippe ALEXANDRE 5b48ecc80a Add Linuxmint support in hostname module 9 years ago
Ben Konrath 96a20de9ff Add support for SL7 to hostname module. 9 years ago
Johnny Robeson 6fc04862a4 rename FedoraStratgy to SystemdStrategy 9 years ago