Skip to content

Commit 1f7c410

Browse files
committed
python three is pretty real now
1 parent e641db0 commit 1f7c410

File tree

12 files changed

+96
-21
lines changed

12 files changed

+96
-21
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ Icon
55
._*
66
.Spotlight-V100
77
.Trashes
8-
.vagrant
9-
test
8+
.ci-env

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.PHONY: clean dist_clean molecule testenv
2+
3+
BUILD_IMAGE="anxsscaffolding/build"
4+
5+
molecule:
6+
docker run \
7+
-v $(shell pwd):/mnt \
8+
-v /var/run/docker.sock:/var/run/docker.sock \
9+
$(BUILD_IMAGE)

meta/main.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
---
22
galaxy_info:
3-
author: ANXS crew
4-
company: ANXS
3+
author: "ANXS crew"
4+
company: "ANXS"
55
description: "Installs python, pip, setuptools and virtualenv"
6-
min_ansible_version: 2.7
7-
license: MIT
6+
min_ansible_version: 2.9
7+
license: "MIT"
88
platforms:
9-
- name: Ubuntu
9+
- name: "Ubuntu"
1010
versions:
11-
- all
11+
- "bionic"
12+
- "focal"
1213
categories:
13-
- system
14-
- development
14+
- "system"
15+
- "development"
1516

1617
dependencies: []

molecule/default/molecule.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
driver:
3+
name: "docker"
4+
platforms:
5+
- name: "default-bionic"
6+
image: "anxsscaffolding/ubuntu-bionic"
7+
command: /sbin/init
8+
pre_build_image: true
9+
tmpfs:
10+
- /run
11+
- /run/lock
12+
- /tmp
13+
privileged: true
14+
volumes:
15+
- /sys/fs/cgroup:/sys/fs/cgroup:ro
16+
- name: "default-focal"
17+
image: "anxsscaffolding/ubuntu-focal"
18+
command: /sbin/init
19+
pre_build_image: true
20+
tmpfs:
21+
- /run
22+
- /run/lock
23+
- /tmp
24+
privileged: true
25+
volumes:
26+
- /sys/fs/cgroup:/sys/fs/cgroup:ro
27+
provisioner:
28+
name: ansible
29+
playbooks:
30+
converge: ../resources/playbooks/converge.yml
31+
prepare: ../resources/playbooks/prepare.yml
32+
verifier:
33+
name: testinfra
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
- name: Converge
3+
hosts: all
4+
tasks:
5+
- name: "Include ANXS Role"
6+
include_role:
7+
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

requirements-dev.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
molecule
2+
molecule-docker
3+
docker-py
4+
netaddr
5+
pytest
6+
testinfra

tasks/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
- name: "Get the distribution specific variables"
3+
include_vars: "{{ansible_distribution|lower}}-{{ansible_distribution_version}}.yml"
24
- include_tasks: "package.yml"
35
- include_tasks: "pip.yml"
46
- include_tasks: "virtualenv.yml"

tasks/package.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
---
2-
- name: "Get the distribution specific variables"
3-
include_vars: "{{ansible_os_family}}.yml"
2+
- name: "Make sure the packages are installed"
3+
apt:
4+
pkg: "{{python_packages_add}}"
5+
state: "present"
6+
when: python_packages|default([])|length > 0
47

5-
- name: "Make sure the packages are installed (Debian)"
8+
- name: "Make sure old packages are removed"
69
apt:
7-
pkg: "{{python_packages}}"
8-
state: present
9-
when: ansible_os_family == "Debian"
10+
pkg: "{{python_packages_remove}}"
11+
state: "absent"
12+
when: python_packages_old|default([])|length > 0

tasks/pip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
url: "{{get_pip_url}}"
66

77
- name: "install pip"
8-
command: python /tmp/get-pip.py
8+
command: python3 /tmp/get-pip.py
99
args:
1010
creates: "{{python_pip_location}}"
1111

vars/Debian.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)