Skip to content

Commit

Permalink
dinamically use debian or ubuntu depending on the server's OS
Browse files Browse the repository at this point in the history
  • Loading branch information
erral committed Oct 7, 2024
1 parent 314a3e1 commit 239b122
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions project/{{ cookiecutter.__folder_name }}/devops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ STACK_NAME={{ cookiecutter.__devops_stack_name }}

Note: The `.env` file is included in `.gitignore`, ensuring environment-specific configurations aren't pushed to the repository.


### Server installation

You need to Ubuntu or Debian in {{ cookiecutter.hostname }}, enable SSH and install python3 there.


### Ansible Installation

Execute the following to create a Python 3 virtual environment and install Ansible along with its dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@
block:
- name: "Docker: Add GnuPG key"
ansible.builtin.apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
url: https://download.docker.com/linux/{{ ansible_lsb.id | lower }}/gpg
state: present

- name: "Docker: Add Repository (amd64)"
ansible.builtin.apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
repo: "deb [arch=amd64] https://download.docker.com/linux/{{ ansible_lsb.id | lower }} {{ ansible_lsb.codename }} stable"
state: present
filename: 'docker'

- name: "Docker: Add Repository (arm64)"
ansible.builtin.apt_repository:
repo: "deb [arch=arm64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
repo: "deb [arch=arm64] https://download.docker.com/linux/{{ ansible_lsb.id | lower }} {{ ansible_lsb.codename }} stable"
state: present
filename: 'docker'
tags:
Expand Down

0 comments on commit 239b122

Please sign in to comment.