Merge pull request #38 from realraum/gpg/nicoo
authorChristian Pointner <equinox@spreadspace.org>
Mon, 26 Nov 2018 22:37:30 +0000 (23:37 +0100)
committerGitHub <noreply@github.com>
Mon, 26 Nov 2018 22:37:30 +0000 (23:37 +0100)
gpg: Remove my old key from the keyring

ansible/.gitignore
ansible/files/common/htoprc [new file with mode: 0644]
ansible/files/torwaechter/update-keys-from-stdin.sh [changed mode: 0644->0755]
ansible/group_vars/accesspoints/main.yml
ansible/group_vars/all/main.yml
ansible/host_vars/torwaechter/main.yml
ansible/roles/base/tasks/main.yml

index e573ad5..d34e4c4 100644 (file)
@@ -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 (file)
index 0000000..97c196a
--- /dev/null
@@ -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
index 1df3d41..7d4b030 100644 (file)
@@ -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:
index cd8f05d..d617779 100644 (file)
@@ -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
index 2a2316f..016ec44 100644 (file)
@@ -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: |
index c155be4..7fb9d24 100644 (file)
 
   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
     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 }}"