Update ubuntu packages
[ci-management.git] / packer / provision / local-builder.yaml
1 ---
2 - import_playbook: ../common-packer/provision/baseline.yaml
3
4 - hosts: all
5   become_user: root
6   become_method: sudo
7
8   tasks:
9     - apt_repository:
10         repo: ppa:deadsnakes/ppa
11         state: present
12       become: true
13       when: ansible_distribution == 'Ubuntu'
14
15     - name: Update and upgrade apt packages
16       apt:
17         upgrade: yes
18         update_cache: yes
19       become: true
20       when: ansible_distribution == 'Ubuntu'
21
22     - name: Install python-tox
23       pip:
24         name: tox
25         state: present
26       become: true
27
28     - name: Install Python 3.6 and packages
29       apt:
30         name:
31           - python3.6
32           - python3.6-dev
33           - python3.6-tk
34           - libssl-dev
35           - libmysqlclient-dev
36           - gcc
37           - python3-venv
38       become: true
39       when: ansible_distribution == 'Ubuntu'
40
41     - name: Install Python 3.7
42       apt:
43         name:
44           - python3.7
45           - python3.7-dev
46           - python3.7-tk
47       become: true
48       when: ansible_distribution == 'Ubuntu'
49
50     - name: Install base packages
51       apt:
52         name:
53           - unzip
54           - xz-utils
55           - libxml-xpath-perl
56           - wget
57           - make
58           - sshuttle
59           - netcat
60           - libssl-dev
61           - libffi-dev
62           - xmlstarlet
63           - xvfb
64           - crudini
65           - maven
66           - python-ncclient
67           - xmlstarlet
68           - xvfb
69           - crudini
70           - maven
71           - python-ncclient
72           - nodejs-dev
73           - node-gyp
74           - nodejs
75           - npm
76         update_cache: yes
77       become: true
78       when: ansible_distribution == 'Ubuntu'