--- # Fresh Server Setup Playbook for Netcup VPS # Run this first on a fresh server installation # Usage: ansible-playbook -i inventories/production/hosts.yml setup-fresh-server.yml - import_playbook: playbooks/initial-server-setup.yml when: fresh_server_setup | default(false) - name: Switch to deploy user for infrastructure setup hosts: web_servers gather_facts: false tasks: - name: Update inventory configuration to use deploy user debug: msg: - "Initial setup complete! Now update your inventory:" - "1. Change ansible_user from 'root' to 'deploy'" - "2. Set fresh_server_setup: false" - "3. Run: ansible-playbook -i inventories/production/hosts.yml site.yml" tags: always when: fresh_server_setup | default(false)