AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / user-1087211

Dave Dribin's questions

Martin Hope
Dave Dribin
Asked: 2024-05-07 09:42:00 +0800 CST

Ansible Lint não encontra community.general incluído no Ansible instalado pelo Homebrew

  • 5

Estou tendo um problema com o Ansible Lint não encontrando community.generalmódulos:

> ansible-lint <redacted>.yml
WARNING  Listing 1 violation(s) that are fatal
syntax-check[unknown-module]: couldn't resolve module/action 'community.general.locale_gen'. This often indicates a misspelling, missing collection, or incorrect module path.
<readacted>.yml:16:3

Esta ação é:

- name: Set locale
  community.general.locale_gen:
    name: en_US.UTF-8

Estou no macOS Sonoma 14.4.1 e instalei o Ansible via Homebrew (detalhes da versão no final). Pelo que sei, isso inclui muitos dos módulos da comunidade sem a necessidade de instalá-los via Ansible Galaxy:

> ansible-galaxy collection list | grep community.general
community.general                        8.6.0

Portanto, o manual funciona bem, mas ansilbe-lintnão consegue encontrar o módulo.


Eu notei isso no topo de ansible-galaxy collection list:

# /opt/homebrew/Cellar/ansible/9.5.1/libexec/lib/python3.12/site-packages/ansible_collections
Collection                               Version
---------------------------------------- -------

Se eu definir ANSIBLE_COLLECTIONS_PATHesse /opt/homebrew/.../ansible_collectionscaminho, então funciona. Mas parece que eu não deveria ter que fazer isso? Se ansible-playbookconsegue encontrá-lo, por que não consegue ansible-lint? Como posso ansible-lintprocurar automaticamente o caminho da coleção interno?


Informação da versão:

> ansible --version
ansible [core 2.16.6]
  config file = /Users/dave/work/ansible/dribin-infra/ansible.cfg
  configured module search path = ['/Users/dave/work/ansible/dribin-infra/library']
  ansible python module location = /opt/homebrew/Cellar/ansible/9.5.1/libexec/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/dave/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.12.3 (main, Apr  9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)] (/opt/homebrew/Cellar/ansible/9.5.1/libexec/bin/python)
  jinja version = 3.1.3
  libyaml = True
==> ansible: stable 9.5.1 (bottled), HEAD
Automate deployment, configuration, and upgrading
https://www.ansible.com/
Installed
/opt/homebrew/Cellar/ansible/9.5.1 (31,927 files, 365.5MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-04-26 at 23:40:10
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/a/ansible.rb
...
mac-osx
  • 1 respostas
  • 84 Views

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve