diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ea8ccc78a2b6caa04c49c3d57ad6a10e85ef5f18 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +*.swp +*.swo +~* +*~ +.DS_Store +__pycache__ +*.pyc +.cache/ +.molecule/ +.vagrant/ +*.log +*.retry diff --git a/README b/README deleted file mode 100644 index 793ebc5ad259888ab081e03d2d3e078908dc978f..0000000000000000000000000000000000000000 --- a/README +++ /dev/null @@ -1,14 +0,0 @@ -ansible-desktop -############### - -Ansible playbook for setting up new desktops. - -TODO ----- - -- Allow avahi in home and work firewalld zones. -- Allow ssh in home firewalld zone. -- Set /etc/default/grub. -- Systemd journal. -- Systemd timesyncd. -- Internal NATed network for nspawn using networkd. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000000000000000000000000000000000000..3fe691de36e9160bc4d46ec982a167d39db0989a --- /dev/null +++ b/README.rst @@ -0,0 +1,4 @@ +ansible-role-desktop +#################### + +Ansible playbook for setting up new desktops. For personal use. diff --git a/playbook.yml b/playbook.yml new file mode 100644 index 0000000000000000000000000000000000000000..40658e4ebfdd2d7ae33e8d7f38a3a75e20693fbe --- /dev/null +++ b/playbook.yml @@ -0,0 +1,56 @@ +--- + +- hosts: all + tasks: + - name: apt install + with_items: + - plymouth + - network-manager + - initramfs-tools + apt: + name: '{{ item }}' + state: present + update_cache: yes + cache_valid_time: 3600 + + - name: Set NetworkManager to ignore some interfaces + ini_file: + dest: /etc/NetworkManager/NetworkManager.conf + section: keyfile + option: unmanaged-devices + value: interface-name:docker0;interface-name:vboxnet0;interface-name:nspawnbr0 + state: present + + - name: Configure Plymouth + ini_file: + dest: /etc/plymouth/plymouthd.conf + section: Daemon + option: Theme + value: spinner + register: configure_plymouth + + - name: Update initramfs + when: configure_plymouth.changed + command: /usr/sbin/update-initramfs -u + + - name: Configure GRUB + with_dict: + GRUB_TIMEOUT: 1 + GRUB_CMDLINE_LINUX_DEFAULT: 'quiet cgroup_enable=memory splash allow-discards root_trim=yes swapaccount=1' + lineinfile: + dest: /etc/default/grub + line: '{{ item.key }}="{{ item.value }}"' + regexp: '^{{ item.key }}=' + state: present + register: configure_grub + + - name: Update GRUB + when: configure_grub.changed + command: /usr/sbin/update-grub + + - name: Make /tmp tmpfs mount + mount: + fstype: tmpfs + name: /tmp + src: none + state: present