|
|
@ -2,9 +2,10 @@ |
|
|
|
- hosts: service |
|
|
|
remote_user: docker |
|
|
|
gather_facts: no |
|
|
|
become: yes |
|
|
|
vars: |
|
|
|
user: "docker" |
|
|
|
NODEJS_VERSION: "16" |
|
|
|
NODEJS_VERSION: "14" |
|
|
|
ansible_distribution_release: "xenial" #trusty |
|
|
|
|
|
|
|
tasks: |
|
|
@ -14,24 +15,15 @@ |
|
|
|
repo: https://git.swarmlab.io:3000/Lefteris/dummyservice.git |
|
|
|
dest: /project/courses/dummy |
|
|
|
force: yes |
|
|
|
# - name: apt update packages |
|
|
|
# become: true |
|
|
|
# apt: |
|
|
|
# update_cache: 'yes' |
|
|
|
# force_apt_get: 'yes' |
|
|
|
# upgrade: 'dist' |
|
|
|
# cache_valid_time: 3600 |
|
|
|
# install_recommends: true |
|
|
|
# autoremove: true |
|
|
|
# - name: Install the gpg key for nodejs LTS |
|
|
|
# apt_key: |
|
|
|
# url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" |
|
|
|
# state: present |
|
|
|
# - name: Install the nodejs LTS repos |
|
|
|
# apt_repository: |
|
|
|
# repo: "deb https://deb.nodesource.com/node_{{ NODEJS_VERSION }}.x {{ ansible_distribution_release }} main" |
|
|
|
# state: present |
|
|
|
# update_cache: yes |
|
|
|
- name: Install the gpg key for nodejs LTS |
|
|
|
apt_key: |
|
|
|
url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" |
|
|
|
state: present |
|
|
|
- name: Install the nodejs LTS repos |
|
|
|
apt_repository: |
|
|
|
repo: "deb https://deb.nodesource.com/node_{{ NODEJS_VERSION }}.x {{ ansible_distribution_release }} main" |
|
|
|
state: present |
|
|
|
update_cache: yes |
|
|
|
- name: Install the nodejs |
|
|
|
become: true |
|
|
|
apt: |
|
|
|