Skip to content

Commit

Permalink
Merge branch 'dev' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Nov 27, 2024
2 parents 0a1233b + c99e836 commit 761bf4d
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 15 deletions.
1 change: 0 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ skip_list:
- risky-file-permissions

mock_roles:
- geerlingguy.docker
- autoscaling

mock_modules:
Expand Down
7 changes: 0 additions & 7 deletions emgb/emgb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
name: python-is-python3
state: present

- name: Install Docker role
include_role:
name: geerlingguy.docker
vars:
docker_users:
- ubuntu
docker_compose_package: docker-compose-plugin

- name: Install yq
ansible.builtin.shell: |
Expand Down
3 changes: 3 additions & 0 deletions generic/generic_pre_tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@
ansible.builtin.apt:
name: python3-pip
state: latest

- name: Setup Docker
ansible.builtin.import_tasks: ../generic/setup_docker.yml
75 changes: 75 additions & 0 deletions generic/setup_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
- name: Update and upgrade all packages to the latest version
ansible.builtin.apt:
update_cache: true
upgrade: dist
cache_valid_time: 3600

- name: Install required packages
ansible.builtin.apt:
pkg:
- apt-transport-https
- ca-certificates
- curl
- gnupg
- software-properties-common

- name: Create directory for Docker's GPG key
ansible.builtin.file:
path: /etc/apt/keyrings
state: directory
mode: "0755"

- name: Add Docker's official GPG key
ansible.builtin.apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
keyring: /etc/apt/keyrings/docker.gpg
state: present

- name: Print architecture variables
ansible.builtin.debug:
msg: "Architecture: {{ ansible_architecture }}, Codename: {{ ansible_lsb.codename }}"

- name: Add Docker repository
ansible.builtin.apt_repository:
repo: >-
deb [arch={{ arch_mapping[ansible_architecture] | default(ansible_architecture) }}
signed-by=/etc/apt/keyrings/docker.gpg]
https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable
filename: docker
state: present
vars:
arch_mapping:
x86_64: amd64

- name: Install Docker and related packages
ansible.builtin.apt:
name: "{{ item }}"
state: present
update_cache: true
with_items:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin

- name: Add Docker group
ansible.builtin.group:
name: docker
state: present

- name: Add user to Docker group
ansible.builtin.user:
name: "{{ ansible_user }}"
groups: docker
append: true

- name: Enable and start Docker services
ansible.builtin.systemd:
name: "{{ item }}"
enabled: true
state: started
with_items:
- docker.service
- containerd.service
4 changes: 2 additions & 2 deletions packer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
openstacksdk==4.0.0
openstacksdk==4.0.1
ansible==10.4.0
python-openstackclient==7.1.2
python-openstackclient==7.1.3
paramiko==3.5.0
passlib==1.7.4
3 changes: 0 additions & 3 deletions packer/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ roles:
- name: andrewrothstein.miniconda
version: v6.4.0

- name: geerlingguy.docker
version: 7.4.1

- name: autoscaling
src: https://github.com/deNBI/autoscaling-ansible
version: 1.8.7
Expand Down
2 changes: 1 addition & 1 deletion vscode/vscode_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ wiki_link: ""
logo_url: "https://cloud.denbi.de/static/images/vscode.png"
info_url: ""
information_for_display:
version: v4.95.2
version: v4.95.3
2 changes: 1 addition & 1 deletion vscode/vscode_vars_file.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
vscode_vars:
INSTALL_SCRIPT_URL: https://code-server.dev/install.sh
VSCODE_VERSION: v4.95.2
VSCODE_VERSION: v4.95.3
DEFAULT_USER: ubuntu
PORT: 3000

0 comments on commit 761bf4d

Please sign in to comment.