Добавил создание ролей make role new

This commit is contained in:
2025-03-13 19:02:34 +03:00
parent b6286aa9b7
commit 2cb442bd73
17 changed files with 87 additions and 35 deletions

View File

@@ -1,3 +1 @@
---
- name: Import role
import_playbook: role/deploy.yaml
---

View File

@@ -1,11 +0,0 @@
---
- name: Deploy roles
hosts: all
become: true
become_user: root
become_method: ansible.builtin.sudo
gather_facts: true
roles:
- role
vars_files:
- ../vars/secrets.yml

View File

@@ -1,4 +0,0 @@
---
- name: Пример таски
debug:
msg: "Привет! Я запустился на Debian/Ubuntu! Переменная role_test равна {{ role_test }}"

View File

@@ -1,12 +0,0 @@
---
- name: "Определяем ОС"
set_fact:
os_family: "{{ ansible_facts['os_family'] }}"
- name: "Подключаем таски для RedHat совместимых"
include_tasks: "redhat/main.yaml"
when: os_family == "RedHat"
- name: "Подключаем таски для Debian/Ubuntu совместимых"
include_tasks: "debian/main.yaml"
when: os_family == "Debian"

View File

@@ -1,4 +0,0 @@
---
- name: Пример таски
debug:
msg: "Привет! Я запустился на RedHat/CentOS/Fedora!"

View File

View File

@@ -1,6 +0,0 @@
$ANSIBLE_VAULT;1.1;AES256
33333461346434666539316330333661306537303234306132383733633635656139623330346339
3735343834396131623436333737363436346137613337340a393633636663346131353135313332
35656537663832366464316538346565313236306538343537343032373161653366353665366565
3461316135353337640a613137383034663265306666353338326135613961646364373966353863
37313731623164303566383431613131353331363035653630313630353130623066