Skip to content

Commit

Permalink
Improvements to support Debian based servers (#65)
Browse files Browse the repository at this point in the history
* dinamically use debian or ubuntu depending on the server's OS

* be explicit and require sudo to be installed

* Update project/{{ cookiecutter.__folder_name }}/devops/README.md

Co-authored-by: Steve Piercy <[email protected]>

* Update project/{{ cookiecutter.__folder_name }}/devops/README.md

---------

Co-authored-by: Steve Piercy <[email protected]>
  • Loading branch information
erral and stevepiercy authored Oct 9, 2024
1 parent 314a3e1 commit d6399f4
Show file tree
Hide file tree
Showing 3 changed files with 10 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 either a Ubuntu or Debian based system for {{ cookiecutter.hostname }}, enable SSH, and install a supported version of Python 3 on that system.


### 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 @@ -4,6 +4,7 @@ base_packages:
- ca-certificates
- acl
- aptitude
- sudo
- curl
- python3-apt
- python3-minimal
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 d6399f4

Please sign in to comment.