Compare commits
7 Commits
de79bd84c1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ceba4626c8 | |||
| 7c78252bfe | |||
|
|
bdde411f9e | ||
|
|
3881cfc63c | ||
|
|
ce01a4f2ea | ||
|
|
79fae0dba8 | ||
|
|
5a72109f5b |
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: install unzip
|
||||
apt:
|
||||
name: unzip
|
||||
state: latest
|
||||
|
||||
- name: install PMA
|
||||
include_tasks: pma.yml
|
||||
12
README.md
12
README.md
@@ -1,5 +1,11 @@
|
||||
Мой Pet project
|
||||
|
||||
# base packages
|
||||
|
||||
Устанавливает ПО для работы в консоли и копирует конфиги. Пакеты: mc, htop, vim
|
||||
|
||||
# web
|
||||
|
||||
ПО:
|
||||
- [x] nginx
|
||||
- [x] php-fpm
|
||||
@@ -15,11 +21,11 @@ Web:
|
||||
- [x] Для mediawiki и nextcloud свои php-fpm pool'ы
|
||||
|
||||
- [ ] Установить nextcloud
|
||||
- [ ] Установить mediawiki
|
||||
- [x] Установить mediawiki
|
||||
- [x] Установить phpmyadmin
|
||||
- [ ] Разместить файлы about (root) сайта
|
||||
- [x] Разместить файлы about (root) сайта
|
||||
|
||||
Дополнительно
|
||||
- [ ] Почтовый сервер на отправку писем локально
|
||||
- [ ] Почтовый сервер для получения писем (Postfix) и их хранения (Dovecot).
|
||||
Будет использоваться LMTP для авторизации и доставки писем в Dovecot
|
||||
Будет использоваться LMTP для авторизации и доставки писем в Dovecot
|
||||
|
||||
5
base_pkgs/playbook.yml
Normal file
5
base_pkgs/playbook.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
- hosts: containers
|
||||
become: true
|
||||
roles:
|
||||
- packages
|
||||
- configs
|
||||
26
base_pkgs/roles/configs/files/htoprc
Normal file
26
base_pkgs/roles/configs/files/htoprc
Normal file
@@ -0,0 +1,26 @@
|
||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
sort_key=46
|
||||
sort_direction=1
|
||||
hide_threads=1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=1
|
||||
shadow_other_users=0
|
||||
show_thread_names=0
|
||||
show_program_path=1
|
||||
highlight_base_name=0
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
tree_view=1
|
||||
header_margin=1
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_zero=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=0
|
||||
delay=15
|
||||
left_meters=AllCPUs Memory Swap
|
||||
left_meter_modes=1 1 1
|
||||
right_meters=Tasks LoadAverage Uptime
|
||||
right_meter_modes=2 2 2
|
||||
143
base_pkgs/roles/configs/files/mcrc
Normal file
143
base_pkgs/roles/configs/files/mcrc
Normal file
@@ -0,0 +1,143 @@
|
||||
[Midnight-Commander]
|
||||
verbose=true
|
||||
shell_patterns=true
|
||||
auto_save_setup=true
|
||||
preallocate_space=false
|
||||
auto_menu=false
|
||||
use_internal_view=true
|
||||
use_internal_edit=false
|
||||
clear_before_exec=true
|
||||
confirm_delete=true
|
||||
confirm_overwrite=true
|
||||
confirm_execute=false
|
||||
confirm_history_cleanup=true
|
||||
confirm_exit=false
|
||||
confirm_directory_hotlist_delete=false
|
||||
confirm_view_dir=false
|
||||
safe_delete=false
|
||||
safe_overwrite=false
|
||||
use_8th_bit_as_meta=false
|
||||
mouse_move_pages_viewer=true
|
||||
mouse_close_dialog=false
|
||||
fast_refresh=false
|
||||
drop_menus=false
|
||||
wrap_mode=true
|
||||
old_esc_mode=true
|
||||
cd_symlinks=true
|
||||
show_all_if_ambiguous=false
|
||||
use_file_to_guess_type=true
|
||||
alternate_plus_minus=false
|
||||
only_leading_plus_minus=true
|
||||
show_output_starts_shell=false
|
||||
xtree_mode=false
|
||||
file_op_compute_totals=true
|
||||
classic_progressbar=true
|
||||
use_netrc=true
|
||||
ftpfs_always_use_proxy=false
|
||||
ftpfs_use_passive_connections=true
|
||||
ftpfs_use_passive_connections_over_proxy=false
|
||||
ftpfs_use_unix_list_options=true
|
||||
ftpfs_first_cd_then_ls=true
|
||||
ignore_ftp_chattr_errors=true
|
||||
editor_fill_tabs_with_spaces=false
|
||||
editor_return_does_auto_indent=false
|
||||
editor_backspace_through_tabs=false
|
||||
editor_fake_half_tabs=true
|
||||
editor_option_save_position=true
|
||||
editor_option_auto_para_formatting=false
|
||||
editor_option_typewriter_wrap=false
|
||||
editor_edit_confirm_save=true
|
||||
editor_syntax_highlighting=true
|
||||
editor_persistent_selections=true
|
||||
editor_drop_selection_on_copy=true
|
||||
editor_cursor_beyond_eol=false
|
||||
editor_cursor_after_inserted_block=false
|
||||
editor_visible_tabs=true
|
||||
editor_visible_spaces=true
|
||||
editor_line_state=false
|
||||
editor_simple_statusbar=false
|
||||
editor_check_new_line=false
|
||||
editor_show_right_margin=false
|
||||
editor_group_undo=true
|
||||
editor_state_full_filename=true
|
||||
editor_ask_filename_before_edit=false
|
||||
nice_rotating_dash=true
|
||||
mcview_remember_file_position=false
|
||||
auto_fill_mkdir_name=true
|
||||
copymove_persistent_attr=true
|
||||
pause_after_run=1
|
||||
mouse_repeat_rate=100
|
||||
double_click_speed=250
|
||||
old_esc_mode_timeout=1000000
|
||||
max_dirt_limit=10
|
||||
num_history_items_recorded=60
|
||||
vfs_timeout=60
|
||||
ftpfs_directory_timeout=900
|
||||
ftpfs_retry_seconds=30
|
||||
fish_directory_timeout=900
|
||||
editor_tab_spacing=8
|
||||
editor_word_wrap_line_length=72
|
||||
editor_option_save_mode=0
|
||||
editor_backup_extension=~
|
||||
editor_filesize_threshold=64M
|
||||
editor_stop_format_chars=-+*\\,.;:&>
|
||||
mcview_eof=
|
||||
skin=modarcon16root-defbg-thin
|
||||
|
||||
[Layout]
|
||||
output_lines=0
|
||||
left_panel_size=118
|
||||
top_panel_size=0
|
||||
message_visible=true
|
||||
keybar_visible=true
|
||||
xterm_title=true
|
||||
command_prompt=true
|
||||
menubar_visible=true
|
||||
free_space=true
|
||||
horizontal_split=false
|
||||
vertical_equal=true
|
||||
horizontal_equal=true
|
||||
|
||||
[Misc]
|
||||
timeformat_recent=%b %e %H:%M
|
||||
timeformat_old=%b %e %Y
|
||||
ftp_proxy_host=gate
|
||||
ftpfs_password=anonymous@
|
||||
display_codepage=UTF-8
|
||||
source_codepage=Other_8_bit
|
||||
autodetect_codeset=
|
||||
spell_language=en
|
||||
clipboard_store=
|
||||
clipboard_paste=
|
||||
|
||||
[Colors]
|
||||
base_color=
|
||||
xterm-256color=
|
||||
color_terminals=
|
||||
|
||||
[Panels]
|
||||
show_mini_info=true
|
||||
kilobyte_si=false
|
||||
mix_all_files=false
|
||||
show_backups=true
|
||||
show_dot_files=true
|
||||
fast_reload=false
|
||||
fast_reload_msg_shown=false
|
||||
mark_moves_down=true
|
||||
reverse_files_only=true
|
||||
auto_save_setup_panels=false
|
||||
navigate_with_arrows=false
|
||||
panel_scroll_pages=true
|
||||
panel_scroll_center=false
|
||||
mouse_move_pages=true
|
||||
filetype_mode=true
|
||||
permission_mode=false
|
||||
torben_fj_mode=false
|
||||
quick_search_mode=2
|
||||
select_flags=6
|
||||
|
||||
[Panelize]
|
||||
Find *.orig after patching=find . -name \\*.orig -print
|
||||
Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm /011 \\) -o \\( -perm -02000 -a -perm /01 \\) \\) -print
|
||||
Find rejects after patching=find . -name \\*.rej -print
|
||||
Modified git files=git ls-files --modified
|
||||
10
base_pkgs/roles/configs/tasks/main.yml
Normal file
10
base_pkgs/roles/configs/tasks/main.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
|
||||
- name: Put htop config
|
||||
template:
|
||||
src: files/htoprc
|
||||
dest: /etc/htoprc
|
||||
- name: Put mc config
|
||||
template:
|
||||
src: files/mcrc
|
||||
dest: /etc/mc/mc.ini
|
||||
13
base_pkgs/roles/packages/tasks/main.yml
Normal file
13
base_pkgs/roles/packages/tasks/main.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
- name: Install mc
|
||||
apt:
|
||||
name: mc
|
||||
state: present
|
||||
- name: Install htop
|
||||
apt:
|
||||
name: htop
|
||||
state: present
|
||||
- name: Install vim
|
||||
apt:
|
||||
name: vim
|
||||
state: present
|
||||
@@ -11,4 +11,9 @@
|
||||
loop:
|
||||
- cloud
|
||||
- wiki
|
||||
- other
|
||||
- other
|
||||
|
||||
- name: restart php-fpm
|
||||
service:
|
||||
name: php7.4-fpm.service
|
||||
state: restarted
|
||||
14
web/roles/webapps/files/root/index.html
Normal file
14
web/roles/webapps/files/root/index.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Hello
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<h1>
|
||||
test page
|
||||
</h1>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
14
web/roles/webapps/tasks/main.yml
Normal file
14
web/roles/webapps/tasks/main.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
- name: install unzip
|
||||
apt:
|
||||
name: unzip
|
||||
state: latest
|
||||
|
||||
- name: install PMA
|
||||
include_tasks: pma.yml
|
||||
|
||||
- name: install Mediawiki
|
||||
include_tasks: wiki.yml
|
||||
|
||||
- name: install root
|
||||
include_tasks: root.yml
|
||||
@@ -11,4 +11,11 @@
|
||||
copy:
|
||||
src: /var/www/pma/phpMyAdmin-5.1.0-all-languages/
|
||||
dest: /var/www/pma/
|
||||
remote_src: True
|
||||
remote_src: True
|
||||
|
||||
- name: chown pma dir
|
||||
file:
|
||||
path: /var/www/pma
|
||||
owner: www-data
|
||||
group: www-data
|
||||
recurse: yes
|
||||
5
web/roles/webapps/tasks/root.yml
Normal file
5
web/roles/webapps/tasks/root.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: copy html file
|
||||
copy:
|
||||
src: files/index.html
|
||||
dest: /var/www/root/
|
||||
21
web/roles/webapps/tasks/wiki.yml
Normal file
21
web/roles/webapps/tasks/wiki.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
|
||||
- name: Download & unpack Mediawiki
|
||||
ansible.builtin.unarchive:
|
||||
src: https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.1.zip
|
||||
dest: /var/www/wiki
|
||||
remote_src: yes
|
||||
owner: www-data
|
||||
|
||||
- name: rename mediawiki dir
|
||||
copy:
|
||||
src: /var/www/wiki/mediawiki-1.35.1/
|
||||
dest: /var/www/wiki/
|
||||
remote_src: True
|
||||
|
||||
- name: chown wiki dir
|
||||
file:
|
||||
path: /var/www/wiki
|
||||
owner: www-data
|
||||
group: www-data
|
||||
recurse: yes
|
||||
Reference in New Issue
Block a user