0Pricing
Ansible Academy · Lesson

Provision, Harden & Bootstrap Hosts

Bring fresh servers to a baseline.

From Bare Server to Baseline

Fresh hosts are blank slates. The common role brings every server to one safe, consistent baseline before app code lands. 🛠️

Update the Package Cache

Start by refreshing packages so installs use current versions. The apt module can update the cache in one idempotent task.

- name: Update apt cache
  ansible.builtin.apt:
    update_cache: true
    cache_valid_time: 3600

All lessons in this course

  1. Architect the Project: Roles & Inventory
  2. Provision, Harden & Bootstrap Hosts
  3. Rolling Deploy Behind the Load Balancer
  4. Smoke Tests, Rollback & Notifications
← Back to Ansible Academy