Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Learning Ansible Without Opening the Docs Website

Описание и применение

Автор научился использовать Ansible, полностью опираясь на локальные ресурсы: виртуальное окружение, ansible-doc и локальные коллекции, создав рабочий playbook без обращения к интернет‑документации.

Задача

Relying on online documentation made learning Ansible tedious and memory‑poor; the author wanted to understand Ansible using only local resources.

Результат

The author achieved a self‑contained learning workflow, avoided dependency drift, and produced a working playbook, all without browsing the web.

Рабочий процесс

  • Create a clean virtual environment and install Ansible
  • Use ansible-doc -l to list available modules and grep for specific names
  • Read module pages with ansible-doc <module> and examine EXAMPLES
  • Use ansible-doc -s <module> for concise option snippets
  • Discover keyword documentation with ansible-doc -t keyword <name>
  • Search local collection paths for real YAML examples of keywords
  • Assemble a small playbook combining modules, arguments, and keywords
  • Run the playbook to validate understanding

Доказательства

I stopped reaching for the browser.

Источник

python3 -m venv ~/.venvs/ansible source ~/.venvs/ansible/bin/activate pip install --upgrade pip ansible

Источник

ansible-doc -l

Источник

ansible-doc copy

Источник

ansible-doc -t keyword loop ansible-doc -t keyword when

Источник

PAGER=cat ansible-doc -s copy

Источник

ansible-galaxy collection list

Источник

  • name: Install and start nginx

hosts: webservers
become: true
tasks:

  • name: Install nginx

ansible.builtin.package:
name: nginx
state: present
when: ansible_os_family == "Debian"

Источник

  • Дата записи: 2026-10-14T10:40:57.405Z