Jessica Wagantall | 564913e | 2018-03-19 13:41:33 -0700 | [diff] [blame] | 1 | --- |
| 2 | - import_playbook: ../common-packer/provision/baseline.yaml |
Jessica Wagantall | c946934 | 2019-10-07 11:35:53 -0700 | [diff] [blame] | 3 | |
| 4 | - hosts: all |
| 5 | become_user: root |
| 6 | become_method: sudo |
| 7 | |
Jessica Wagantall | f32a501 | 2019-10-07 12:01:32 -0700 | [diff] [blame] | 8 | tasks: |
efiacor | 27f55b7 | 2019-11-27 20:02:52 +0000 | [diff] [blame] | 9 | - apt_repository: |
efiacor | 27f55b7 | 2019-11-27 20:02:52 +0000 | [diff] [blame] | 10 | repo: ppa:deadsnakes/ppa |
| 11 | state: present |
| 12 | become: true |
| 13 | when: ansible_distribution == 'Ubuntu' |
| 14 | |
Jessica Wagantall | c946934 | 2019-10-07 11:35:53 -0700 | [diff] [blame] | 15 | - name: Update and upgrade apt packages |
| 16 | apt: |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 17 | upgrade: "yes" |
| 18 | update_cache: true |
Jessica Wagantall | c946934 | 2019-10-07 11:35:53 -0700 | [diff] [blame] | 19 | become: true |
| 20 | when: ansible_distribution == 'Ubuntu' |
| 21 | |
Jessica Wagantall | c946934 | 2019-10-07 11:35:53 -0700 | [diff] [blame] | 22 | - name: Install Python 3.6 and packages |
| 23 | apt: |
| 24 | name: |
| 25 | - python3.6 |
| 26 | - python3.6-dev |
| 27 | - python3.6-tk |
| 28 | - libssl-dev |
| 29 | - libmysqlclient-dev |
| 30 | - gcc |
Jessica Wagantall | 175d5ef | 2020-02-20 10:23:58 -0800 | [diff] [blame] | 31 | - python3-venv |
Jessica Wagantall | c946934 | 2019-10-07 11:35:53 -0700 | [diff] [blame] | 32 | become: true |
| 33 | when: ansible_distribution == 'Ubuntu' |
| 34 | |
efiacor | 27f55b7 | 2019-11-27 20:02:52 +0000 | [diff] [blame] | 35 | - name: Install Python 3.7 |
| 36 | apt: |
| 37 | name: |
| 38 | - python3.7 |
| 39 | - python3.7-dev |
| 40 | - python3.7-tk |
| 41 | become: true |
| 42 | when: ansible_distribution == 'Ubuntu' |
| 43 | |
vv770d | 4f9ba44 | 2020-07-17 20:46:45 +0000 | [diff] [blame] | 44 | - name: Install Python 3.8 |
| 45 | apt: |
| 46 | name: |
| 47 | - python3.8 |
| 48 | - python3.8-dev |
| 49 | - python3.8-tk |
| 50 | become: true |
| 51 | when: ansible_distribution == 'Ubuntu' |
| 52 | |
Michal Jagiello | 9f7857e | 2021-01-22 22:24:57 +0000 | [diff] [blame] | 53 | - name: Install Python 3.9 |
| 54 | apt: |
| 55 | name: |
| 56 | - python3.9 |
| 57 | - python3.9-dev |
| 58 | - python3.9-tk |
Bengt Thuree | 14473ea | 2021-03-16 13:29:06 +1100 | [diff] [blame] | 59 | - python3.9-distutils |
Michal Jagiello | 9f7857e | 2021-01-22 22:24:57 +0000 | [diff] [blame] | 60 | become: true |
| 61 | when: ansible_distribution == 'Ubuntu' |
| 62 | |
Bengt Thuree | 1c1e1fa | 2020-03-04 13:01:27 +1100 | [diff] [blame] | 63 | - name: Install libssl1.0-dev dep |
| 64 | apt: |
| 65 | name: libssl1.0-dev |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 66 | update_cache: true |
Bengt Thuree | 1c1e1fa | 2020-03-04 13:01:27 +1100 | [diff] [blame] | 67 | state: fixed |
| 68 | become: true |
| 69 | when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04' |
| 70 | |
Jessica Wagantall | a6a20d7 | 2022-09-07 12:00:18 -0700 | [diff] [blame] | 71 | - name: Install supporting packages (Ubuntu 18.04) |
Jessica Wagantall | c946934 | 2019-10-07 11:35:53 -0700 | [diff] [blame] | 72 | apt: |
| 73 | name: |
| 74 | - unzip |
| 75 | - xz-utils |
| 76 | - libxml-xpath-perl |
| 77 | - wget |
| 78 | - make |
Jessica Wagantall | c946934 | 2019-10-07 11:35:53 -0700 | [diff] [blame] | 79 | - sshuttle |
| 80 | - netcat |
| 81 | - libssl-dev |
| 82 | - libffi-dev |
Jessica Wagantall | c946934 | 2019-10-07 11:35:53 -0700 | [diff] [blame] | 83 | - xmlstarlet |
| 84 | - xvfb |
| 85 | - crudini |
| 86 | - maven |
| 87 | - python-ncclient |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 88 | update_cache: true |
Jessica Wagantall | a6a20d7 | 2022-09-07 12:00:18 -0700 | [diff] [blame] | 89 | state: fixed |
| 90 | become: true |
| 91 | when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04' |
| 92 | |
| 93 | - name: Install supporting packages (Ubuntu 20.04) |
| 94 | apt: |
| 95 | name: |
| 96 | - unzip |
| 97 | - xz-utils |
| 98 | - libxml-xpath-perl |
| 99 | - wget |
| 100 | - make |
| 101 | - sshuttle |
| 102 | - netcat |
| 103 | - libssl-dev |
| 104 | - libffi-dev |
Jessica Wagantall | 2520197 | 2020-02-19 12:00:04 -0800 | [diff] [blame] | 105 | - xmlstarlet |
| 106 | - xvfb |
| 107 | - crudini |
| 108 | - maven |
Bengt Thuree | 1610dcb | 2022-09-08 19:26:17 +1000 | [diff] [blame] | 109 | - python3-ncclient |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 110 | update_cache: true |
Jessica Wagantall | a6a20d7 | 2022-09-07 12:00:18 -0700 | [diff] [blame] | 111 | state: fixed |
Jessica Wagantall | c946934 | 2019-10-07 11:35:53 -0700 | [diff] [blame] | 112 | become: true |
Jessica Wagantall | a6a20d7 | 2022-09-07 12:00:18 -0700 | [diff] [blame] | 113 | when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04' |
Bengt Thuree | 1c1e1fa | 2020-03-04 13:01:27 +1100 | [diff] [blame] | 114 | |
Jessica Wagantall | 049b42e | 2023-04-11 14:37:26 -0700 | [diff] [blame] | 115 | - name: Install nodejs and npm |
| 116 | block: |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 117 | - name: "Pull latest nodejs version" |
Jessica Wagantall | 36defa9 | 2023-04-11 15:45:04 -0700 | [diff] [blame] | 118 | shell: | |
| 119 | curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - && sudo apt-get install -y nodejs |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 120 | become: true |
| 121 | - name: "Check nodejs version" |
Jessica Wagantall | 049b42e | 2023-04-11 14:37:26 -0700 | [diff] [blame] | 122 | command: node --version |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 123 | - name: "Check npm version" |
Jessica Wagantall | 049b42e | 2023-04-11 14:37:26 -0700 | [diff] [blame] | 124 | command: npm --version |
| 125 | when: ansible_distribution == 'Ubuntu' |
| 126 | |
| 127 | - name: Install npm build tools |
Bengt Thuree | 1c1e1fa | 2020-03-04 13:01:27 +1100 | [diff] [blame] | 128 | apt: |
Jessica Wagantall | 049b42e | 2023-04-11 14:37:26 -0700 | [diff] [blame] | 129 | name: build-essential |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 130 | update_cache: true |
Bengt Thuree | 1c1e1fa | 2020-03-04 13:01:27 +1100 | [diff] [blame] | 131 | state: fixed |
| 132 | become: true |
| 133 | when: ansible_distribution == 'Ubuntu' |
| 134 | |
Bengt Thuree | 737eca2 | 2022-10-13 12:50:30 +1100 | [diff] [blame] | 135 | - name: Install enchant2 package for Ubuntu 20.04 |
Bengt Thuree | fb285eb | 2022-10-07 11:17:11 +1100 | [diff] [blame] | 136 | apt: |
| 137 | name: |
| 138 | - enchant-2 |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 139 | update_cache: true |
Bengt Thuree | fb285eb | 2022-10-07 11:17:11 +1100 | [diff] [blame] | 140 | state: present |
| 141 | become: true |
Bengt Thuree | 737eca2 | 2022-10-13 12:50:30 +1100 | [diff] [blame] | 142 | when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04' |
| 143 | |
| 144 | - name: Install enchant package for Ubuntu 18.04 |
| 145 | apt: |
| 146 | name: |
| 147 | - enchant |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 148 | update_cache: true |
Bengt Thuree | 737eca2 | 2022-10-13 12:50:30 +1100 | [diff] [blame] | 149 | state: present |
| 150 | become: true |
| 151 | when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04' |
Bengt Thuree | 1c1e1fa | 2020-03-04 13:01:27 +1100 | [diff] [blame] | 152 | |
Bengt Thuree | fb285eb | 2022-10-07 11:17:11 +1100 | [diff] [blame] | 153 | - name: Install enchant2 package for CentOS |
| 154 | dnf: |
| 155 | name: |
| 156 | - enchant2 |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 157 | update_cache: true |
Bengt Thuree | fb285eb | 2022-10-07 11:17:11 +1100 | [diff] [blame] | 158 | state: present |
| 159 | become: true |
| 160 | when: ansible_distribution == 'CentOS' |