-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MichaelS
committed
Jun 4, 2024
1 parent
e9110f9
commit cd9a97f
Showing
7 changed files
with
108 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# roles/prepare/meta/main.yml | ||
--- | ||
dependencies: [] | ||
galaxy_info: | ||
author: Michael | ||
description: The role for deploying the lava cache service | ||
company: Impulse Expert | https://impulse.expert | ||
license: GPL | ||
min_ansible_version: "2.9" | ||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- xenial | ||
- bionic | ||
- focal | ||
- name: Debian | ||
versions: | ||
- buster | ||
- bullseye | ||
- bookworm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# roles/prepare/tasks/main.yml | ||
--- | ||
- name: Update the apt cache | ||
ansible.builtin.apt: | ||
update_cache: true | ||
cache_valid_time: 3600 | ||
|
||
# Turn off: need other role process for update runtime systems | ||
#- name: Upgrade all apt packages | ||
# ansible.builtin.apt: | ||
# upgrade: dist | ||
|
||
- name: Install necessary packages | ||
ansible.builtin.apt: | ||
name: | ||
- software-properties-common | ||
- apt-transport-https | ||
- ca-certificates | ||
- sudo | ||
- aria2 | ||
- curl | ||
- htop | ||
- wget | ||
- jq | ||
- lz4 | ||
- rsync | ||
state: present | ||
|
||
- name: Add Docker Repository for Debian | ||
when: ansible_facts['distribution'] == "Debian" | ||
ansible.builtin.shell: | | ||
install -m 0755 -d /etc/apt/keyrings | ||
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc | ||
chmod a+r /etc/apt/keyrings/docker.asc | ||
# Add the repository to Apt sources: | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
- name: Add Docker Repository for Ubuntu | ||
when: ansible_facts['distribution'] == "Ubuntu" | ||
ansible.builtin.shell: | | ||
install -m 0755 -d /etc/apt/keyrings | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | ||
chmod a+r /etc/apt/keyrings/docker.asc | ||
# Add the repository to Apt sources: | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
- name: Update apt and install docker-ce | ||
ansible.builtin.apt: | ||
name: | ||
- docker-ce | ||
- docker-ce-cli | ||
- containerd.io | ||
- docker-buildx-plugin | ||
- docker-compose-plugin | ||
state: present | ||
update_cache: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# roles/prepare/vars/main.yml | ||
|
||
# In Ansible, the priority of variable values is determined by | ||
# the order in which they are defined, known as variable precedence. | ||
# Variables defined in roles/deploy/vars/main.yml can override the values set in the inventory | ||
# if they are specified later in the precedence order. | ||
|