Инструменты пользователя

Инструменты сайта


it:ansible

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слеваПредыдущая версия
Следующая версия
Предыдущая версия
it:ansible [2022/04/20 06:37] ura2404it:ansible [2024/04/21 12:04] (текущий) ura2404
Строка 6: Строка 6:
  
 [[it:ansible:module|Модули]]\\ [[it:ansible:module|Модули]]\\
 +[[it:ansible:role|Роли]]\\
 +
 +[[it:ansible:ansible_os_family|ansible_os_family]]\\
  
 ---- ----
  
-__**RomNero**__\\ +https://docs.ansible.com/ansible/latest/collections/ansible/builtin/add_host_module.html Add a host (and alternatively a group) to the ansible-playbook in-memory inventory\\
-[[https://youtu.be/YYjCwLs-1hA]] - Всё что нужно знать по AnsibleОсновы и не только.\\ +
-[[https://youtu.be/WvvEWvemT_M]] - 12 Ansible: Template. Шаблоны.\\ +
-[[https://youtu.be/Uk1gGzdW00o]] 13 Ansible: Roles. Создание ролей.\\+
  
  
Строка 21: Строка 21:
 [[https://www.digitalocean.com/community/tutorials/how-to-use-ansible-to-install-and-set-up-lamp-on-ubuntu-18-04-ru]] {{it:ansible:ispolzovanie_ansible_dlja_ustanovki_i_nastrojki_lamp.mht|mht}} - Использование Ansible для установки и настройки LAMP в Ubuntu 18.04\\ [[https://www.digitalocean.com/community/tutorials/how-to-use-ansible-to-install-and-set-up-lamp-on-ubuntu-18-04-ru]] {{it:ansible:ispolzovanie_ansible_dlja_ustanovki_i_nastrojki_lamp.mht|mht}} - Использование Ansible для установки и настройки LAMP в Ubuntu 18.04\\
 [[https://youtu.be/20g9BNilDvg|20-Ansible - Хранение Секретов - ansible-vault]]\\ [[https://youtu.be/20g9BNilDvg|20-Ansible - Хранение Секретов - ansible-vault]]\\
 +[[http://linuxsql.ru/content/ansible-izuchaem-i-sozdaem-roli-roles-lesson-8]] {{it:ansible:ansible-_izuchaem_i_sozdaem_roli_roles_.mht|mht}} - Ansible: изучаем и создаем Роли (Roles). Lesson 8
 +
 +__**RomNero**__\\
 +[[https://youtu.be/YYjCwLs-1hA|Всё что нужно знать по Ansible. Основы и не только]]\\
 +[[https://youtu.be/WvvEWvemT_M|12 Ansible: Template. Шаблоны]]\\
 +[[https://youtu.be/Uk1gGzdW00o|13 Ansible: Roles. Создание ролей]]\\
  
  
 **Unix way**\\ **Unix way**\\
-[[https://youtu.be/n27bpkAtyf4|Ansible. Часть 1. Основы]] +[[https://youtu.be/n27bpkAtyf4|Ansible. Часть 1. Основы]]\\ 
-[[https://youtu.be/5JcL3c6rPE8|Ansible. Часть 2. Playbook]]+[[https://youtu.be/5JcL3c6rPE8|Ansible. Часть 2. Playbook]]\\
  
 ---- ----
Строка 58: Строка 64:
 </code> </code>
 ---- ----
 +
 +__**Посмотреть всё интерфейсы**__
 +<code>
 +- name: Display all interfaces
 +  debug:
 +    msg: "{{ msg.split('\n') }}"
 +  vars:
 +    msg: |
 +        {% for iface in ansible_interfaces|sort %}
 +            System interface {{ iface }}
 +            {{ vars.ansible_facts[iface] | to_nice_json }}
 +        {% endfor %}
 +</code>
 +
 +__**homedir пользователя**__
 +<code>
 +- name: Get user homedir
 +  shell: eval echo "~"
 +  register: homedir
 +  become: true
 +  become_user: "{{ environment_user }}"
 +  no_log: yes
 +  tags: [os]
 +
 +</code>
it/ansible.1650436677.txt.gz · Последнее изменение: 2022/04/20 06:37 — ura2404