This commit is contained in:
Сергей Антропов
2025-03-05 18:59:10 +03:00
parent 78359193fe
commit 382395b909
29 changed files with 49 additions and 147 deletions

View File

@@ -1,16 +1,9 @@
services:
ansible-molecule:
build:
context: .
dockerfile: Dockerfile
container_name: ansible-molecule
ansible:
build: .
container_name: ansible
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./ansible_role:/workspace/role # Монтируем роль
- ./inventory:/workspace/inventory # Монтируем инвентори
- ./ansible.cfg:/etc/ansible/ansible.cfg # Монтируем конфиг Ansible
- ./vault_password_file:/workspace/vault_password_file # Монтируем файл с паролем для Vault
- ./requirements.yaml:/workspace/requirements.yml # Монтируем файл с зависимостями
working_dir: /workspace/role
command: >
sh -c "ansible-galaxy role install -r /workspace/requirements.yml && molecule test"
- .:/ansible
environment:
- ANSIBLE_VAULT_PASSWORD_FILE=/ansible/vault-password.txt
tty: true