Files
ansible_pull_master/README.md
T
2026-11-02 16:32:24 -07:00

84 lines
2.2 KiB
Markdown

# Ansible Pull Master
This repository is my main repository for Ansible Pull.
## Supported Distributions
The bootstrap script automatically detects the operating system using `/etc/os-release` and selects the appropriate package manager and Ansible playbook.
| Distribution | Package Manager | Playbook |
|---|---|---|
| Ubuntu | APT | `local.yml` |
| Debian | APT | `local.yml` |
| Arch-based distributions (including CachyOS) | Pacman | `arch.yml` |
## New Server Bootstrap
For a new server or workstation, log in as `root` or use an account with sudo privileges.
Download the bootstrap script directly from Gitea:
```bash
wget -O /tmp/bootstrap.sh https://gitea.romerozone.top/robert/ansible_pull_master/raw/branch/master/bootstrap.sh
```
Make the script executable:
```bash
chmod +x /tmp/bootstrap.sh
```
Run the bootstrap:
```bash
/tmp/bootstrap.sh
```
If running from a normal user account, use:
```bash
sudo /tmp/bootstrap.sh
```
### What the Bootstrap Does
The bootstrap script:
1. Detects the operating system.
2. Installs Git and Ansible using the appropriate package manager.
3. Selects the corresponding Ansible playbook.
4. Runs the initial `ansible-pull`.
5. Retrieves the repository and applies the system configuration.
### Ubuntu and Debian
For Ubuntu and Debian systems, the bootstrap additionally:
1. Prompts for the Ansible Vault password.
2. Stores the password securely in `/root/.ansible_vault_password`.
3. Configures Ansible to use the Vault password.
4. Runs `local.yml`.
### Arch-Based Distributions
For Arch-based distributions, the bootstrap:
1. Performs a full system update using Pacman.
2. Installs Git and Ansible.
3. Runs `arch.yml`.
No Ansible Vault password is required for the Arch playbook.
## After Bootstrap
After the initial pull completes, the system is configured and managed by this Ansible Pull repository.
The Ubuntu/Debian playbook creates the **Default User** when needed, along with the Ansible service account and other required configuration.
The Arch-based playbook configures Fastfetch and ensures it starts in interactive Bash.
## Playbooks
- `local.yml` — Ubuntu and Debian server configuration.
- `arch.yml` — Arch-based workstation configuration.