From 2d310dc3db3f0840ce55fb57e3684580102e5542 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Fri, 12 Jun 2026 11:13:02 +0200 Subject: [PATCH] Misc tests --- ansible/playbooks/docker_deploy_image.yaml | 29 ++++++++++++++++++++++ ansible/playbooks/misc_tests.yaml | 9 +++++++ 2 files changed, 38 insertions(+) create mode 100644 ansible/playbooks/docker_deploy_image.yaml create mode 100644 ansible/playbooks/misc_tests.yaml diff --git a/ansible/playbooks/docker_deploy_image.yaml b/ansible/playbooks/docker_deploy_image.yaml new file mode 100644 index 0000000..c8366b8 --- /dev/null +++ b/ansible/playbooks/docker_deploy_image.yaml @@ -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 \ No newline at end of file diff --git a/ansible/playbooks/misc_tests.yaml b/ansible/playbooks/misc_tests.yaml new file mode 100644 index 0000000..69c578c --- /dev/null +++ b/ansible/playbooks/misc_tests.yaml @@ -0,0 +1,9 @@ +--- +- name: Misc tests + hosts: web + + tasks: + - name: Using dict2items + ansible.builtin.debug: + msg: "{{ item.name }}" + loop: "{{ certbot_certs }}" \ No newline at end of file