update-lock-file:
    uv lock

install-dependencies:
    uv sync --dev

# Ansible Galaxy
ansible-galaxy-install:
    uv run poe install

ansible-galaxy-upgrade:
    uv run poe upgrade

lint-ansible:
    uv run poe lint-ansible

# Ansible Vault
encrypt-string:
    uv run ansible-vault encrypt_string 'xxx' \
        --vault-password-file=secrets/.ansible_vault_pass

decrypt-string:
    echo '$ANSIBLE_VAULT;1.1;AES256 xxx' | tr -d ' ' | uv run ansible-vault decrypt && echo

deploy-hm-macos-group:
    uv run poe deploy-hm-macos-group \
        --vault-password-file=secrets/.ansible_vault_pass

# Ansible
ansible-galaxy-update:
    uv run ansible-galaxy install --role-file=requirements.yaml --force

ansible-doc-list:
    uv run ansible-doc --list

ansible-inventory-list:
    uv run ansible-inventory --inventory=inventories/hm_ubuntu_group.yaml --list

ansible-inventory-graph:
    uv run ansible-inventory --inventory=inventories/hm_ubuntu_group.yaml --graph

ansible-run-ping:
    uv run ansible hm_ubuntu_group --inventory=inventories/hm_ubuntu_group.yaml --vault-password-file=secrets/.ansible_vault_pass --module-name=ping

ansible-run-show-system-info:
    uv run ansible hm_ubuntu_group --inventory=inventories/hm_ubuntu_group.yaml --vault-password-file=secrets/.ansible_vault_pass --module-name=setup

ansible-run-uptime:
    uv run ansible hm_ubuntu_group --inventory=inventories/hm_ubuntu_group.yaml --vault-password-file=secrets/.ansible_vault_pass --args=uptime

ansible-playbook-list-tags:
    uv run ansible-playbook playbooks/hm_ubuntu_group.yaml --list-tags

ansible-playbook-hm-macos-group:
    uv run ansible-playbook --inventory=inventories/hm_macos_group.yaml --vault-password-file=secrets/.ansible_vault_pass playbooks/hm_macos_group.yaml

ansible-playbook-hm-ubuntu-group:
    uv run ansible-playbook --inventory=inventories/hm_ubuntu_group.yaml --vault-password-file=secrets/.ansible_vault_pass playbooks/hm_ubuntu_group.yaml

ansible-playbook-hm-windows-group:
    uv run ansible-playbook --inventory=inventories/hm_windows_group.yaml --vault-password-file=secrets/.ansible_vault_pass playbooks/hm_windows_group.yaml
