Misc tests
This commit is contained in:
parent
e232cde2c5
commit
2d310dc3db
|
|
@ -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
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- name: Misc tests
|
||||
hosts: web
|
||||
|
||||
tasks:
|
||||
- name: Using dict2items
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ item.name }}"
|
||||
loop: "{{ certbot_certs }}"
|
||||
Loading…
Reference in New Issue