Enhance Ansible playbooks and scripts:
- Add '--skip-check' option to update.py to skip dotfiles update checks. - Update playbook.yml and symlinks.yml to use 'inventory_hostname' for host checks. - Refactor service task inclusions in server.yml for better readability and maintainability. - Add new Home Assistant service with corresponding docker-compose configuration. - Update various service YAML files to use dynamic paths based on inventory_hostname. - Add tags for service tasks to improve organization and execution control. - Remove obsolete services.yml file.
This commit is contained in:
@@ -28,6 +28,7 @@ def help_message():
|
||||
"green",
|
||||
" --full-speed, -F Upgrade packages and use all available cores for compilation. (Default: 8 cores)",
|
||||
)
|
||||
printfe("green", " --skip-check, -s Skip checking for dotfiles updates.")
|
||||
printfe("green", " --help, -h Display this help message.")
|
||||
return 0
|
||||
|
||||
@@ -236,6 +237,10 @@ def main():
|
||||
"--help", "-h", action="store_true", help="Display help message"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--skip-check", "-s", action="store_true", help="Skip checking for dotfiles updates"
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.help:
|
||||
@@ -250,10 +255,13 @@ def main():
|
||||
if args.ansible_verbose:
|
||||
args.ansible = True
|
||||
|
||||
# Always check git repository first
|
||||
if not check_git_repository():
|
||||
printfe("red", "Failed to check or update dotfiles repository.")
|
||||
return 1
|
||||
# Always check git repository first unless skip-check is set
|
||||
if not args.skip_check:
|
||||
if not check_git_repository():
|
||||
printfe("red", "Failed to check or update dotfiles repository.")
|
||||
return 1
|
||||
else:
|
||||
printfe("yellow", "Skipping dotfiles repository update check (--skip-check).")
|
||||
|
||||
# Set cores and jobs based on full-speed flag
|
||||
if args.full_speed:
|
||||
|
Reference in New Issue
Block a user