Misc tests

This commit is contained in:
Fabio Sinibaldi 2026-06-12 11:13:02 +02:00
parent e232cde2c5
commit 2d310dc3db
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,29 @@
---
- name: Create and run container
hosts: all
become : true
vars:
image_name: ubuntu
image_tag: latest
image_hostname: ubuntu
image_network:
- wp_net
image_volumes:
- "/usr/data/wp/wordpress/:/var/www"
tasks:
- name: Pull Image
docker_image:
name: "{{ image_name }}:{{ image_tag }}"
source: pull
- name: Create container with pulled image
docker_container:
name: "{{ image_name }}"
image: "{{ image_name }}"
networks:
- name: "{{ image_network }}"
hostname: "{{ image_hostname }}"
volumes: "{{image_volumes}}"
restart: true

View File

@ -0,0 +1,9 @@
---
- name: Misc tests
hosts: web
tasks:
- name: Using dict2items
ansible.builtin.debug:
msg: "{{ item.name }}"
loop: "{{ certbot_certs }}"