Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions roles/fdsbot/tasks/setup_slack_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,37 +64,6 @@
become_user: "{{ fdsbot_user }}"
changed_when: false

# the ansible-core version currently used is unsupported by ansible-galaxy
# TODO: upgrade ansible-core

# - name: Upgrade ansible galaxy community.general
# ansible.builtin.command:
# cmd: "{{ fdsbot_ansible_dir }}/ansible-env/bin/ansible-galaxy collection install -U community.general"
# become_user: "{{ fdsbot_user }}"
# become: true
# changed_when: false

# - name: Upgrade ansible galaxy community.postgresql
# ansible.builtin.command:
# cmd: "{{ fdsbot_ansible_dir }}/ansible-env/bin/ansible-galaxy collection install -U community.postgresql"
# become_user: "{{ fdsbot_user }}"
# become: true
# changed_when: false

# - name: Upgrade ansible galaxy ansible.posix
# ansible.builtin.command:
# cmd: "{{ fdsbot_ansible_dir }}/ansible-env/bin/ansible-galaxy collection install -U ansible.posix"
# become_user: "{{ fdsbot_user }}"
# become: true
# changed_when: false

# - name: Upgrade ansible galaxy community.rabbitmq
# ansible.builtin.command:
# cmd: "{{ fdsbot_ansible_dir }}/ansible-env/bin/ansible-galaxy collection install -U community.rabbitmq"
# become_user: "{{ fdsbot_user }}"
# become: true
# changed_when: false

- name: Setup fdsbot Git repo
ansible.builtin.git:
repo: "{{ fdsbot_git_repo }}"
Expand All @@ -106,12 +75,6 @@
notify:
- restart fdsbot

- name: Setup pnpm
ansible.builtin.command: corepack enable pnpm
become: true
become_user: root
changed_when: false

- name: Install fdsbot dependencies
ansible.builtin.command: pnpm install
args:
Expand All @@ -128,10 +91,6 @@
become: true
changed_when: false

- name: test
ansible.builtin.debug:
msg: "{{ fdsbot_deployment_highlights }}"

- name: Set fdsbot systemd service
ansible.builtin.template:
src: fdsbot.service.j2
Expand Down
51 changes: 21 additions & 30 deletions roles/nodejs/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
- name: Add node key
ansible.builtin.apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
state: present
retries: 3
delay: 10
when: ansible_distribution_major_version|int <= 22

- name: Add node key
ansible.builtin.apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key
state: present
retries: 3
delay: 10
when: ansible_distribution_major_version|int >= 24

- name: Add node to the sources list
ansible.builtin.apt_repository:
repo: "deb https://deb.nodesource.com/node_22.x {{ ansible_distribution_release }} main"
update_cache: "{{ update_apt_cache }}"
state: present
when: ansible_distribution_major_version|int <= 22

- name: Add node to the sources list
- name: Remove old node versions from the sources list
ansible.builtin.apt_repository:
repo: "deb https://deb.nodesource.com/node_22.x nodistro main"
Comment thread
krmax44 marked this conversation as resolved.
Resolved
update_cache: "{{ update_apt_cache }}"
state: absent

- name: Add node repo
ansible.builtin.deb822_repository:
name: nodesource
types: [deb]
uris: https://deb.nodesource.com/node_26.x
suites: [nodistro]
components: [main]
signed_by: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key
state: present
when: ansible_distribution_major_version|int >= 24

- name: Install node
ansible.builtin.apt:
name:
- nodejs
update_cache: "{{ update_apt_cache }}"
state: latest

tags: packages
retries: 3
delay: 10

- name: Setup pnpm
ansible.builtin.command: corepack enable pnpm
become: true
become_user: root
# TODO: remove once corepack is disabled globally
- name: Disable corepack

Check warning on line 28 in roles/nodejs/tasks/main.yml

View workflow job for this annotation

GitHub Actions / lint

ignore-errors

Use failed_when and specify error conditions instead of using ignore_errors.
ansible.builtin.command: corepack disable
changed_when: false
ignore_errors: true

- name: Install pnpm
community.general.npm:
name: pnpm
global: true
state: latest
Loading