24 lines
483 B
YAML
24 lines
483 B
YAML
|
---
|
||
|
- name: install node dev
|
||
|
hosts: all
|
||
|
become: true
|
||
|
|
||
|
tasks:
|
||
|
|
||
|
- name: Create a volume
|
||
|
community.docker.docker_volume:
|
||
|
name: node_data
|
||
|
state: present
|
||
|
|
||
|
- name: Create portainer container
|
||
|
community.docker.docker_container:
|
||
|
name: nodedevcontainer
|
||
|
image: node:current-alpine
|
||
|
state: started
|
||
|
recreate: no
|
||
|
restart_policy: always
|
||
|
command: sleep infinity
|
||
|
|
||
|
volumes:
|
||
|
- "node_data:/data"
|