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

add tencentos fact distro #76459

Merged
merged 3 commits into from Dec 7, 2021
Merged

Conversation

jameslivulpi
Copy link
Contributor

SUMMARY

takes care of #76343

Correct the distribution fact if node is running TencentOS

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

distribution fact gethering

ADDITIONAL INFORMATION

Before this fix:

10.1.1.2 | SUCCESS => {
    "ansible_facts": {
        "ansible_distribution": "CentOS", <------
        "ansible_distribution_file_parsed": true,
        "ansible_distribution_file_path": "/etc/redhat-release",
        "ansible_distribution_file_variety": "RedHat",
        "ansible_distribution_major_version": "3",
        "ansible_distribution_release": "Final",
        "ansible_distribution_version": "3.1",
        "discovered_interpreter_python": "/usr/bin/python3.6"
    },
    "changed": false
}

test.yml:

- name: install socat & conntrack
    package:
      name:
        - socat
        - conntrack
      state: present
    become: true

Failed with:

fatal: [10.1.1.2]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "allow_downgrade": false,
            "autoremove": false,
            "bugfix": false,
            "cacheonly": false,
            "conf_file": null,
            "disable_excludes": null,
            "disable_gpg_check": false,
            "disable_plugin": [],
            "disablerepo": [],
            "download_dir": null,
            "download_only": false,
            "enable_plugin": [],
            "enablerepo": [],
            "exclude": [],
            "install_repoquery": true,
            "install_weak_deps": true,
            "installroot": "/",
            "list": null,
            "lock_timeout": 30,
            "name": [
                "socat",
                "conntrack"
            ],
            "releasever": null,
            "security": false,
            "skip_broken": false,
            "state": "present",
            "update_cache": false,
            "update_only": false,
            "use_backend": "auto",
            "validate_certs": true
        }
    },
    "msg": "The Python 2 yum module is needed for this module. If you require Python 3 support use the `dnf` Ansible module instead."
}

After fix:

10.1.1.2 | SUCCESS => {
    "ansible_facts": {
        "ansible_distribution": "TencentOS",
        "ansible_distribution_file_parsed": true,
        "ansible_distribution_file_path": "/etc/centos-release",
        "ansible_distribution_file_variety": "CentOS",
        "ansible_distribution_major_version": "3",
        "ansible_distribution_release": "Final",
        "ansible_distribution_version": "3.1",
        "discovered_interpreter_python": "/usr/bin/python3.6"
    },
    "changed": false
}

installs via dnf and succeeds:

changed: [10.1.1.2] => {
    "changed": true,
    "invocation": {
        "module_args": {
            "allow_downgrade": false,
            "allowerasing": false,
            "autoremove": false,
            "bugfix": false,
            "cacheonly": false,
            "conf_file": null,
            "disable_excludes": null,
            "disable_gpg_check": false,
            "disable_plugin": [],
            "disablerepo": [],
            "download_dir": null,
            "download_only": false,
            "enable_plugin": [],
            "enablerepo": [],
            "exclude": [],
            "install_repoquery": true,
            "install_weak_deps": true,
            "installroot": "/",
            "list": null,
            "lock_timeout": 30,
            "name": [
                "socat",
                "conntrack"
            ],
            "nobest": false,
            "releasever": null,
            "security": false,
            "skip_broken": false,
            "state": "present",
            "update_cache": false,
            "update_only": false,
            "validate_certs": true
        }
    },
    "msg": "",
    "rc": 0,
    "results": [
        "Installed: libnetfilter_conntrack-1.0.6-5.tl3.x86_64",
        "Installed: libnetfilter_cthelper-1.0.0-15.tl3.x86_64",
        "Installed: conntrack-tools-1.4.4-10.tl3.x86_64",
        "Installed: libnetfilter_cttimeout-1.0.0-11.tl3.x86_64",
        "Installed: libnetfilter_queue-1.0.4-3.el8.x86_64",
        "Installed: libnfnetlink-1.0.1-13.tl3.x86_64",
        "Installed: socat-1.7.4.1-1.el8.x86_64"
    ]
}

@ansibot ansibot added affects_2.13 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Dec 3, 2021
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Dec 6, 2021
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Dec 6, 2021
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Dec 6, 2021
Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

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

LGTM, waiting for others to comment.

@mkrizek mkrizek merged commit 7830e53 into ansible:devel Dec 7, 2021
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Dec 7, 2021
@jameslivulpi jameslivulpi deleted the tencentos_fact branch December 7, 2021 16:56
bcoca pushed a commit to bcoca/ansible that referenced this pull request Dec 15, 2021
Fixes ansible#76459

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
@ansible ansible locked and limited conversation to collaborators Dec 21, 2021
konstruktoid pushed a commit to konstruktoid/ansible-upstream that referenced this pull request Feb 2, 2022
Fixes ansible#76459

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
bcoca pushed a commit to bcoca/ansible that referenced this pull request Feb 7, 2022
Fixes ansible#76459

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.13 bug This issue/PR relates to a bug. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants