Workaround to install nodejs
[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 and deps
23       pip:
24         name:
25           - tox
26           - tox-pyenv
27           - virtualenv
28           - more-itertools~=5.0.0
29           - zipp==1.0.0
30         state: present
31       become: true
32
33     - name: Install Python 3.6 and packages
34       apt:
35         name:
36           - python3.6
37           - python3.6-dev
38           - python3.6-tk
39           - libssl-dev
40           - libmysqlclient-dev
41           - gcc
42           - python3-venv
43       become: true
44       when: ansible_distribution == 'Ubuntu'
45
46     - name: Install Python 3.7
47       apt:
48         name:
49           - python3.7
50           - python3.7-dev
51           - python3.7-tk
52       become: true
53       when: ansible_distribution == 'Ubuntu'
54
55     - name: Install libssl1.0-dev dep
56       apt:
57         name: libssl1.0-dev
58         update_cache: yes
59         state: fixed
60       become: true
61       when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
62
63     - name: Install nodejs-dev dep for npm
64       apt:
65         name: nodejs-dev
66         update_cache: yes
67         state: fixed
68       become: true
69       when: ansible_distribution == 'Ubuntu'
70
71     - name: Install base packages
72       apt:
73         name:
74           - unzip
75           - xz-utils
76           - libxml-xpath-perl
77           - wget
78           - make
79           - sshuttle
80           - netcat
81           - libssl-dev
82           - libffi-dev
83           - xmlstarlet
84           - xvfb
85           - crudini
86           - maven
87           - python-ncclient
88           - xmlstarlet
89           - xvfb
90           - crudini
91           - maven
92           - python-ncclient
93         update_cache: yes
94       become: true
95       when: ansible_distribution == 'Ubuntu'
96
97     - name: Install npm and addon packages
98       apt:
99         name:
100           - nodejs
101           - npm
102           - node-gyp
103         update_cache: yes
104         state: fixed
105       become: true
106       when: ansible_distribution == 'Ubuntu'
107
108