From 804e8ddcbabb2e12112007e8089d6defd1428706 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Mon, 11 Nov 2024 10:11:37 +0100 Subject: [PATCH 1/6] feat(Playbook):created own generic part --- generic/generic_post_tasks.yml | 22 +++++++++++ generic/generic_pre_tasks.yml | 61 +++++++++++++++++++++++++++++ packer/packer_resenvs.yml | 71 +++------------------------------- 3 files changed, 88 insertions(+), 66 deletions(-) create mode 100644 generic/generic_post_tasks.yml create mode 100644 generic/generic_pre_tasks.yml diff --git a/generic/generic_post_tasks.yml b/generic/generic_post_tasks.yml new file mode 100644 index 00000000..cea16fa3 --- /dev/null +++ b/generic/generic_post_tasks.yml @@ -0,0 +1,22 @@ +--- +- name: Generic POST Tasks + hosts: all + become: true + gather_facts: true + tasks: + - name: Generic POST Tasks + ansible.builtin.import_tasks: ../generic/generic_post_tasks.yml + - name: POST_TASK enable unattended upgrades + ansible.builtin.lineinfile: + path: /etc/apt/apt.conf.d/10periodic + regexp: ^APT::Periodic::Unattended-Upgrade + line: APT::Periodic::Unattended-Upgrade "1"; + create: true + - name: POST_TASK Start apt-daily.* systemd services + ansible.builtin.service: + name: "{{ item }}" + state: started + with_items: + - unattended-upgrades + - apt-daily + - apt-daily.timer diff --git a/generic/generic_pre_tasks.yml b/generic/generic_pre_tasks.yml new file mode 100644 index 00000000..21d6505d --- /dev/null +++ b/generic/generic_pre_tasks.yml @@ -0,0 +1,61 @@ +--- +- name: Generic PRE Tasks + hosts: all + become: true + gather_facts: true + tasks: + - name: Generic PRE Tasks + ansible.builtin.import_tasks: ../generic/generic_pre_tasks.yml + + - name: PRE_TASK Wait for cloud-init / user-data to finish + ansible.builtin.command: cloud-init status --wait + changed_when: false + + - name: Populate service facts + ansible.builtin.service_facts: + - name: Wait till Apt_Mirror de.NBI Bielefeld Service is done + ansible.builtin.service_facts: + until: services['de.NBI_Bielefeld_environment.service'].state == 'stopped' + retries: 35 + delay: 10 + when: services['de.NBI_Bielefeld_environment.service'] is defined + + - name: PRE_TASK Disable unattended upgrades + ansible.builtin.lineinfile: + path: /etc/apt/apt.conf.d/10periodic + regexp: ^APT::Periodic::Unattended-Upgrade + line: APT::Periodic::Unattended-Upgrade "0"; + create: true + - name: PRE_TASK Stop apt-daily.* systemd services + ansible.builtin.service: + name: "{{ item }}" + state: stopped + with_items: + - unattended-upgrades + - apt-daily + - apt-daily.timer + - apt-daily-upgrade + - apt-daily-upgrade.timer + + - name: PRE_TASK Wait for automatic system updates 1 + ansible.builtin.shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; + changed_when: false + + - name: PRE_TASK Wait for automatic system updates 2 + ansible.builtin.shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; + changed_when: false + + - name: PRE_TASK Update apt cache + become: true + ansible.builtin.apt: + upgrade: true + update_cache: true + autoremove: true + autoclean: true + + + - name: Pip + ansible.builtin.apt: + name: python3-pip + state: latest + diff --git a/packer/packer_resenvs.yml b/packer/packer_resenvs.yml index 9a7cfdfa..bd00e951 100644 --- a/packer/packer_resenvs.yml +++ b/packer/packer_resenvs.yml @@ -8,58 +8,8 @@ bielefeld_mirror_service_exist: false resenv: guacamole pre_tasks: - - name: PRE_TASK Wait for cloud-init / user-data to finish - ansible.builtin.command: cloud-init status --wait - changed_when: false - - - name: Populate service facts - ansible.builtin.service_facts: - - name: Wait till Apt_Mirror de.NBI Bielefeld Service is done - ansible.builtin.service_facts: - until: services['de.NBI_Bielefeld_environment.service'].state == 'stopped' - retries: 35 - delay: 10 - when: services['de.NBI_Bielefeld_environment.service'] is defined - - - name: PRE_TASK Disable unattended upgrades - ansible.builtin.lineinfile: - path: /etc/apt/apt.conf.d/10periodic - regexp: ^APT::Periodic::Unattended-Upgrade - line: APT::Periodic::Unattended-Upgrade "0"; - create: true - - name: PRE_TASK Stop apt-daily.* systemd services - ansible.builtin.service: - name: "{{ item }}" - state: stopped - with_items: - - unattended-upgrades - - apt-daily - - apt-daily.timer - - apt-daily-upgrade - - apt-daily-upgrade.timer - - - name: PRE_TASK Wait for automatic system updates 1 - ansible.builtin.shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; - changed_when: false - - - name: PRE_TASK Wait for automatic system updates 2 - ansible.builtin.shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; - changed_when: false - - - name: PRE_TASK Update apt cache - become: true - ansible.builtin.apt: - upgrade: true - update_cache: true - autoremove: true - autoclean: true - - - - name: Pip - ansible.builtin.apt: - name: python3-pip - state: latest - + - name: Generic PRE Tasks + ansible.builtin.import_tasks: ../generic/generic_pre_tasks.yml tasks: - name: Include {{ resenv }} variables @@ -70,17 +20,6 @@ ansible.builtin.import_tasks: ../{{ resenv }}/{{ resenv }}.yml post_tasks: - - name: POST_TASK enable unattended upgrades - ansible.builtin.lineinfile: - path: /etc/apt/apt.conf.d/10periodic - regexp: ^APT::Periodic::Unattended-Upgrade - line: APT::Periodic::Unattended-Upgrade "1"; - create: true - - name: POST_TASK Start apt-daily.* systemd services - ansible.builtin.service: - name: "{{ item }}" - state: started - with_items: - - unattended-upgrades - - apt-daily - - apt-daily.timer + - name: Generic POST Tasks + ansible.builtin.import_tasks: ../generic/generic_post_tasks.yml + From 0156cee7711ddad3ff9f81f979bf51c87845cebb Mon Sep 17 00:00:00 2001 From: dweinholz Date: Mon, 11 Nov 2024 10:59:45 +0100 Subject: [PATCH 2/6] updated playbook --- generic/generic_post_tasks.yml | 18 +++---- generic/generic_pre_tasks.yml | 85 ++++++++++++++++------------------ 2 files changed, 48 insertions(+), 55 deletions(-) diff --git a/generic/generic_post_tasks.yml b/generic/generic_post_tasks.yml index cea16fa3..7b4ec26f 100644 --- a/generic/generic_post_tasks.yml +++ b/generic/generic_post_tasks.yml @@ -1,22 +1,18 @@ --- + - name: Generic POST Tasks - hosts: all - become: true - gather_facts: true - tasks: - - name: Generic POST Tasks - ansible.builtin.import_tasks: ../generic/generic_post_tasks.yml - - name: POST_TASK enable unattended upgrades - ansible.builtin.lineinfile: + ansible.builtin.import_tasks: ../generic/generic_post_tasks.yml +- name: POST_TASK enable unattended upgrades + ansible.builtin.lineinfile: path: /etc/apt/apt.conf.d/10periodic regexp: ^APT::Periodic::Unattended-Upgrade line: APT::Periodic::Unattended-Upgrade "1"; create: true - - name: POST_TASK Start apt-daily.* systemd services - ansible.builtin.service: +- name: POST_TASK Start apt-daily.* systemd services + ansible.builtin.service: name: "{{ item }}" state: started - with_items: + with_items: - unattended-upgrades - apt-daily - apt-daily.timer diff --git a/generic/generic_pre_tasks.yml b/generic/generic_pre_tasks.yml index 21d6505d..7c85503f 100644 --- a/generic/generic_pre_tasks.yml +++ b/generic/generic_pre_tasks.yml @@ -1,61 +1,58 @@ --- - name: Generic PRE Tasks - hosts: all - become: true - gather_facts: true - tasks: - - name: Generic PRE Tasks - ansible.builtin.import_tasks: ../generic/generic_pre_tasks.yml - - - name: PRE_TASK Wait for cloud-init / user-data to finish - ansible.builtin.command: cloud-init status --wait - changed_when: false - - - name: Populate service facts - ansible.builtin.service_facts: - - name: Wait till Apt_Mirror de.NBI Bielefeld Service is done - ansible.builtin.service_facts: - until: services['de.NBI_Bielefeld_environment.service'].state == 'stopped' - retries: 35 - delay: 10 - when: services['de.NBI_Bielefeld_environment.service'] is defined - - - name: PRE_TASK Disable unattended upgrades - ansible.builtin.lineinfile: - path: /etc/apt/apt.conf.d/10periodic - regexp: ^APT::Periodic::Unattended-Upgrade - line: APT::Periodic::Unattended-Upgrade "0"; - create: true - - name: PRE_TASK Stop apt-daily.* systemd services - ansible.builtin.service: - name: "{{ item }}" - state: stopped - with_items: + ansible.builtin.import_tasks: ../generic/generic_pre_tasks.yml + +- name: PRE_TASK Wait for cloud-init / user-data to finish + ansible.builtin.command: cloud-init status --wait + changed_when: false + +- name: Populate service facts + ansible.builtin.service_facts: +- name: Wait till Apt_Mirror de.NBI Bielefeld Service is done + ansible.builtin.service_facts: + until: services['de.NBI_Bielefeld_environment.service'].state == 'stopped' + retries: 35 + delay: 10 + when: services['de.NBI_Bielefeld_environment.service'] is defined + +- name: PRE_TASK Disable unattended upgrades + ansible.builtin.lineinfile: + path: /etc/apt/apt.conf.d/10periodic + regexp: ^APT::Periodic::Unattended-Upgrade + line: APT::Periodic::Unattended-Upgrade "0"; + create: true +- name: PRE_TASK Stop apt-daily.* systemd services + ansible.builtin.service: + name: "{{ item }}" + state: stopped + with_items: - unattended-upgrades - apt-daily - apt-daily.timer - apt-daily-upgrade - apt-daily-upgrade.timer - - name: PRE_TASK Wait for automatic system updates 1 - ansible.builtin.shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; - changed_when: false +- name: PRE_TASK Wait for automatic system updates 1 + ansible.builtin.shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; + changed_when: false - - name: PRE_TASK Wait for automatic system updates 2 - ansible.builtin.shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; - changed_when: false +- name: PRE_TASK Wait for automatic system updates 2 + ansible.builtin.shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; + changed_when: false - - name: PRE_TASK Update apt cache - become: true - ansible.builtin.apt: +- name: PRE_TASK Update apt cache + become: true + ansible.builtin.apt: upgrade: true update_cache: true autoremove: true autoclean: true - - name: Pip - ansible.builtin.apt: - name: python3-pip - state: latest +- name: Pip + ansible.builtin.apt: + name: python3-pip + state: latest + + \ No newline at end of file From c4649ce3ea6ad9cf31009d86129dc65f8167e377 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Mon, 11 Nov 2024 11:13:31 +0100 Subject: [PATCH 3/6] updated playbook --- generic/generic_post_tasks.yml | 3 --- generic/generic_pre_tasks.yml | 3 --- 2 files changed, 6 deletions(-) diff --git a/generic/generic_post_tasks.yml b/generic/generic_post_tasks.yml index 7b4ec26f..973affa5 100644 --- a/generic/generic_post_tasks.yml +++ b/generic/generic_post_tasks.yml @@ -1,7 +1,4 @@ --- - -- name: Generic POST Tasks - ansible.builtin.import_tasks: ../generic/generic_post_tasks.yml - name: POST_TASK enable unattended upgrades ansible.builtin.lineinfile: path: /etc/apt/apt.conf.d/10periodic diff --git a/generic/generic_pre_tasks.yml b/generic/generic_pre_tasks.yml index 7c85503f..ec80a77c 100644 --- a/generic/generic_pre_tasks.yml +++ b/generic/generic_pre_tasks.yml @@ -1,7 +1,4 @@ --- -- name: Generic PRE Tasks - ansible.builtin.import_tasks: ../generic/generic_pre_tasks.yml - - name: PRE_TASK Wait for cloud-init / user-data to finish ansible.builtin.command: cloud-init status --wait changed_when: false From 2ccc57ead1702519d0ad41a0a6cb1381af3d699d Mon Sep 17 00:00:00 2001 From: dweinholz Date: Mon, 11 Nov 2024 11:30:27 +0100 Subject: [PATCH 4/6] updated playbook --- generic/generic_pre_tasks.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/generic/generic_pre_tasks.yml b/generic/generic_pre_tasks.yml index ec80a77c..900d6654 100644 --- a/generic/generic_pre_tasks.yml +++ b/generic/generic_pre_tasks.yml @@ -1,8 +1,4 @@ --- -- name: PRE_TASK Wait for cloud-init / user-data to finish - ansible.builtin.command: cloud-init status --wait - changed_when: false - - name: Populate service facts ansible.builtin.service_facts: - name: Wait till Apt_Mirror de.NBI Bielefeld Service is done From 0289bcb61c000c8e7fd16a4bf7c01494846dab97 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:58:59 +0000 Subject: [PATCH 5/6] feat(Dependencies): Update dependency coder/code-server to v4.95.2 | datasource | package | from | to | | ----------- | ----------------- | ------- | ------- | | github-tags | coder/code-server | v4.95.1 | v4.95.2 | --- vscode/vscode_metadata.yml | 2 +- vscode/vscode_vars_file.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode/vscode_metadata.yml b/vscode/vscode_metadata.yml index 99e521c0..8e920abf 100644 --- a/vscode/vscode_metadata.yml +++ b/vscode/vscode_metadata.yml @@ -18,4 +18,4 @@ wiki_link: "" logo_url: "https://cloud.denbi.de/static/images/vscode.png" info_url: "" information_for_display: - version: v4.95.1 + version: v4.95.2 diff --git a/vscode/vscode_vars_file.yml b/vscode/vscode_vars_file.yml index 46f7aa24..8bbc350c 100644 --- a/vscode/vscode_vars_file.yml +++ b/vscode/vscode_vars_file.yml @@ -1,6 +1,6 @@ --- vscode_vars: INSTALL_SCRIPT_URL: https://code-server.dev/install.sh - VSCODE_VERSION: v4.95.1 + VSCODE_VERSION: v4.95.2 DEFAULT_USER: ubuntu PORT: 3000 From 85f85ff54b74d92d6a7d449a6cb263b6f917c6ab Mon Sep 17 00:00:00 2001 From: dweinholz Date: Wed, 13 Nov 2024 10:51:57 +0100 Subject: [PATCH 6/6] more linting --- .pre-commit-config.yaml | 10 +-- conda/conda.yml | 36 +++++------ generic/generic_pre_tasks.yml | 22 +++---- guacamole/guacamole.yml | 30 ++++----- .../roles/guacamole/tasks/010-guacamole.yml | 2 +- packer/packer_resenvs.yml | 1 - rstudio/rstudio.yml | 64 +++++++++---------- vscode/docker.yml | 12 ++-- vscode/vscode.yml | 4 +- 9 files changed, 89 insertions(+), 92 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e580c53a..13feadca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,7 @@ --- -- repo: https://github.com/ansible/ansible-lint.git - rev: v6.17.2 - hooks: - - id: ansible-lint +repos: + + - repo: https://github.com/ansible/ansible-lint.git + rev: v6.17.2 + hooks: + - id: ansible-lint diff --git a/conda/conda.yml b/conda/conda.yml index 42e6de02..04a7d45f 100644 --- a/conda/conda.yml +++ b/conda/conda.yml @@ -15,29 +15,29 @@ - name: Download Miniconda get_url: - url: https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh - dest: /tmp/miniconda.sh + url: https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + dest: /tmp/miniconda.sh - name: Install Miniconda command: bash /tmp/miniconda.sh -b -p {{conda_vars.CONDA_DIR}} args: - creates: "{{conda_vars.CONDA_DIR}}/bin/conda" + creates: "{{conda_vars.CONDA_DIR}}/bin/conda" - name: Add Miniconda to PATH lineinfile: - path: /etc/profile - line: 'export PATH={{conda_vars.CONDA_DIR}}/bin:$PATH' + path: /etc/profile + line: 'export PATH={{conda_vars.CONDA_DIR}}/bin:$PATH' become: true become_user: root - name: Install conda-env role include_role: - name: andrewrothstein.conda-env + name: andrewrothstein.conda-env vars: - conda_env_conda_dir: "{{conda_vars.CONDA_DIR}}" - conda_env_name: "{{ conda_vars.ENV_NAME| quote }}" - conda_env_environment: conda_env.yml - conda_env_activate_for_login_shell: true + conda_env_conda_dir: "{{conda_vars.CONDA_DIR}}" + conda_env_name: "{{ conda_vars.ENV_NAME| quote }}" + conda_env_environment: conda_env.yml + conda_env_activate_for_login_shell: true - name: Adjust miniconda folder rights become: true @@ -47,38 +47,38 @@ become_user: "{{conda_vars.default_user}}" shell: 'timeout 1m bash -c ''source {{conda_vars.CONDA_DIR}}/bin/activate && conda config --add channels bioconda''' args: - executable: /bin/bash + executable: /bin/bash - name: Add conda-forge channel become_user: "{{conda_vars.default_user}}" shell: 'timeout 1m bash -c ''source {{conda_vars.CONDA_DIR}}/bin/activate && conda config --add channels conda-forge''' args: - executable: /bin/bash + executable: /bin/bash - name: Add anaconda channel become_user: "{{conda_vars.default_user}}" shell: 'timeout 1m bash -c ''source {{conda_vars.CONDA_DIR}}/bin/activate && conda config --add channels anaconda''' args: - executable: /bin/bash + executable: /bin/bash - name: Init .bashrc for conda become_user: "{{conda_vars.default_user}}" shell: 'timeout 1m bash -c ''source {{ conda_vars.CONDA_DIR}}/bin/activate && conda init''' args: - executable: /bin/bash + executable: /bin/bash - name: Create alias for environment become_user: "{{conda_vars.default_user}}" lineinfile: - path: "/home/{{conda_vars.default_user}}/.bashrc" - line: "alias {{conda_vars.ENV_NAME|quote}}='conda activate {{conda_vars.ENV_NAME|quote}}'" + path: "/home/{{conda_vars.default_user}}/.bashrc" + line: "alias {{conda_vars.ENV_NAME|quote}}='conda activate {{conda_vars.ENV_NAME|quote}}'" - name: Check for installed packages become_user: "{{conda_vars.default_user}}" shell: 'source {{conda_vars.CONDA_DIR}}/bin/activate && conda activate {{conda_vars.ENV_NAME|quote}} && conda list' register: added_packages args: - executable: /bin/bash + executable: /bin/bash - name: Install chosen packages become_user: "{{conda_vars.default_user}}" @@ -87,6 +87,6 @@ conda activate {{conda_vars.ENV_NAME|quote}} && conda install --yes {{item.key}}={{item.value.version}} args: - executable: /bin/bash + executable: /bin/bash loop: "{{ q('dict', conda_vars.packages) }}" when: added_packages.stdout.find(item.key) == -1 diff --git a/generic/generic_pre_tasks.yml b/generic/generic_pre_tasks.yml index 900d6654..dd62de7f 100644 --- a/generic/generic_pre_tasks.yml +++ b/generic/generic_pre_tasks.yml @@ -19,11 +19,11 @@ name: "{{ item }}" state: stopped with_items: - - unattended-upgrades - - apt-daily - - apt-daily.timer - - apt-daily-upgrade - - apt-daily-upgrade.timer + - unattended-upgrades + - apt-daily + - apt-daily.timer + - apt-daily-upgrade + - apt-daily-upgrade.timer - name: PRE_TASK Wait for automatic system updates 1 ansible.builtin.shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; @@ -36,16 +36,12 @@ - name: PRE_TASK Update apt cache become: true ansible.builtin.apt: - upgrade: true - update_cache: true - autoremove: true - autoclean: true - + upgrade: true + update_cache: true + autoremove: true + autoclean: true - name: Pip ansible.builtin.apt: name: python3-pip state: latest - - - \ No newline at end of file diff --git a/guacamole/guacamole.yml b/guacamole/guacamole.yml index 14f00809..6229155c 100644 --- a/guacamole/guacamole.yml +++ b/guacamole/guacamole.yml @@ -15,7 +15,7 @@ - name: Install guacamole role ansible.builtin.include_role: - name: guacamole + name: guacamole when: not guacamole_vars.create_only_backend - name: Flush guacamole handlers @@ -25,29 +25,29 @@ - name: Setup password for default ubuntu user - standard become: true ansible.builtin.user: - name: "{{ guacamole_vars.default_user }}" - password: "{{ guacamole_vars.default_password | password_hash('sha512') }}" - update_password: always - password_lock: false + name: "{{ guacamole_vars.default_user }}" + password: "{{ guacamole_vars.default_password | password_hash('sha512') }}" + update_password: always + password_lock: false - name: Restart xrdp ansible.builtin.systemd: - name: xrdp - enabled: true - state: restarted + name: xrdp + enabled: true + state: restarted - name: Restart guacd ansible.builtin.systemd: - name: guacd - enabled: true - state: restarted + name: guacd + enabled: true + state: restarted - name: Restart Tomcat ansible.builtin.systemd: - name: tomcat9 - enabled: true - state: restarted + name: tomcat9 + enabled: true + state: restarted - name: Reload systemd ansible.builtin.systemd: - daemon_reload: true + daemon_reload: true diff --git a/guacamole/roles/guacamole/tasks/010-guacamole.yml b/guacamole/roles/guacamole/tasks/010-guacamole.yml index 948ea17a..c53c93bb 100644 --- a/guacamole/roles/guacamole/tasks/010-guacamole.yml +++ b/guacamole/roles/guacamole/tasks/010-guacamole.yml @@ -1,6 +1,6 @@ --- - name: Add Jammy repository for ubuntu 24 - apt_repository: + ansible.builtin.apt_repository: repo: "deb http://archive.ubuntu.com/ubuntu/ jammy main universe" state: present - name: Install needed libraries and tools diff --git a/packer/packer_resenvs.yml b/packer/packer_resenvs.yml index bd00e951..b49410e0 100644 --- a/packer/packer_resenvs.yml +++ b/packer/packer_resenvs.yml @@ -22,4 +22,3 @@ post_tasks: - name: Generic POST Tasks ansible.builtin.import_tasks: ../generic/generic_post_tasks.yml - diff --git a/rstudio/rstudio.yml b/rstudio/rstudio.yml index 4510ea74..0f08e865 100644 --- a/rstudio/rstudio.yml +++ b/rstudio/rstudio.yml @@ -16,53 +16,53 @@ - name: Setup password for default user become: true ansible.builtin.user: - name: "{{ rstudio_vars.default_user }}" - password: "{{ rstudio_vars.default_password | password_hash('sha512') }}" - update_password: always - password_lock: false + name: "{{ rstudio_vars.default_user }}" + password: "{{ rstudio_vars.default_password | password_hash('sha512') }}" + update_password: always + password_lock: false - name: Install R role include_role: - name: oefenweb.latest_r + name: oefenweb.latest_r when: not rstudio_vars.create_only_backend - name: Install rstudio-server role include_role: - name: oefenweb.rstudio_server + name: oefenweb.rstudio_server vars: - rstudio_install: [ r-base ] - rstudio_server_version: "{{ rstudio_vars.RSTUDIO_VERSION | replace('v', '') | replace('+', '-') }}" + rstudio_install: [r-base] + rstudio_server_version: "{{ rstudio_vars.RSTUDIO_VERSION | replace('v', '') | replace('+', '-') }}" when: not rstudio_vars.create_only_backend - name: Install essential system packages ansible.builtin.apt: - name: - - build-essential - - libcurl4-openssl-dev - - libssl-dev - - zlib1g-dev - - libpng-dev - - libjpeg-dev - - libtiff-dev - - libfreetype6-dev - - libfontconfig1-dev - - libmysqlclient-dev - - libsqlite3-dev - - libpq-dev - - libfribidi-dev - - libharfbuzz-dev - - libxml2-dev - - cmake - state: present - become: yes + name: + - build-essential + - libcurl4-openssl-dev + - libssl-dev + - zlib1g-dev + - libpng-dev + - libjpeg-dev + - libtiff-dev + - libfreetype6-dev + - libfontconfig1-dev + - libmysqlclient-dev + - libsqlite3-dev + - libpq-dev + - libfribidi-dev + - libharfbuzz-dev + - libxml2-dev + - cmake + state: present + become: true - name: Copy session file if also installing rstudio ansible.builtin.copy: - content: session-timeout-minutes=180 - dest: "{{ rstudio_vars.RSESSION_FILE_PATH }}" - mode: "0644" - owner: root - group: root + content: session-timeout-minutes=180 + dest: "{{ rstudio_vars.RSESSION_FILE_PATH }}" + mode: "0644" + owner: root + group: root when: not rstudio_vars.create_only_backend - name: Flush rstudio handlers diff --git a/vscode/docker.yml b/vscode/docker.yml index b3f968c6..43a83136 100644 --- a/vscode/docker.yml +++ b/vscode/docker.yml @@ -1,8 +1,8 @@ --- - name: Update apt package index apt: - update_cache: yes - force_apt_get: yes + update_cache: true + force_apt_get: true - name: Install required packages for apt to use a repository over HTTPS apt: @@ -27,8 +27,8 @@ - name: Update the apt package index again apt: - update_cache: yes - force_apt_get: yes + update_cache: true + force_apt_get: true - name: Install Docker apt: @@ -42,11 +42,11 @@ - name: Ensure Docker service is running systemd: name: docker - enabled: yes + enabled: true state: started - name: Add the user to the docker group (optional) user: name: "{{ ansible_user }}" groups: docker - append: yes \ No newline at end of file + append: true diff --git a/vscode/vscode.yml b/vscode/vscode.yml index 73a43fb1..bf4d9197 100644 --- a/vscode/vscode.yml +++ b/vscode/vscode.yml @@ -3,13 +3,13 @@ become: true lineinfile: path: /etc/pip.conf - create: yes + create: true state: present line: | [global] break-system-packages = true insertafter: EOF - + - name: Download Code Server Install Script ansible.builtin.get_url: url: "{{ vscode_vars.INSTALL_SCRIPT_URL }}"