forked from picoCTF/picoCTF
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove duplication - correctly tag for more convenient usage - standardize nodejs install and upgrade both web/shell to 14 - update wetty to maintainted verstion
- Loading branch information
1 parent
3b1403a
commit 36f5163
Showing
31 changed files
with
313 additions
and
283 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
|
||
- name: Run apt-get update | ||
apt: | ||
update_cache: yes | ||
cache_valid_time: 3600 | ||
environment: | ||
DEBIAN_FRONTEND: noninteractive |
8 changes: 2 additions & 6 deletions
8
ansible/common/tasks/upgrade.yml → ansible/common/tasks/apt_upgrade.yml
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 |
---|---|---|
@@ -1,40 +1,20 @@ | ||
--- | ||
# Playbook that runs tasks common across all servers | ||
|
||
- include: upgrade.yml | ||
- include: apt_upgrade.yml | ||
tags: | ||
- dependency | ||
- network | ||
|
||
- include: utils.yml | ||
tags: | ||
- dependency | ||
- network | ||
|
||
- include: set_hostname.yml | ||
|
||
# Local development environments are the only place the platform should | ||
# be loaded in directly via filesystem sync without being cloned from a | ||
# specific source and branch | ||
- include: clone_repo.yml | ||
when: "'git' in sync_mode" # coule be git or git_private | ||
- include: sync_source.yml | ||
tags: | ||
- network | ||
|
||
# Source should be synchronized over from a local directory on the control machine | ||
- name: Synchronize picoCTF source code | ||
synchronize: | ||
src: "{{pico_src_dir}}" | ||
dest: "{{pico_base_dir}}" | ||
archive: no | ||
recursive: yes | ||
when: "'source' in sync_mode" | ||
|
||
- name: Ensure admin user owns picoCTF directory | ||
file: | ||
path: "{{ pico_base_dir}}" | ||
owner: "{{ ansible_user }}" | ||
group: "{{ ansible_user }}" | ||
state: directory | ||
recurse: yes | ||
when: ('git' in sync_mode) or ('source' in sync_mode) | ||
- sync | ||
- web-api | ||
- web-static | ||
- shell-api | ||
- deploy-all |
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,25 @@ | ||
|
||
# Local development environments are the only place the platform should | ||
# be loaded in directly via filesystem sync without being cloned from a | ||
# specific source and branch | ||
- include: clone_repo.yml | ||
when: "'git' in sync_mode" # coule be git or git_private | ||
|
||
# Source should be synchronized over from a local directory on the control machine | ||
- name: Synchronize picoCTF source code | ||
synchronize: | ||
src: "{{pico_src_dir}}" | ||
dest: "{{pico_base_dir}}" | ||
archive: no | ||
recursive: yes | ||
delete: yes | ||
when: "'source' in sync_mode" | ||
|
||
- name: Ensure admin user owns picoCTF directory | ||
file: | ||
path: "{{ pico_base_dir}}" | ||
owner: "{{ ansible_user }}" | ||
group: "{{ ansible_user }}" | ||
state: directory | ||
recurse: yes | ||
when: ('git' in sync_mode) or ('source' in sync_mode) |
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 |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
- include: install.yml | ||
tags: | ||
- dependency | ||
- network | ||
|
||
- include: configure_storage.yml | ||
|
||
|
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
Oops, something went wrong.