Merge branch 'master' of git_opytex:/lafrite/Ansible_workstation
This commit is contained in:
commit
dfb03c9b19
@ -14,7 +14,7 @@
|
||||
- include: tasks/sudo.yml
|
||||
- include: tasks/ssh.yml
|
||||
- include: tasks/dotfiles.yml
|
||||
- include: tasks/docker.yml
|
||||
- include: tasks/deb_docker.yml
|
||||
|
||||
handlers:
|
||||
- name: restart sshd
|
||||
|
13
Choux.yml
13
Choux.yml
@ -12,9 +12,10 @@
|
||||
# - include: tasks/test.yml
|
||||
- include: tasks/ansible.yml
|
||||
- include: tasks/arch_aur.yml
|
||||
- include: tasks/pacman_cache_server.yml
|
||||
- include: tasks/arch_CLI_packages.yml
|
||||
- include: tasks/prompt.yml
|
||||
- include: tasks/users.yml
|
||||
# - include: tasks/users.yml
|
||||
- include: tasks/sudo.yml
|
||||
- include: tasks/ssh.yml
|
||||
- include: tasks/arch_programming.yml
|
||||
@ -35,7 +36,15 @@
|
||||
service:
|
||||
name: sshd
|
||||
state: restarted
|
||||
- name: restart nfs
|
||||
- name: restart nfs-server
|
||||
service:
|
||||
name: nfs-server
|
||||
state: restarted
|
||||
- name: restart nfs-client
|
||||
service:
|
||||
name: nfs-client
|
||||
state: restarted
|
||||
- name: restart autofs
|
||||
service:
|
||||
name: autofs
|
||||
state: restarted
|
||||
|
@ -14,7 +14,7 @@
|
||||
- include: tasks/arch_CLI_packages.yml
|
||||
- include: tasks/dd_backup.yml
|
||||
- include: tasks/prompt.yml
|
||||
- include: tasks/users.yml
|
||||
# - include: tasks/users.yml
|
||||
- include: tasks/sudo.yml
|
||||
# - include: tasks/ssh.yml
|
||||
- include: tasks/arch_programming.yml
|
||||
|
@ -15,7 +15,7 @@
|
||||
- include: tasks/sudo.yml
|
||||
- include: tasks/ssh.yml
|
||||
- include: tasks/dotfiles.yml
|
||||
- include: tasks/docker.yml
|
||||
- include: tasks/deb_docker.yml
|
||||
|
||||
handlers:
|
||||
- name: restart sshd
|
||||
|
@ -5,6 +5,7 @@
|
||||
vars_files:
|
||||
- vars/common.yml
|
||||
- vars/home.yml
|
||||
- vars/users.yml
|
||||
- vars/Combava.yml
|
||||
|
||||
tasks:
|
||||
@ -14,8 +15,8 @@
|
||||
- include: tasks/arch_aur.yml
|
||||
#- include: tasks/dd_backup.yml
|
||||
- include: tasks/prompt.yml
|
||||
- include: tasks/users.yml
|
||||
# - include: tasks/ssh.yml
|
||||
#- include: tasks/users.yml
|
||||
- include: tasks/ssh.yml
|
||||
- include: tasks/arch_programming.yml
|
||||
- include: tasks/arch_teacher.yml
|
||||
- include: tasks/arch_gnome.yml
|
||||
@ -24,8 +25,9 @@
|
||||
- include: tasks/dotfiles_desktop.yml
|
||||
- include: tasks/home_autofs.yml
|
||||
- include: tasks/laptop.yml
|
||||
- include: tasks/arch_docker.yml
|
||||
# - include: tasks/nfs_share.yml
|
||||
#- include: tasks/wine.yml
|
||||
# - include: tasks/wine.yml
|
||||
# - include: tasks/arch_virtualbox.yml
|
||||
|
||||
handlers:
|
||||
|
16
README.md
16
README.md
@ -16,22 +16,10 @@ Installing Choux
|
||||
git clone https://github.com/kewlfft/ansible-aur.git ~/.ansible/plugins/modules/aur
|
||||
ansible-pull -U https://git.opytex.org/lafrite/Ansible_workstation.git Choux.yml
|
||||
|
||||
Installing Songe
|
||||
Depuis peu, il y a un bug entre pacman et ansible:
|
||||
|
||||
ansible-pull -U https://git.opytex.org/lafrite/Ansible_workstation.git Songe.yml
|
||||
LC_ALL=C ansible-pull -U https://git.opytex.org/lafrite/Ansible_workstation.git --vault-id @prompt Choux.yml
|
||||
|
||||
Installing Bilimbi
|
||||
|
||||
ansible-pull -U https://git.opytex.org/lafrite/Ansible_workstation.git Bilimbi.yml
|
||||
|
||||
Installing Manioc
|
||||
|
||||
ansible-pull -U https://git.opytex.org/lafrite/Ansible_workstation.git Manioc.yml
|
||||
|
||||
|
||||
After running the script, there is a bug with $TERM which makes BACKSPACE and TAB to have strange behavior. To solve it, from an other computer run:
|
||||
|
||||
infocmp -x | ssh -t root@remote-host 'cat > "$TERM.info" && tic -x "$TERM.info"'
|
||||
|
||||
## By hand for Choux
|
||||
|
||||
|
@ -28,15 +28,6 @@ Host github
|
||||
PubkeyAcceptedKeyTypes *
|
||||
identityfile ~/.ssh/id_dsa_noPass
|
||||
|
||||
Host Songe
|
||||
HostName songe
|
||||
User waha
|
||||
Port 22
|
||||
ForwardAgent yes
|
||||
PubkeyAcceptedKeyTypes *
|
||||
identityfile ~/.ssh/id_rsa_songe
|
||||
IdentitiesOnly yes
|
||||
|
||||
Host Choux
|
||||
HostName Choux
|
||||
User lafrite
|
||||
|
@ -1,5 +1,5 @@
|
||||
session_name: enseignement
|
||||
start_directory: /media/documents/Cours/Prof/Enseignements/2019-2020/
|
||||
start_directory: ~/Cours/Prof/Enseignements/2019-2020/
|
||||
shell_command_before: source config.fish
|
||||
|
||||
windows:
|
||||
|
@ -143,6 +143,7 @@ command! make !!make %a
|
||||
command! mkcd :mkdir %a | cd %a
|
||||
command! vgrep vim "+grep %a"
|
||||
command! reload :write | restart
|
||||
command ln ln -s %f:p %D
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
|
51
files/nginx.conf
Normal file
51
files/nginx.conf
Normal file
@ -0,0 +1,51 @@
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
# Use a custom log format that will show response times and cache status
|
||||
log_format archmirror '$remote_addr - $upstream_cache_status [$time_local] $request_method $host$request_uri $server_protocol $status $body_bytes_sent $request_time $upstream_response_time';
|
||||
|
||||
# Configure the cache directory, size and keys
|
||||
proxy_cache_path /srv/http/pacman-cache
|
||||
levels=1:2 keys_zone=archmirror:60m
|
||||
inactive=365d use_temp_path=off max_size=3g;
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
server_name cache.local;
|
||||
|
||||
access_log /var/log/nginx/archmirror.access.log archmirror;
|
||||
error_log /var/log/nginx/archmirror.error.log;
|
||||
|
||||
# Force proxy to use TLS for upstream server requests
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
# Use previously negotiated connection parameters
|
||||
proxy_ssl_session_reuse on;
|
||||
# Enables revalidation of expired cache items using conditional requests with the "If-Modified-Since" and "If-None-Match" header fields.
|
||||
proxy_cache_revalidate on;
|
||||
# Only one request at a time will be allowed to populate a new cache element
|
||||
proxy_cache_lock on;
|
||||
# Cache any responses for 1 minute by default, can be overridden by more specific response codes
|
||||
proxy_cache_valid any 1m;
|
||||
|
||||
# Keep connections to upstream server open
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_read_timeout 300;
|
||||
proxy_connect_timeout 300;
|
||||
|
||||
location / {
|
||||
proxy_pass http://mirror.archlinux.ikoula.com;
|
||||
proxy_cache archmirror; # This directive should match the keys_zone option
|
||||
proxy_cache_valid 200 5m;
|
||||
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
||||
|
||||
# Add some cache status headers for debugging purposes, you can remove these lines if you want
|
||||
add_header X-Upstream-Status $upstream_status;
|
||||
add_header X-Cache-Status $upstream_cache_status;
|
||||
}
|
||||
}
|
||||
}
|
@ -5,3 +5,8 @@
|
||||
- docker
|
||||
state: present
|
||||
|
||||
- name: Enable docker daemon
|
||||
service:
|
||||
name: docker
|
||||
state: started
|
||||
enabled: yes
|
||||
|
@ -31,6 +31,7 @@
|
||||
enabled: no
|
||||
with_items:
|
||||
- dhcpcd
|
||||
ignore_errors: yes
|
||||
|
||||
- name: enable service NetworkManager
|
||||
systemd:
|
||||
@ -61,12 +62,73 @@
|
||||
use: makepkg
|
||||
skip_installed: true
|
||||
with_items:
|
||||
- plata-theme
|
||||
- gnome-colors-icon-theme
|
||||
- ubo-icons
|
||||
- shadow-icon-theme
|
||||
- vertex-themes
|
||||
- vertex-icons-git
|
||||
- numix-icon-theme-git
|
||||
- numix-circle-icon-theme-git
|
||||
- tela-icon-theme-git
|
||||
become: yes
|
||||
become_user: aur_builder
|
||||
|
||||
- name: <super + q> to close window
|
||||
dconf:
|
||||
key: "/org/gnome/desktop/wm/keybindings/close"
|
||||
value: "['<Super>q']"
|
||||
state: present
|
||||
become: true
|
||||
become_user: "{{ item.username }}"
|
||||
with_items: "{{ me }}"
|
||||
|
||||
- name: <super + enter> to fire a terminal - binding
|
||||
dconf:
|
||||
key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding"
|
||||
value: "'<Super>Return'"
|
||||
state: present
|
||||
become: true
|
||||
become_user: "{{ item.username }}"
|
||||
with_items: "{{ me }}"
|
||||
|
||||
- name: <super + enter> to fire a terminal - command
|
||||
dconf:
|
||||
key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command"
|
||||
value: "'st'"
|
||||
state: present
|
||||
become: true
|
||||
become_user: "{{ item.username }}"
|
||||
with_items: "{{ me }}"
|
||||
|
||||
- name: <super + enter> to fire a terminal - name
|
||||
dconf:
|
||||
key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name"
|
||||
value: "'Terminal'"
|
||||
state: present
|
||||
become: true
|
||||
become_user: "{{ item.username }}"
|
||||
with_items: "{{ me }}"
|
||||
|
||||
- name: Shell theme
|
||||
dconf:
|
||||
key: "/org/gnome/shell/extensions/user-theme/name"
|
||||
value: "'Plata-Noir-Compact'"
|
||||
state: present
|
||||
become: true
|
||||
become_user: "{{ item.username }}"
|
||||
with_items: "{{ me }}"
|
||||
|
||||
- name: Gtk theme
|
||||
dconf:
|
||||
key: "/org/gnome/desktop/interface/gkt-theme"
|
||||
value: "'Plata-Noir-Compact'"
|
||||
state: present
|
||||
become: true
|
||||
become_user: "{{ item.username }}"
|
||||
with_items: "{{ me }}"
|
||||
|
||||
- name: Icon theme
|
||||
dconf:
|
||||
key: "/org/gnome/desktop/interface/icon-theme"
|
||||
value: "'Tela-orange-dark'"
|
||||
state: present
|
||||
become: true
|
||||
become_user: "{{ item.username }}"
|
||||
with_items: "{{ me }}"
|
||||
|
@ -73,7 +73,6 @@
|
||||
skip_installed: true
|
||||
with_items:
|
||||
- ttf-ubuntu-mono-derivative-powerline-git
|
||||
- ttf-roboto-mono-powerline-git
|
||||
- ttf-inconsolata-lgc-for-powerline
|
||||
- ttf-droid-sans-mono-slashed-powerline-git
|
||||
- ttf-literation-mono-powerline-git
|
||||
|
@ -4,6 +4,20 @@
|
||||
name: autofs
|
||||
state: present
|
||||
|
||||
#- name: install nfs
|
||||
# apt:
|
||||
# pkg: nfs-kernel-server
|
||||
# state: present
|
||||
# when: ansible_distribution == 'Debian'
|
||||
# notify: restart nfs-server
|
||||
|
||||
- name: install nfs
|
||||
pacman:
|
||||
pkg: nfs-utils
|
||||
state: present
|
||||
when: ansible_distribution != 'Debian'
|
||||
notify: restart nfs-client
|
||||
|
||||
- name: Create NAS share directory
|
||||
file:
|
||||
path: "/media/{{ item.host }}"
|
||||
|
25
tasks/pacman_cache_server.yml
Normal file
25
tasks/pacman_cache_server.yml
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: Install nginx
|
||||
pacman:
|
||||
name: nginx
|
||||
state: present
|
||||
|
||||
- name: create cache directy
|
||||
file:
|
||||
path: /srv/http/pacman-cache
|
||||
state: directory
|
||||
owner: http
|
||||
group: http
|
||||
|
||||
- name: copy nginx config
|
||||
template:
|
||||
src: files/nginx.conf
|
||||
dest: /etc/nginx/nginx.conf
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Enable nginx daemon
|
||||
service:
|
||||
name: nginx
|
||||
state: started
|
||||
enabled: yes
|
@ -13,12 +13,3 @@
|
||||
state: present
|
||||
tags:
|
||||
- first_deployement
|
||||
|
||||
- name: Add deploy user to sudo group
|
||||
user:
|
||||
name: "{{ item.username }}"
|
||||
groups: sudo
|
||||
append: yes
|
||||
with_items: '{{ deploy_users }}'
|
||||
tags:
|
||||
- first_deployement
|
||||
|
@ -15,20 +15,16 @@
|
||||
insertafter: "^\\[multilib\\]"
|
||||
regexp: "Include = /etc/pacman.d/mirrorlist"
|
||||
|
||||
- name: Update pacman cache
|
||||
pacman:
|
||||
update_cache: yes
|
||||
|
||||
- name: Install WINE
|
||||
- name: Install WINE packages
|
||||
pacman:
|
||||
name:
|
||||
- lib32-libglvnd # wine has multiple fulfilments for lib32-libgl
|
||||
- lib32-libglvnd
|
||||
- wine
|
||||
- winetricks
|
||||
- wine_gecko
|
||||
- wine-mono
|
||||
# Audio
|
||||
- lib32-alsa-plugins
|
||||
- lib32-libpulse
|
||||
- lib32-openal
|
||||
state: present
|
||||
update-cache: yes
|
||||
|
Loading…
Reference in New Issue
Block a user