REFACTOR: remove unnecessary files. Add to deploy_and_set_up_lxc_on_proxmox configuration steps

This commit is contained in:
2026-08-09 18:20:27 +04:00
parent cb70968aaf
commit fe82553525
13 changed files with 35 additions and 423 deletions
@@ -1,5 +1,5 @@
---
- name: Physical machines maintanance play
- name: Deploy LXC
hosts: all
remote_user: ansible
gather_facts: false
@@ -28,3 +28,37 @@
roles:
- ../roles/deploy_lxc_on_proxmox
tasks:
- name: Make the prompted hostname available to the whole playbook
ansible.builtin.set_fact:
fact_lxc_hostname: "{{ lxc_hostname }}"
- name: Make the prompted IP available to the whole playbook
ansible.builtin.set_fact:
fact_lxc_ip_address: "{{ lxc_ip_address }}"
- name: Add the target host to the inventory
ansible.builtin.add_host:
name: "{{ fact_lxc_ip_address }}"
groups: new_host
ansible_user: ansible
- name: Configure LXC
hosts: new_host
remote_user: ansible
vars_files:
../inventory/group_vars/all/secrets.yaml
vars:
ansible_user_passwd_hash: "{{ ansible_password | password_hash('sha512', 's3edscrj45e6r') }}"
user_passwd_hash: "{{ user_password | password_hash('sha512', 's3ed6123jhgcr') }}"
roles:
- ../roles/configure_ansible_user
- ../roles/harden_ssh
- ../roles/base_system
- ../roles/human_admin_user
- ../roles/set_locale_and_time