- Introduce checks for existing GPG keys and repositories for Docker, NodeSource, and Tailscale to ensure correct configurations before installation. - Implement conditional removal of incorrect keys and repositories to maintain a clean setup. - Update Makefile to include a command for editing group vault variables. These changes enhance package management reliability and streamline the installation process across different roles.
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
---
|
|
- name: Configure development environment
|
|
hosts: dev
|
|
become: true
|
|
strategy: free
|
|
|
|
roles:
|
|
- {role: maintenance, tags: ['maintenance']}
|
|
- {role: base, tags: ['base', 'security']}
|
|
- {role: user, tags: ['user']}
|
|
- {role: ssh, tags: ['ssh', 'security']}
|
|
- {role: shell, tags: ['shell']}
|
|
- {role: development, tags: ['development', 'dev']}
|
|
- {role: docker, tags: ['docker']}
|
|
- {role: applications, tags: ['applications', 'apps']}
|
|
- {role: snap, tags: ['snap', 'apps']}
|
|
- {role: tailscale, tags: ['tailscale', 'vpn']}
|
|
- {role: monitoring, tags: ['monitoring']}
|
|
|
|
pre_tasks:
|
|
- name: Update apt cache
|
|
ansible.builtin.apt:
|
|
update_cache: true
|
|
ignore_errors: true
|
|
register: apt_update_result
|
|
|
|
- name: Display apt update status
|
|
ansible.builtin.debug:
|
|
msg: "Apt cache update: {{ 'Success' if apt_update_result is succeeded else 'Failed - continuing anyway' }}"
|
|
when: ansible_debug_output | default(false) | bool
|
|
|
|
tasks:
|
|
# Additional tasks can be added here if needed
|
|
- name: Display completion message
|
|
ansible.builtin.debug:
|
|
msg: "Development environment setup completed successfully!"
|