refactor: add pre-tasks for installing Ansible collections and improve final setup messages
All checks were successful
Nix Format Check / check-format (push) Successful in 37s
All checks were successful
Nix Format Check / check-format (push) Successful in 37s
This commit is contained in:
parent
6ffb65fbc0
commit
35ffc77056
@ -2,6 +2,12 @@
|
||||
hosts: all
|
||||
gather_facts: true
|
||||
|
||||
pre_tasks:
|
||||
- name: Install required collections
|
||||
ansible.builtin.command: ansible-galaxy collection install -r requirements.yml
|
||||
delegate_to: localhost
|
||||
run_once: true
|
||||
|
||||
tasks:
|
||||
- name: Include global tasks
|
||||
ansible.builtin.import_tasks: tasks/global/global.yml
|
||||
|
4
config/ansible/requirements.yml
Normal file
4
config/ansible/requirements.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
# Collections section
|
||||
collections:
|
||||
- community.general
|
8
setup.sh
8
setup.sh
@ -387,12 +387,10 @@ main() {
|
||||
# Create setup marker
|
||||
touch "$SETUP_MARKER" || die "Failed to create setup marker"
|
||||
|
||||
# Initial run of dotf update
|
||||
dotf update || die "Failed to run 'dotf update', please see the output for more information"
|
||||
|
||||
# Final success message
|
||||
log_success "\nSetup complete, it shouldn't be necessary but to be sure, please restart your shell.\n"
|
||||
log_success "You can now run 'dotf' to manage your dotfiles.\n"
|
||||
log_success "\nSetup complete. Please logout / restart to continue with 'dotf update'.\n"
|
||||
log_error "\n!!! Please logout / restart to continue !!!"
|
||||
log_error "~~~ Proceed by running 'dotf update' ~~~\n"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user