From 64597a7d693fdd3d698842043b9de569aaa018bc Mon Sep 17 00:00:00 2001 From: Bryan Black Date: Wed, 26 Oct 2022 21:19:27 -0700 Subject: [PATCH] add common dependencies that need their own repositories --- ansible/roles/common/tasks/install-node.yml | 24 +++++++++++++++++++++ ansible/roles/common/tasks/main.yml | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 ansible/roles/common/tasks/install-node.yml create mode 100644 ansible/roles/common/tasks/main.yml diff --git a/ansible/roles/common/tasks/install-node.yml b/ansible/roles/common/tasks/install-node.yml new file mode 100644 index 0000000..1d75c57 --- /dev/null +++ b/ansible/roles/common/tasks/install-node.yml @@ -0,0 +1,24 @@ +- name: Remove node + become_user: root + become: true + apt: + state: absent + update_cache: yes + cache_valid_time: 604800 + pkg: + - nodejs + +- name: add node apt repository + become_user: root + become: true + ansible.builtin.shell: "curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - " + +- name: Install node + become_user: root + become: true + apt: + state: present + update_cache: yes + cache_valid_time: 604800 + pkg: + - nodejs diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml new file mode 100644 index 0000000..5232406 --- /dev/null +++ b/ansible/roles/common/tasks/main.yml @@ -0,0 +1,3 @@ +- import_tasks: install-node.yml + tags: + - install-node