first commit

This commit is contained in:
2026-04-05 18:17:09 +07:00
commit 97109c2336
77 changed files with 2913 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
---
- name: Обновить кэш apt
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
- name: Базовые пакеты
ansible.builtin.apt:
name:
- curl
- git
- acl
- ca-certificates
- gnupg
- software-properties-common
state: present
- name: Пользователь деплоя
ansible.builtin.user:
name: "{{ deploy_user }}"
shell: /bin/bash
create_home: true
- name: Каталог .ssh для {{ deploy_user }}
ansible.builtin.file:
path: "/home/{{ deploy_user }}/.ssh"
state: directory
owner: "{{ deploy_user }}"
group: "{{ deploy_user }}"
mode: "0700"
- name: authorized_keys для {{ deploy_user }}
ansible.builtin.lineinfile:
path: "/home/{{ deploy_user }}/.ssh/authorized_keys"
line: "{{ item }}"
create: true
mode: "0600"
owner: "{{ deploy_user }}"
group: "{{ deploy_user }}"
loop: "{{ deploy_authorized_keys }}"
when: deploy_authorized_keys | length > 0
- name: Каталог проекта
ansible.builtin.file:
path: "{{ project_path }}"
state: directory
owner: "{{ deploy_user }}"
group: "{{ deploy_user }}"
mode: "0755"