From: Christian Pointner Date: Mon, 26 Nov 2018 22:37:30 +0000 (+0100) Subject: Merge pull request #38 from realraum/gpg/nicoo X-Git-Url: https://git.realraum.at/?p=noc.git;a=commitdiff_plain;h=8d9d4de0ddd9c5f220b9988f3089dd86370c3e96;hp=3b164c687accc365447dfb09d3bb971b96270bbe Merge pull request #38 from realraum/gpg/nicoo gpg: Remove my old key from the keyring --- diff --git a/ansible/.gitignore b/ansible/.gitignore index e573ad5..d34e4c4 100644 --- a/ansible/.gitignore +++ b/ansible/.gitignore @@ -4,4 +4,4 @@ *.retry .*.sw? /.cache/ -/files/*/openwrt/ +/artifacts diff --git a/ansible/files/common/htoprc b/ansible/files/common/htoprc new file mode 100644 index 0000000..97c196a --- /dev/null +++ b/ansible/files/common/htoprc @@ -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=0 +hide_kernel_threads=1 +hide_userland_threads=0 +shadow_other_users=0 +show_thread_names=0 +show_program_path=1 +highlight_base_name=1 +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 diff --git a/ansible/files/torwaechter/update-keys-from-stdin.sh b/ansible/files/torwaechter/update-keys-from-stdin.sh old mode 100644 new mode 100755 diff --git a/ansible/group_vars/accesspoints/main.yml b/ansible/group_vars/accesspoints/main.yml index 1df3d41..7d4b030 100644 --- a/ansible/group_vars/accesspoints/main.yml +++ b/ansible/group_vars/accesspoints/main.yml @@ -146,34 +146,8 @@ openwrt_mixin: {{ key }} {% endfor %} - /root/.config/htop/htoprc: - content: | - # 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=0 - hide_kernel_threads=1 - hide_userland_threads=0 - shadow_other_users=0 - show_thread_names=0 - show_program_path=1 - highlight_base_name=1 - 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 + /etc/htoprc: + file: "{{ global_files_dir }}/common/htoprc" openwrt_uci: diff --git a/ansible/group_vars/all/main.yml b/ansible/group_vars/all/main.yml index cd8f05d..d617779 100644 --- a/ansible/group_vars/all/main.yml +++ b/ansible/group_vars/all/main.yml @@ -1,7 +1,10 @@ --- # Build-related directories +global_artifacts_dir: "{{ inventory_dir }}/artifacts" global_cache_dir: "{{ inventory_dir }}/.cache" -global_artifacts_dir: "{{ inventory_dir }}/files" + +# Directory for static assets +global_files_dir: "{{ inventory_dir }}/files" # Default credentials ## Root password; by default, undefined diff --git a/ansible/host_vars/torwaechter/main.yml b/ansible/host_vars/torwaechter/main.yml index 2a2316f..016ec44 100644 --- a/ansible/host_vars/torwaechter/main.yml +++ b/ansible/host_vars/torwaechter/main.yml @@ -31,11 +31,11 @@ openwrt_mixin: /usr/local/bin/authorized_keys.sh: mode: '0755' - file: "{{ global_artifacts_dir }}/{{ inventory_hostname }}/authorized_keys.sh" + file: "{{ global_files_dir }}/{{ inventory_hostname }}/authorized_keys.sh" /usr/local/bin/update-keys-from-stdin.sh: mode: '0755' - file: "{{ global_artifacts_dir }}/{{ inventory_hostname }}/update-keys-from-stdin.sh" + file: "{{ global_files_dir }}/{{ inventory_hostname }}/update-keys-from-stdin.sh" /etc/ssh/sshd_config: content: | diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml index c155be4..7fb9d24 100644 --- a/ansible/roles/base/tasks/main.yml +++ b/ansible/roles/base/tasks/main.yml @@ -148,19 +148,6 @@ when: ansible_distribution == "Ubuntu" -- name: install zshrc - with_items: - - src: "zprofile" - dest: "/etc/zsh/zprofile" - - src: "zshrc" - dest: "/etc/zsh/zshrc" - - src: "zshrc.skel" - dest: "/etc/skel/.zshrc" - copy: - src: "{{ item.src }}" - dest: "{{ item.dest }}" - mode: 0644 - - name: set root default shell to zsh user: name: root @@ -173,3 +160,18 @@ dest: /etc/adduser.conf regexp: "^#?{{ item.key }}=" line: "{{ item.key }}={{ item.value }}" + +- name: Deploy default configuration for tools + with_dict: + /etc/htoprc: "{{ global_files_dir }}/common/htoprc" + + /etc/zsh/zprofile: zprofile + /etc/zsh/zshrc: zshrc + /etc/skel/.zshrc: zshrc.skel + + loop_control: + label: "{{ item.key }}" + copy: + mode: 0644 + src: "{{ item.value }}" + dest: "{{ item.key }}"