Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Reworked base role into more parametrized and secure role
- Loading branch information
1 parent
0d306de
commit 227dd37
Showing
35 changed files
with
119 additions
and
90 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
users_url_pubkeys: | ||
- https://github.com/sergei-maertens.keys |
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,26 @@ | ||
--- | ||
|
||
- name: Create the application user group | ||
group: | ||
name: "{{ application_user }}" | ||
state: present | ||
|
||
- name: Create the application user | ||
user: | ||
name: "{{ application_user }}" | ||
group: "{{ application_user }}" | ||
shell: /bin/bash | ||
generate_ssh_key: yes | ||
|
||
- name: Set application user password | ||
user: | ||
name: "{{ application_user }}" | ||
password: "{{ crypted_password }}" | ||
when: crypted_password is defined | ||
|
||
- name: Install public keys to authorized_keys. | ||
authorized_key: | ||
user: "{{ application_user }}" | ||
key: "{{ item }}" | ||
state: present | ||
with_items: "{{ users_url_pubkeys }}" |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,6 @@ | ||
--- | ||
|
||
- name: Install Django system packages | ||
package: | ||
name: "{{ django_packages }}" | ||
when: django_enabled |
File renamed without changes.
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
File renamed without changes.
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 |
---|---|---|
@@ -1,5 +1,31 @@ | ||
--- | ||
# Set up the base system | ||
# Set up the base system: security settings, basic system packages... | ||
|
||
- include: packages.yml | ||
- include: users.yml | ||
- include_tasks: build-tools.yml | ||
|
||
- include_tasks: auto-updates.yml | ||
|
||
- include_tasks: sshd.yml | ||
|
||
- include_tasks: firewall.yml | ||
|
||
- include_tasks: fail2ban.yml | ||
|
||
- include_tasks: bigstorage.yml | ||
when: bigstorage | ||
|
||
- include_tasks: logwatch.yml | ||
|
||
- include_tasks: databases.yml | ||
|
||
- include_tasks: webservers.yml | ||
|
||
- include_tasks: caches.yml | ||
|
||
- include_tasks: vcs.yml | ||
|
||
- include_tasks: nodejs.yml | ||
when: nodejs_enabled | ||
|
||
- include_tasks: django.yml | ||
when: django_enabled |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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