forked from FF-RGB/ansible
Initial commit
This commit is contained in:
commit
e1dddc1003
4
README.md
Normal file
4
README.md
Normal file
@ -0,0 +1,4 @@
|
||||
Ansible Freifunk Regensburg
|
||||
===========================
|
||||
|
||||
TBA
|
7
group_vars/all/vars.yml
Normal file
7
group_vars/all/vars.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
|
||||
ntp_servers:
|
||||
- 0.de.pool.ntp.org
|
||||
- 1.de.pool.ntp.org
|
||||
- 2.de.pool.ntp.org
|
||||
- 3.de.pool.ntp.org
|
5
hosts
Normal file
5
hosts
Normal file
@ -0,0 +1,5 @@
|
||||
[rz]
|
||||
gw11.regensburg.freifunk.net ansible_host=185.53.218.131
|
||||
gw21.regensburg.freifunk.net ansible_host=185.53.218.132
|
||||
gw31.regensburg.freifunk.net ansible_host=185.53.218.133
|
||||
confluence.regensburg.freifunk.net ansible_host=185.53.218.134
|
2790
roles/common/files/.zshrc
Normal file
2790
roles/common/files/.zshrc
Normal file
File diff suppressed because it is too large
Load Diff
13
roles/common/files/.zshrc.local
Normal file
13
roles/common/files/.zshrc.local
Normal file
@ -0,0 +1,13 @@
|
||||
# completion
|
||||
autoload -U compinit
|
||||
compinit
|
||||
|
||||
|
||||
# cache for the completion
|
||||
zstyle ':completion::complete:*' use-cache 1
|
||||
|
||||
|
||||
# promt
|
||||
autoload -U promptinit
|
||||
promptinit
|
||||
prompt gentoo
|
0
roles/common/files/motd
Normal file
0
roles/common/files/motd
Normal file
33
roles/common/files/prompt_gentoo_setup
Normal file
33
roles/common/files/prompt_gentoo_setup
Normal file
@ -0,0 +1,33 @@
|
||||
# gentoo prompt theme
|
||||
|
||||
prompt_gentoo_help () {
|
||||
cat <<'EOF'
|
||||
This prompt is color-scheme-able. You can invoke it thus:
|
||||
|
||||
prompt gentoo [<promptcolor> [<usercolor> [<rootcolor>]]]
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
prompt_gentoo_setup () {
|
||||
local prompt_gentoo_prompt=${1:-'blue'}
|
||||
local prompt_gentoo_user=${2:-'green'}
|
||||
local prompt_gentoo_root=${3:-'red'}
|
||||
|
||||
if [ "$USER" = 'root' ]
|
||||
then
|
||||
local base_prompt="%B%F{$prompt_gentoo_root}%m%k "
|
||||
else
|
||||
local base_prompt="%B%F{$prompt_gentoo_user}%n@%m%k "
|
||||
fi
|
||||
local post_prompt="%b%f%k"
|
||||
|
||||
#setopt noxtrace localoptions
|
||||
|
||||
local path_prompt="%B%F{$prompt_gentoo_prompt}%1~"
|
||||
typeset -g PS1="$base_prompt$path_prompt %# $post_prompt"
|
||||
typeset -g PS2="$base_prompt$path_prompt %_> $post_prompt"
|
||||
typeset -g PS3="$base_prompt$path_prompt ?# $post_prompt"
|
||||
}
|
||||
|
||||
prompt_gentoo_setup "$@"
|
24
roles/common/tasks/main.yml
Normal file
24
roles/common/tasks/main.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
|
||||
- name: Install misc software
|
||||
apt: name={{ item }} state=present
|
||||
with_items:
|
||||
- dnsutils
|
||||
- htop
|
||||
- openssl
|
||||
- pydf
|
||||
- rsync
|
||||
- sudo
|
||||
- vim-nox
|
||||
- zsh
|
||||
|
||||
- name: Configure misc software
|
||||
copy: src={{ item.src }} dest={{ item.dest }}
|
||||
with_items:
|
||||
- { src: '.zshrc', dest: '/root/.zshrc' }
|
||||
- { src: '.zshrc.local', dest: '/root/.zshrc.local' }
|
||||
- { src: 'motd', dest: '/etc/motd' }
|
||||
- { src: 'prompt_gentoo_setup', dest: '/usr/share/zsh/functions/Prompts/prompt_gentoo_setup' }
|
||||
|
||||
- name: Set shell for root user
|
||||
user: name=root shell=/bin/zsh
|
7
roles/ntp/handlers/main.yml
Normal file
7
roles/ntp/handlers/main.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Restart ntp
|
||||
service: name=ntp state=restarted
|
||||
|
||||
- name: Restart ntpd
|
||||
service: name=ntpd state=restarted
|
11
roles/ntp/tasks/main.yml
Normal file
11
roles/ntp/tasks/main.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
|
||||
- name: Install ntp
|
||||
apt: name=ntp state=present
|
||||
|
||||
- name: Configure ntp
|
||||
template: src=ntp.conf.j2 dest=/etc/ntp.conf
|
||||
notify: Restart ntp
|
||||
|
||||
- name: Start the ntp service
|
||||
service: name=ntp state=started enabled=yes
|
15
roles/ntp/templates/ntp.conf.j2
Normal file
15
roles/ntp/templates/ntp.conf.j2
Normal file
@ -0,0 +1,15 @@
|
||||
{% for srv in ntp_servers %}
|
||||
server {{ srv }} iburst
|
||||
{% endfor %}
|
||||
{% if ntp_peers is defined %}
|
||||
|
||||
{% for peer in ntp_peers %}
|
||||
peer {{ peer }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
restrict default kod nomodify notrap nopeer noquery
|
||||
restrict -6 default kod nomodify notrap nopeer noquery
|
||||
|
||||
restrict 127.0.0.1
|
||||
restrict -6 ::1
|
Loading…
Reference in New Issue
Block a user