Ansible Inventory có cần đặt tên group theo qui tắc nào không?

Ansible Inventory warning 2 lỗi này là gì vậy?

[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details

[WARNING]: Platform linux on host 172.17.0.2 is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.12/reference_appendices/interpreter_discovery.html for more information.

Ansible Inventory là 1 trong 4 trụ cột của Ansible automation platform.

Ansible inventory thường làm nhiều người mới bắt đầu học Ansible automation bối rối vì nó có nhiều kiểu dáng khác nhau.

Học Ansible automation bằng 1 ví dụ về Ansible Inventory để dễ hiểu nhất thì đây.

Ansible Inventory có cần đặt tên group theo qui tắc nào không?

[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
172.17.0.3 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "ping": "pong"
}
[WARNING]: Platform linux on host 172.17.0.2 is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python interpreter could
change the meaning of that path. See https://docs.ansible.com/ansible-core/2.12/reference_appendices/interpreter_discovery.html for more information.
172.17.0.2 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3.9"
    },
    "changed": false,
    "ping": "pong"
}

[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
172.17.0.3 | CHANGED | rc=0 >>
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
[WARNING]: Platform linux on host 172.17.0.2 is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python interpreter could
change the meaning of that path. See https://docs.ansible.com/ansible-core/2.12/reference_appendices/interpreter_discovery.html for more information.
172.17.0.2 | CHANGED | rc=0 >>
NAME="AlmaLinux"
VERSION="9.2 (Turquoise Kodkod)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.2"
PLATFORM_ID="platform:el9"
PRETTY_NAME="AlmaLinux 9.2 (Turquoise Kodkod)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:9::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"
ALMALINUX_MANTISBT_PROJECT="AlmaLinux-9"
ALMALINUX_MANTISBT_PROJECT_VERSION="9.2"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.2"

[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
PLAY [sshnormal-cli] *******************************************************************************************************************************************************
TASK [Gathering Facts] *****************************************************************************************************************************************************
ok: [172.17.0.3]
[WARNING]: Platform linux on host 172.17.0.4 is using the discovered Python interpreter at /usr/bin/python3, but future installation of another Python interpreter could
change the meaning of that path. See https://docs.ansible.com/ansible-core/2.12/reference_appendices/interpreter_discovery.html for more information.
ok: [172.17.0.4]
[WARNING]: Platform linux on host 172.17.0.2 is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python interpreter could
change the meaning of that path. See https://docs.ansible.com/ansible-core/2.12/reference_appendices/interpreter_discovery.html for more information.
ok: [172.17.0.2]
TASK [Cài Apache Web Server mới nhứt trên Ubuntu 22.04] ********************************************************************************************************************
skipping: [172.17.0.2]
skipping: [172.17.0.4]
ok: [172.17.0.3]
TASK [Cài Apache Web Server mới nhứt trên AlmaLinux 9] *********************************************************************************************************************
skipping: [172.17.0.3]
skipping: [172.17.0.4]
ok: [172.17.0.2]
TASK [Cài Apache Web Server mới nhứt trên Alpine Linux 3.18] ***************************************************************************************************************
skipping: [172.17.0.2]
skipping: [172.17.0.3]
ok: [172.17.0.4]
PLAY RECAP *****************************************************************************************************************************************************************
172.17.0.2                 : ok=2    changed=0    unreachable=0    failed=0    skipped=2    rescued=0    ignored=0
172.17.0.3                 : ok=2    changed=0    unreachable=0    failed=0    skipped=2    rescued=0    ignored=0
172.17.0.4                 : ok=2    changed=0    unreachable=0    failed=0    skipped=2    rescued=0    ignored=0

Mời các bạn mua khóa học Ansible automation platform để hiểu nhanh, hiểu rõ, hiểu sâu Ansible Inventory nha.

Ansible Inventory quản lí 3 Node – Xài 3 Container thay cho 3 Máy ảo – Tối ưu Docker Container image – Tự động 100%