-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpython-test.yml
34 lines (31 loc) · 983 Bytes
/
python-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- name: Python test
hosts: vm
gather_facts: False
become: yes
tasks:
- raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
# - name: "Add apt-key"
# apt_key: keyserver=hkp://p80.pool.sks-keyservers.net:80 id=58118E89F3A912897C070ADBF76221572C52609D
# - apt_repository:
# repo: deb https://apt.dockerproject.org/repo ubuntu-xenial main
# state: present
# - apt: update_cache=yes
# - apt: name={{ item }} state=present
# with_items:
# - vim
# - docker.io
# - python-docker
# - name: "Add user to docker group"
# user: name={{ item }} group=docker
# with_items:
# - ramu
# - ubuntu
# - name: add sample container
- docker_container:
name: testdocker
image: ubuntu:16.04
state: started
volumes: /data
command: /bin/bash
# - docker_container: