diff --git a/requirements.yml b/requirements.yml index ad6b4c7..a6b0fd8 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,3 +1,4 @@ --- collections: - ansible.posix + - community.general diff --git a/roles/arch/tasks/locale.yml b/roles/arch/tasks/locale.yml index 54f94d8..d47e72d 100644 --- a/roles/arch/tasks/locale.yml +++ b/roles/arch/tasks/locale.yml @@ -1,13 +1,13 @@ --- - name: Set system locale become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/locale.conf line: "LANG=en_GB.UTF-8" create: yes - name: Set default paper size become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/papersize line: a4 create: yes diff --git a/roles/arch/tasks/modules.yml b/roles/arch/tasks/modules.yml index c3e93e4..c817eac 100644 --- a/roles/arch/tasks/modules.yml +++ b/roles/arch/tasks/modules.yml @@ -1,13 +1,13 @@ --- - name: Blacklist pcspkr module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist pcspkr create: yes - name: Blacklist dvb_usb_rtl28xxu module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist dvb_usb_rtl28xxu create: yes diff --git a/roles/arch/tasks/packages-cli.yml b/roles/arch/tasks/packages-cli.yml index 7c109d3..ccdb457 100644 --- a/roles/arch/tasks/packages-cli.yml +++ b/roles/arch/tasks/packages-cli.yml @@ -1,11 +1,11 @@ --- - name: Upgrade all packages become: true - pacman: + community.general.pacman: upgrade: yes - name: Install CLI packages become: true - pacman: + community.general.pacman: name: '{{ packages }}' state: present update_cache: yes @@ -39,7 +39,7 @@ - zsh - name: Enable TLP become: true - systemd: + ansible.builtin.systemd: name: tlp.service enabled: true state: started diff --git a/roles/arch/tasks/packages-gui.yml b/roles/arch/tasks/packages-gui.yml index c5caf50..8f4683b 100644 --- a/roles/arch/tasks/packages-gui.yml +++ b/roles/arch/tasks/packages-gui.yml @@ -1,7 +1,7 @@ --- - name: Install GUI packages become: true - pacman: + community.general.pacman: name: '{{ packages }}' state: present update_cache: yes diff --git a/roles/arch/tasks/printing.yml b/roles/arch/tasks/printing.yml index 65faf50..e5e7e44 100644 --- a/roles/arch/tasks/printing.yml +++ b/roles/arch/tasks/printing.yml @@ -1,7 +1,7 @@ --- - name: Enable CUPS become: true - systemd: + ansible.builtin.systemd: name: org.cups.cupsd.service enabled: yes state: started diff --git a/roles/arch/tasks/solokeys.yml b/roles/arch/tasks/solokeys.yml index bea6284..baf9e16 100644 --- a/roles/arch/tasks/solokeys.yml +++ b/roles/arch/tasks/solokeys.yml @@ -1,15 +1,15 @@ --- - name: Install solokeys udev rule become: true - copy: + ansible.builtin.copy: src: 70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules register: solokeys_copy - name: Reload udevadm rules become: true - command: udevadm control --reload-rules + ansible.builtin.command: udevadm control --reload-rules when: solokeys_copy.changed - name: Trigger udevadm become: true - command: udevadm trigger + ansible.builtin.command: udevadm trigger when: solokeys_copy.changed diff --git a/roles/arch/tasks/ssh.yml b/roles/arch/tasks/ssh.yml index 46919f1..e58d94a 100644 --- a/roles/arch/tasks/ssh.yml +++ b/roles/arch/tasks/ssh.yml @@ -1,20 +1,20 @@ --- - name: Disable SSH passwords become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config regexp: '^#?\w*PasswordAuthentication (yes|no)' line: 'PasswordAuthentication no' register: changed_ssh_config - name: Enable SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service enabled: yes state: started - name: Restart SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service state: restarted when: changed_ssh_config.changed == true diff --git a/roles/debian/tasks/build-env.yml b/roles/debian/tasks/build-env.yml index d2a72bd..1d227f6 100644 --- a/roles/debian/tasks/build-env.yml +++ b/roles/debian/tasks/build-env.yml @@ -1,7 +1,7 @@ --- - name: Install build environment packages become: true - apt: + ansible.builtin.apt: name: '{{ packages }}' state: present force_apt_get: yes @@ -16,12 +16,12 @@ - pbuilder - name: Copy pbuilderrc become: true - copy: + ansible.builtin.copy: src: pbuilderrc dest: /etc/pbuilderrc - name: Set permissions on /var/cache/pbuilder/result become: true - file: + ansible.builtin.file: path: /var/cache/pbuilder/result state: directory owner: root diff --git a/roles/debian/tasks/keyboard.yml b/roles/debian/tasks/keyboard.yml index 45c860a..d6a7321 100644 --- a/roles/debian/tasks/keyboard.yml +++ b/roles/debian/tasks/keyboard.yml @@ -1,11 +1,11 @@ --- - name: Set default Xorg/Wayland keyboard layout become: true - copy: + ansible.builtin.copy: src: keyboard dest: /etc/default/keyboard register: keyboard_copy - name: Update initramfs become: true - command: /usr/sbin/update-initramfs -k all -u + ansible.builtin.command: /usr/sbin/update-initramfs -k all -u when: keyboard_copy.changed diff --git a/roles/debian/tasks/modules.yml b/roles/debian/tasks/modules.yml index c3e93e4..c817eac 100644 --- a/roles/debian/tasks/modules.yml +++ b/roles/debian/tasks/modules.yml @@ -1,13 +1,13 @@ --- - name: Blacklist pcspkr module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist pcspkr create: yes - name: Blacklist dvb_usb_rtl28xxu module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist dvb_usb_rtl28xxu create: yes diff --git a/roles/debian/tasks/packages-cli.yml b/roles/debian/tasks/packages-cli.yml index 951ebcd..9c91b21 100644 --- a/roles/debian/tasks/packages-cli.yml +++ b/roles/debian/tasks/packages-cli.yml @@ -1,7 +1,7 @@ --- - name: Install CLI packages become: true - apt: + ansible.builtin.apt: name: '{{ packages }}' state: present force_apt_get: yes @@ -44,6 +44,6 @@ - zsh - name: Load /etc/profile in zsh become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/zsh/zprofile line: emulate sh -c 'source /etc/profile' diff --git a/roles/debian/tasks/packages-gui.yml b/roles/debian/tasks/packages-gui.yml index bfd7510..2573402 100644 --- a/roles/debian/tasks/packages-gui.yml +++ b/roles/debian/tasks/packages-gui.yml @@ -1,7 +1,7 @@ --- - name: Install GUI packages become: true - apt: + ansible.builtin.apt: name: '{{ packages }}' state: present force_apt_get: yes diff --git a/roles/debian/tasks/solokeys.yml b/roles/debian/tasks/solokeys.yml index bea6284..baf9e16 100644 --- a/roles/debian/tasks/solokeys.yml +++ b/roles/debian/tasks/solokeys.yml @@ -1,15 +1,15 @@ --- - name: Install solokeys udev rule become: true - copy: + ansible.builtin.copy: src: 70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules register: solokeys_copy - name: Reload udevadm rules become: true - command: udevadm control --reload-rules + ansible.builtin.command: udevadm control --reload-rules when: solokeys_copy.changed - name: Trigger udevadm become: true - command: udevadm trigger + ansible.builtin.command: udevadm trigger when: solokeys_copy.changed diff --git a/roles/debian/tasks/ssh.yml b/roles/debian/tasks/ssh.yml index 85b9093..b517f0f 100644 --- a/roles/debian/tasks/ssh.yml +++ b/roles/debian/tasks/ssh.yml @@ -1,20 +1,20 @@ --- - name: Disable SSH passwords become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config regexp: '^#?\w*PasswordAuthentication (yes|no)' line: 'PasswordAuthentication no' register: changed_ssh_config - name: Enable SSH become: true - systemd: + ansible.builtin.systemd: name: ssh.service enabled: yes state: started - name: Restart SSH become: true - systemd: + ansible.builtin.systemd: name: ssh.service state: restarted when: changed_ssh_config.changed == true diff --git a/roles/el/tasks/modules.yml b/roles/el/tasks/modules.yml index c3e93e4..c817eac 100644 --- a/roles/el/tasks/modules.yml +++ b/roles/el/tasks/modules.yml @@ -1,13 +1,13 @@ --- - name: Blacklist pcspkr module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist pcspkr create: yes - name: Blacklist dvb_usb_rtl28xxu module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist dvb_usb_rtl28xxu create: yes diff --git a/roles/el/tasks/packages-cli.yml b/roles/el/tasks/packages-cli.yml index 879ffef..9a55678 100644 --- a/roles/el/tasks/packages-cli.yml +++ b/roles/el/tasks/packages-cli.yml @@ -1,11 +1,11 @@ --- - name: Check for CentOS-Stream-PowerTools.repo file - stat: + ansible.builtin.stat: path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo register: pt - name: Enable CentOS Stream PowerTools repository become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo create: false regexp: ^enabled= @@ -13,7 +13,7 @@ when: ansible_distribution == 'CentOS' and pt.stat.exists - name: Install CLI packages become: true - dnf: + ansible.builtin.dnf: name: '{{ packages }}' state: present vars: diff --git a/roles/el/tasks/packages-gui.yml b/roles/el/tasks/packages-gui.yml index c8052ce..011b1d8 100644 --- a/roles/el/tasks/packages-gui.yml +++ b/roles/el/tasks/packages-gui.yml @@ -1,7 +1,7 @@ --- - name: Install GUI packages become: true - dnf: + ansible.builtin.dnf: name: '{{ packages }}' state: present vars: diff --git a/roles/el/tasks/solokeys.yml b/roles/el/tasks/solokeys.yml index bea6284..baf9e16 100644 --- a/roles/el/tasks/solokeys.yml +++ b/roles/el/tasks/solokeys.yml @@ -1,15 +1,15 @@ --- - name: Install solokeys udev rule become: true - copy: + ansible.builtin.copy: src: 70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules register: solokeys_copy - name: Reload udevadm rules become: true - command: udevadm control --reload-rules + ansible.builtin.command: udevadm control --reload-rules when: solokeys_copy.changed - name: Trigger udevadm become: true - command: udevadm trigger + ansible.builtin.command: udevadm trigger when: solokeys_copy.changed diff --git a/roles/el/tasks/ssh.yml b/roles/el/tasks/ssh.yml index b4fca4a..60729df 100644 --- a/roles/el/tasks/ssh.yml +++ b/roles/el/tasks/ssh.yml @@ -1,26 +1,26 @@ --- - name: Disable SSH passwords become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config regexp: '^#?\w*PasswordAuthentication (yes|no)' line: 'PasswordAuthentication no' register: changed_ssh_config - name: Enable SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service enabled: yes state: started - name: Restart SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service state: restarted when: changed_ssh_config.changed == true - name: Allow SSH through firewall become: true - firewalld: + ansible.posix.firewalld: service: ssh permanent: yes state: enabled diff --git a/roles/fedora/tasks/modules.yml b/roles/fedora/tasks/modules.yml index c3e93e4..c817eac 100644 --- a/roles/fedora/tasks/modules.yml +++ b/roles/fedora/tasks/modules.yml @@ -1,13 +1,13 @@ --- - name: Blacklist pcspkr module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist pcspkr create: yes - name: Blacklist dvb_usb_rtl28xxu module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist dvb_usb_rtl28xxu create: yes diff --git a/roles/fedora/tasks/packages-cli.yml b/roles/fedora/tasks/packages-cli.yml index 41369ad..09bbe3e 100644 --- a/roles/fedora/tasks/packages-cli.yml +++ b/roles/fedora/tasks/packages-cli.yml @@ -1,7 +1,7 @@ --- - name: Install CLI packages become: true - dnf: + ansible.builtin.dnf: name: '{{ packages }}' state: present vars: diff --git a/roles/fedora/tasks/packages-gui.yml b/roles/fedora/tasks/packages-gui.yml index 67b3212..8ce8021 100644 --- a/roles/fedora/tasks/packages-gui.yml +++ b/roles/fedora/tasks/packages-gui.yml @@ -1,7 +1,7 @@ --- - name: Install GUI packages become: true - dnf: + ansible.builtin.dnf: name: '{{ packages }}' state: present vars: diff --git a/roles/fedora/tasks/solokeys.yml b/roles/fedora/tasks/solokeys.yml index bea6284..baf9e16 100644 --- a/roles/fedora/tasks/solokeys.yml +++ b/roles/fedora/tasks/solokeys.yml @@ -1,15 +1,15 @@ --- - name: Install solokeys udev rule become: true - copy: + ansible.builtin.copy: src: 70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules register: solokeys_copy - name: Reload udevadm rules become: true - command: udevadm control --reload-rules + ansible.builtin.command: udevadm control --reload-rules when: solokeys_copy.changed - name: Trigger udevadm become: true - command: udevadm trigger + ansible.builtin.command: udevadm trigger when: solokeys_copy.changed diff --git a/roles/fedora/tasks/ssh.yml b/roles/fedora/tasks/ssh.yml index b4fca4a..60729df 100644 --- a/roles/fedora/tasks/ssh.yml +++ b/roles/fedora/tasks/ssh.yml @@ -1,26 +1,26 @@ --- - name: Disable SSH passwords become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config regexp: '^#?\w*PasswordAuthentication (yes|no)' line: 'PasswordAuthentication no' register: changed_ssh_config - name: Enable SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service enabled: yes state: started - name: Restart SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service state: restarted when: changed_ssh_config.changed == true - name: Allow SSH through firewall become: true - firewalld: + ansible.posix.firewalld: service: ssh permanent: yes state: enabled diff --git a/roles/freebsd/tasks/packages-cli.yml b/roles/freebsd/tasks/packages-cli.yml index 47dd95f..d595810 100644 --- a/roles/freebsd/tasks/packages-cli.yml +++ b/roles/freebsd/tasks/packages-cli.yml @@ -1,12 +1,12 @@ --- - name: Install core CLI packages become: true - pkgng: + community.general.pkgng: name: drm-kmod,en-freebsd-doc,git,pkg,py37-ansible,sudo state: present - name: Install additional CLI packages become: true - pkgng: + community.general.pkgng: name: '{{ packages }}' state: present vars: @@ -24,7 +24,7 @@ - zsh - name: Install asciidoctor-pdf Ruby gem become: true - gem: + community.general.gem: name: asciidoctor-pdf state: present pre_release: yes diff --git a/roles/freebsd/tasks/packages-gui.yml b/roles/freebsd/tasks/packages-gui.yml index d19548c..6759b23 100644 --- a/roles/freebsd/tasks/packages-gui.yml +++ b/roles/freebsd/tasks/packages-gui.yml @@ -1,12 +1,12 @@ --- - name: Install core GUI packages become: true - pkgng: + community.general.pkgng: name: drm-kmod,xdm,xorg,xterm state: present - name: Install additional GUI packages become: true - pkgng: + community.general.pkgng: name: '{{ packages }}' state: present vars: diff --git a/roles/freebsd/tasks/rc.yml b/roles/freebsd/tasks/rc.yml index 5a41cfa..70034b5 100644 --- a/roles/freebsd/tasks/rc.yml +++ b/roles/freebsd/tasks/rc.yml @@ -1,31 +1,31 @@ --- - name: Enable IPv6 privacy become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/rc.conf regexp: '^ipv6_privacy=.*' line: 'ipv6_privacy="YES"' - name: Set wlan0 arguments become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/rc.conf regexp: '^create_args_wlan0=.*' line: 'create_args_wlan0="country GB"' - name: Enable WPA/DHCP for wlan0 become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/rc.conf regexp: '^ifconfig_wlan0=.*' line: 'ifconfig_wlan0="WPA SYNCDHCP"' - name: Enable IPv6 for wlan0 become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/rc.conf regexp: '^ifconfig_wlan0_ipv6=.*' line: 'ifconfig_wlan0_ipv6="inet6 accept_rtadv"' - name: Enable SDDM become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/rc.conf regexp: '^sddm_enable=.*' line: 'sddm_enable="YES"' diff --git a/roles/freebsd/tasks/ssh.yml b/roles/freebsd/tasks/ssh.yml index c71f872..5c5b183 100644 --- a/roles/freebsd/tasks/ssh.yml +++ b/roles/freebsd/tasks/ssh.yml @@ -1,20 +1,20 @@ --- - name: Disable SSH passwords become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config regexp: '^#?\w*PasswordAuthentication (yes|no)' line: 'PasswordAuthentication no' register: changed_ssh_config - name: Enable SSH become: true - service: + ansible.builtin.service: name: sshd enabled: yes state: started - name: Restart SSH become: true - service: + ansible.builtin.service: name: sshd state: restarted when: changed_ssh_config.changed == true diff --git a/roles/freebsd/tasks/sudo.yml b/roles/freebsd/tasks/sudo.yml index 731464c..d2ad0b3 100644 --- a/roles/freebsd/tasks/sudo.yml +++ b/roles/freebsd/tasks/sudo.yml @@ -1,7 +1,7 @@ --- - name: Enable wheel group to use sudo become: true - lineinfile: + ansible.builtin.lineinfile: path: /usr/local/etc/sudoers.d/wheel regexp: 'wheel' line: '%wheel ALL=(ALL) ALL' diff --git a/roles/freebsd/tasks/sysctl.yml b/roles/freebsd/tasks/sysctl.yml index 9e2fa65..1bbf4e7 100644 --- a/roles/freebsd/tasks/sysctl.yml +++ b/roles/freebsd/tasks/sysctl.yml @@ -1,25 +1,25 @@ --- - name: Disable core dumps become: true - sysctl: + ansible.posix.sysctl: name: kern.coredump value: '0' sysctl_set: yes - name: Use IPv6 temporary addresses become: true - sysctl: + ansible.posix.sysctl: name: net.inet6.ip6.use_tempaddr value: '1' sysctl_set: yes - name: Prefer IPv6 temporary addresses become: true - sysctl: + ansible.posix.sysctl: name: net.inet6.ip6.prefer_tempaddr value: '1' sysctl_set: yes - name: Disable VT bell become: true - sysctl: + ansible.posix.sysctl: name: kern.vt.enable_bell value: '0' sysctl_set: yes diff --git a/roles/freebsd/tasks/xorg.yml b/roles/freebsd/tasks/xorg.yml index 260f47b..b064fe9 100644 --- a/roles/freebsd/tasks/xorg.yml +++ b/roles/freebsd/tasks/xorg.yml @@ -1,18 +1,18 @@ --- - name: Start DBUS service become: true - service: + ansible.builtin.service: name: dbus state: started enabled: yes - name: Set xorg keyboard layout become: true - copy: + ansible.builtin.copy: src: keyboard-gb.conf dest: /usr/local/etc/X11/xorg.conf.d/keyboard-gb.conf - name: Set xorg screen size for kvm/qemu become: true - copy: + ansible.builtin.copy: src: screen-qemu.conf dest: /usr/local/etc/X11/xorg.conf.d/screen-qemu.conf when: ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm" diff --git a/roles/home-cli/tasks/dirs.yml b/roles/home-cli/tasks/dirs.yml index 4541a01..d95af59 100644 --- a/roles/home-cli/tasks/dirs.yml +++ b/roles/home-cli/tasks/dirs.yml @@ -1,23 +1,23 @@ --- - name: Create user bin directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/bin" state: directory - name: Create user opt directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/opt" state: directory - name: Create systemd user directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.config/systemd/user" state: directory - name: Create ~/.ssh directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.ssh" state: directory mode: '0700' - name: Create ~/.config directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.config" state: directory mode: '0700' diff --git a/roles/home-cli/tasks/dotfiles.yml b/roles/home-cli/tasks/dotfiles.yml index fe45067..82ec7f4 100644 --- a/roles/home-cli/tasks/dotfiles.yml +++ b/roles/home-cli/tasks/dotfiles.yml @@ -1,25 +1,25 @@ --- - name: Copy .gemrc - copy: + ansible.builtin.copy: src: gemrc dest: "{{ ansible_env.HOME }}/.gemrc" - name: Remove .hushlogin - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.hushlogin" state: absent - name: Copy .tmux.conf - copy: + ansible.builtin.copy: src: tmux.conf dest: "{{ ansible_env.HOME }}/.tmux.conf" - name: Copy openpgp.asc - copy: + ansible.builtin.copy: src: openpgp.asc dest: "{{ ansible_env.HOME }}/.config/openpgp.asc" - name: Copy .dput.cf - copy: + ansible.builtin.copy: src: dput.cf dest: "{{ ansible_env.HOME }}/.dput.cf" - name: Copy .mailcap - copy: + ansible.builtin.copy: src: mailcap dest: "{{ ansible_env.HOME }}/.mailcap" diff --git a/roles/home-cli/tasks/gitconfig.yml b/roles/home-cli/tasks/gitconfig.yml index b075107..a2ce2d6 100644 --- a/roles/home-cli/tasks/gitconfig.yml +++ b/roles/home-cli/tasks/gitconfig.yml @@ -1,86 +1,86 @@ --- - name: Git pull.rebase - git_config: + community.general.git_config: name: pull.rebase value: 'true' scope: global - name: Git push.default - git_config: + community.general.git_config: name: push.default value: simple scope: global - name: Git color.ui - git_config: + community.general.git_config: name: color.ui value: auto scope: global - name: Git credential.helper - git_config: + community.general.git_config: name: credential.helper value: store scope: global - name: Git gui.encoding - git_config: + community.general.git_config: name: gui.encoding value: utf-8 scope: global - name: Git guitool.Rebase.cmd - git_config: + community.general.git_config: name: guitool.Rebase.cmd value: rebase scope: global - name: Git user.name - git_config: + community.general.git_config: name: user.name value: Anthony Perkins scope: global - name: Git user.email - git_config: + community.general.git_config: name: user.email value: anthony@acperkins.com scope: global - name: Git alias.ci - git_config: + community.general.git_config: name: alias.ci value: commit scope: global - name: Git alias.co - git_config: + community.general.git_config: name: alias.co value: checkout scope: global - name: Git alias.ff - git_config: + community.general.git_config: name: alias.ff value: merge --ff-only scope: global - name: Git alias.graph - git_config: + community.general.git_config: name: alias.graph value: log --graph --oneline --all scope: global - name: Git alias.l1 - git_config: + community.general.git_config: name: alias.l1 value: log --pretty=oneline scope: global - name: Git alias.last - git_config: + community.general.git_config: name: alias.last value: log -1 HEAD --pretty=fuller scope: global - name: Git alias.unstage - git_config: + community.general.git_config: name: alias.unstage value: reset HEAD -- scope: global - name: Git alias.up - git_config: + community.general.git_config: name: alias.up value: pull --rebase scope: global - name: Git URL rewrite - git_config: + community.general.git_config: name: url."https://code.acperkins.com/".insteadof value: https://git.acperkins.com/ scope: global diff --git a/roles/home-cli/tasks/shell.yml b/roles/home-cli/tasks/shell.yml index 83ed8f0..caf3689 100644 --- a/roles/home-cli/tasks/shell.yml +++ b/roles/home-cli/tasks/shell.yml @@ -1,21 +1,21 @@ --- - name: Copy .bashrc - copy: + ansible.builtin.copy: src: bashrc dest: "{{ ansible_env.HOME }}/.bashrc" - name: Copy .bash_profile - copy: + ansible.builtin.copy: src: bash_profile dest: "{{ ansible_env.HOME }}/.bash_profile" - name: Copy .profile - copy: + ansible.builtin.copy: src: profile dest: "{{ ansible_env.HOME }}/.profile" - name: Copy .shrc - copy: + ansible.builtin.copy: src: shrc dest: "{{ ansible_env.HOME }}/.shrc" - name: Copy .zshrc - copy: + ansible.builtin.copy: src: zshrc dest: "{{ ansible_env.HOME }}/.zshrc" diff --git a/roles/home-cli/tasks/ssh-authorized-keys.yml b/roles/home-cli/tasks/ssh-authorized-keys.yml index 6b937f8..35937c3 100644 --- a/roles/home-cli/tasks/ssh-authorized-keys.yml +++ b/roles/home-cli/tasks/ssh-authorized-keys.yml @@ -1,24 +1,24 @@ --- - name: Add home rsa key to authorized_keys - lineinfile: + ansible.builtin.lineinfile: path: "{{ ansible_env.HOME }}/.ssh/authorized_keys" line: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUfTUp1m8MUCjj0Vu8E9sVGwvf4FWL4QcaZ6m8gK5+xGZl+w+yAcb1acH/96Y0DaP4ZNDassC5OlE6F1oJ+cIKtTykXBxqlChLRDCdX8JCt3sBaVmEcRJ0v8MMQrqWX2ajAW6fC/zNYJ4qbhTMGLiEUPbYu7gZKn0e+MEPBRrxdXzqVLTBq0RMelGx74UpZUwzwROq+VxLsFrumFZNFNJL+rWEK3XO5SsQkNp5QNYluIr8+WDbVU6V2thgJTcFpWWWYVg/al5iY5/bcnVSpzoab7Xxo98OYzpSrY0g+CqkLQkfRehOUMeEOGQYZxpUaXFhg2jE+Kf7W2gm3CeJWTzP home" create: yes mode: '0600' - name: Add work rsa key to authorized_keys - lineinfile: + ansible.builtin.lineinfile: path: "{{ ansible_env.HOME }}/.ssh/authorized_keys" line: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAjRPqXzNlrmPWGC6yRCnZszewblS6JcQeNBkHuNmWD9WoMFGLvjkl+NGiC01k9su4JMfz6vOvNG1A6J16+uhEz0+Q70Z/kCM91EqYK8iiGA+qfC2y5PMA10BtWInQ9OqPbanv38ZBB7+afOcEbGR3CC56rp/uibwdBo2RpVRjAjZfsC64tZ6Pt8C55rVvBeZwNtXtw9RIwKAJGmlBsZEdIKpTHIf2IDfPWX3OLahcNA5/6aNB65qQV7fqQXEgBSjJmMsdCD8Jy5O+f7rzC+kFxozB/36mV1pBgZhT/iTK9fFJip0vyFFjk4CPRRbrnnJUBod/aGfWAP876b/0DXviWQ== work" create: yes mode: '0600' - name: Add home ed25519 key to authorized_keys - lineinfile: + ansible.builtin.lineinfile: path: "{{ ansible_env.HOME }}/.ssh/authorized_keys" line: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKG63aHe1QmTPj4mWg0F/fAzcB78tBJglxyLI0AzOKvW acp-home" create: yes mode: '0600' - name: Add work ed25519 key to authorized_keys - lineinfile: + ansible.builtin.lineinfile: path: "{{ ansible_env.HOME }}/.ssh/authorized_keys" line: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMMMawkF2TJzmqHewciwMRhOOTE9W1+vXq1yzV13KWUg acp-work" create: yes diff --git a/roles/home-cli/tasks/vim.yml b/roles/home-cli/tasks/vim.yml index f78a713..5560ac0 100644 --- a/roles/home-cli/tasks/vim.yml +++ b/roles/home-cli/tasks/vim.yml @@ -1,5 +1,5 @@ --- - name: Clone vim settings - git: + ansible.builtin.git: repo: https://code.acperkins.com/acp/vimfiles.git dest: "{{ ansible_env.HOME }}/.vim" diff --git a/roles/home-gui/tasks/dirs.yml b/roles/home-gui/tasks/dirs.yml index ea69303..724c048 100644 --- a/roles/home-gui/tasks/dirs.yml +++ b/roles/home-gui/tasks/dirs.yml @@ -1,17 +1,17 @@ --- - name: Create user applications directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.local/share/applications" state: directory - name: Create user autostart directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.config/autostart" state: directory - name: Create ~/.fvwm directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.fvwm" state: directory - name: Create ~/.local/share/fonts directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.local/share/fonts" state: directory diff --git a/roles/home-gui/tasks/dotfiles.yml b/roles/home-gui/tasks/dotfiles.yml index c8732ef..e769de3 100644 --- a/roles/home-gui/tasks/dotfiles.yml +++ b/roles/home-gui/tasks/dotfiles.yml @@ -1,46 +1,46 @@ --- - name: Copy .Xresources - copy: + ansible.builtin.copy: src: Xresources dest: "{{ ansible_env.HOME }}/.Xresources" - name: Copy .fonts.conf - copy: + ansible.builtin.copy: src: fonts.conf dest: "{{ ansible_env.HOME }}/.fonts.conf" - name: Create stalonetrayrc - copy: + ansible.builtin.copy: src: stalonetrayrc dest: "{{ ansible_env.HOME }}/.stalonetrayrc" - name: Create fvwm config file - copy: + ansible.builtin.copy: src: fvwmrc dest: "{{ ansible_env.HOME }}/.fvwm/config" - name: Create NetBSD xsession file - copy: + ansible.builtin.copy: src: xsession-netbsd dest: "{{ ansible_env.HOME }}/.xsession" when: ansible_system == "NetBSD" - name: Create xinitrc symlink - file: + ansible.builtin.file: src: ".xsession" dest: "{{ ansible_env.HOME }}/.xinitrc" state: link when: ansible_system == "NetBSD" - name: Load ~/.Xresources - copy: + ansible.builtin.copy: src: "xrdb.desktop" dest: "{{ ansible_env.HOME }}/.config/autostart/xrdb.desktop" when: ansible_distribution == "Fedora" or ansible_distribution == "Debian" - name: Add to-do list launcher - template: + ansible.builtin.template: src: todo.desktop dest: "{{ ansible_env.HOME }}/.local/share/applications/todo.desktop" - name: Copy .xbindkeysrc - copy: + ansible.builtin.copy: src: "xbindkeysrc" dest: "{{ ansible_env.HOME }}/.xbindkeysrc" - name: Add custom Chromium launcher - template: + ansible.builtin.template: src: chromium-browser.desktop dest: "{{ ansible_env.HOME }}/.local/share/applications/chromium-browser.desktop" vars: diff --git a/roles/home-gui/tasks/emacs.yml b/roles/home-gui/tasks/emacs.yml index 67a5822..c9a1972 100644 --- a/roles/home-gui/tasks/emacs.yml +++ b/roles/home-gui/tasks/emacs.yml @@ -1,41 +1,41 @@ --- - name: Detect Emacs binary - stat: + ansible.builtin.stat: path: "{{ prefix }}/bin/emacs" vars: prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}" register: emacs_binary - name: Remove ~/.emacs file - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.emacs" state: absent - name: Clone Emacs settings - git: + ansible.builtin.git: repo: https://code.acperkins.com/acp/emacs.d.git dest: "{{ ansible_env.HOME }}/.emacs.d" - name: Install NotoSansMono-Regular font - copy: + ansible.builtin.copy: src: NotoSansMono-Regular.ttf dest: "{{ ansible_env.HOME }}/.local/share/fonts/NotoSansMono-Regular.ttf" - name: Install NotoSansMono-Bold font - copy: + ansible.builtin.copy: src: NotoSansMono-Bold.ttf dest: "{{ ansible_env.HOME }}/.local/share/fonts/NotoSansMono-Bold.ttf" - name: Create Emacs user service (Linux) - template: + ansible.builtin.template: src: emacs.service dest: "{{ ansible_env.HOME }}/.config/systemd/user/emacs.service" vars: prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}" when: ansible_system == 'Linux' and emacs_binary.stat.exists == True - name: Add Emacs server to autostart (FreeBSD) - copy: + ansible.builtin.copy: src: '{{ ansible_env.HOME }}/.emacs.d/emacs-server.desktop' dest: '{{ ansible_env.HOME }}/.config/autostart' remote_src: yes when: ansible_system == 'FreeBSD' and emacs_binary.stat.exists == True - name: Start Emacs user service - systemd: + ansible.builtin.systemd: name: emacs.service scope: user daemon_reload: yes @@ -43,7 +43,7 @@ state: started when: ansible_system == 'Linux' and emacs_binary.stat.exists == True - name: Create Emacs client launcher - copy: + ansible.builtin.copy: src: "{{ ansible_env.HOME }}/.emacs.d/emacs-client.desktop" dest: "{{ ansible_env.HOME }}/.local/share/applications/emacs.desktop" remote_src: yes diff --git a/roles/home-gui/tasks/firefox.yml b/roles/home-gui/tasks/firefox.yml index f0f04ac..6d91c2d 100644 --- a/roles/home-gui/tasks/firefox.yml +++ b/roles/home-gui/tasks/firefox.yml @@ -1,10 +1,10 @@ --- - name: Check for profiles.ini - stat: + ansible.builtin.stat: path: "{{ ansible_env.HOME }}/.mozilla/firefox/profiles.ini" register: profile_ini - name: Copy Firefox preferences to Profile0 - copy: + ansible.builtin.copy: src: user.js dest: "{{ ansible_env.HOME }}/.mozilla/firefox/{{ lookup('ini', 'Path section=Profile0 file={{ ansible_env.HOME }}/.mozilla/firefox/profiles.ini') }}/user.js" when: profile_ini.stat.exists diff --git a/roles/home-gui/tasks/mate.yml b/roles/home-gui/tasks/mate.yml index d9210f5..568a1ae 100644 --- a/roles/home-gui/tasks/mate.yml +++ b/roles/home-gui/tasks/mate.yml @@ -1,17 +1,17 @@ --- - name: Create MATE layouts directory - file: + ansible.builtin.file: path: "{{ ansible_env.HOME }}/.local/share/mate-panel/layouts" state: directory - name: Copy MATE panel layout - template: + ansible.builtin.template: src: mate-acp.layout dest: "{{ ansible_env.HOME }}/.local/share/mate-panel/layouts/acp.layout" vars: prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}" esr: "{{ '-esr' if ansible_distribution == 'Debian' else '' }}" - name: Copy MATE Clock reset script - copy: + ansible.builtin.copy: src: reset-mate-clock.sh dest: "{{ ansible_env.HOME }}/bin/reset-mate-clock" mode: '0755' diff --git a/roles/home-gui/tasks/sublimetext.yml b/roles/home-gui/tasks/sublimetext.yml index af7ab2e..68e6e0d 100644 --- a/roles/home-gui/tasks/sublimetext.yml +++ b/roles/home-gui/tasks/sublimetext.yml @@ -1,10 +1,10 @@ --- - name: Check for Sublime Text directory - stat: + ansible.builtin.stat: path: "{{ ansible_env.HOME }}/.config/sublime-text-3/Packages/User" register: sublime - name: Copy Sublime Text preferences - copy: + ansible.builtin.copy: src: Preferences.sublime-settings dest: "{{ ansible_env.HOME }}/.config/sublime-text-3/Packages/User/Preferences.sublime-settings" when: sublime.stat.exists diff --git a/roles/netbsd/tasks/console.yml b/roles/netbsd/tasks/console.yml index 53024a8..65ea343 100644 --- a/roles/netbsd/tasks/console.yml +++ b/roles/netbsd/tasks/console.yml @@ -1,13 +1,13 @@ --- - name: Disable getty on /dev/console become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ttys regexp: ^console\s+ line: 'console "/usr/libexec/getty Pc" vt100 off secure' - name: Enable getty on /dev/ttyE0 become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ttys regexp: ^ttyE0\s+ line: 'ttyE0 "/usr/libexec/getty Pc" wsvt25 on secure' diff --git a/roles/netbsd/tasks/packages-cli.yml b/roles/netbsd/tasks/packages-cli.yml index 0bfc39c..12a7179 100644 --- a/roles/netbsd/tasks/packages-cli.yml +++ b/roles/netbsd/tasks/packages-cli.yml @@ -1,21 +1,21 @@ --- - name: Configure pkg to ignore OSABI become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/pkg_install.conf regexp: '^CHECK_OSABI=' line: 'CHECK_OSABI=no' create: yes - name: Configure PKG_PATH become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/pkg_install.conf regexp: '^PKG_PATH=' line: 'PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/{{ ansible_machine }}/{{ ansible_distribution_release }}/All' create: yes - name: Install CLI packages become: true - pkgin: + community.general.pkgin: name: '{{ packages }}' state: present vars: diff --git a/roles/netbsd/tasks/packages-gui.yml b/roles/netbsd/tasks/packages-gui.yml index 25c3c1d..4bc54fa 100644 --- a/roles/netbsd/tasks/packages-gui.yml +++ b/roles/netbsd/tasks/packages-gui.yml @@ -1,7 +1,7 @@ --- - name: Install GUI packages become: true - pkgin: + community.general.pkgin: name: '{{ packages }}' state: present vars: diff --git a/roles/netbsd/tasks/sudo.yml b/roles/netbsd/tasks/sudo.yml index a0d7122..8ba79a5 100644 --- a/roles/netbsd/tasks/sudo.yml +++ b/roles/netbsd/tasks/sudo.yml @@ -1,7 +1,7 @@ --- - name: Enable wheel group to use sudo become: true - lineinfile: + ansible.builtin.lineinfile: path: /usr/pkg/etc/sudoers.d/wheel regexp: 'wheel' line: '%wheel ALL=(ALL) ALL' diff --git a/roles/netbsd/tasks/xorg.yml b/roles/netbsd/tasks/xorg.yml index 9e918f3..8477bcd 100644 --- a/roles/netbsd/tasks/xorg.yml +++ b/roles/netbsd/tasks/xorg.yml @@ -1,19 +1,19 @@ --- - name: Enable xdm become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/rc.conf regexp: ^xdm=.* line: xdm=YES - name: Copy dbus service become: true - copy: + ansible.builtin.copy: src: /usr/pkg/share/examples/rc.d/dbus dest: /etc/rc.d/dbus remote_src: yes - name: Enable dbus become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/rc.conf regexp: ^dbus=.* line: dbus=YES diff --git a/roles/opensuse-leap/tasks/modules.yml b/roles/opensuse-leap/tasks/modules.yml index c3e93e4..c817eac 100644 --- a/roles/opensuse-leap/tasks/modules.yml +++ b/roles/opensuse-leap/tasks/modules.yml @@ -1,13 +1,13 @@ --- - name: Blacklist pcspkr module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist pcspkr create: yes - name: Blacklist dvb_usb_rtl28xxu module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist dvb_usb_rtl28xxu create: yes diff --git a/roles/opensuse-leap/tasks/packages-cli.yml b/roles/opensuse-leap/tasks/packages-cli.yml index 27129dc..ec19dad 100644 --- a/roles/opensuse-leap/tasks/packages-cli.yml +++ b/roles/opensuse-leap/tasks/packages-cli.yml @@ -2,7 +2,7 @@ # The zypper module requires python-xml on openSUSE. - name: Install CLI patterns become: true - zypper: + community.general.zypper: name: '{{ patterns }}' state: present type: pattern @@ -12,7 +12,7 @@ - devel_rpm_build - name: Install CLI packages become: true - zypper: + community.general.zypper: name: '{{ packages }}' state: present type: package diff --git a/roles/opensuse-leap/tasks/packages-gui.yml b/roles/opensuse-leap/tasks/packages-gui.yml index d6b03a7..756d463 100644 --- a/roles/opensuse-leap/tasks/packages-gui.yml +++ b/roles/opensuse-leap/tasks/packages-gui.yml @@ -2,7 +2,7 @@ # The zypper module requires python-xml on openSUSE. - name: Install GUI packages become: true - zypper: + community.general.zypper: name: '{{ packages }}' state: present type: package diff --git a/roles/opensuse-leap/tasks/solokeys.yml b/roles/opensuse-leap/tasks/solokeys.yml index bea6284..baf9e16 100644 --- a/roles/opensuse-leap/tasks/solokeys.yml +++ b/roles/opensuse-leap/tasks/solokeys.yml @@ -1,15 +1,15 @@ --- - name: Install solokeys udev rule become: true - copy: + ansible.builtin.copy: src: 70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules register: solokeys_copy - name: Reload udevadm rules become: true - command: udevadm control --reload-rules + ansible.builtin.command: udevadm control --reload-rules when: solokeys_copy.changed - name: Trigger udevadm become: true - command: udevadm trigger + ansible.builtin.command: udevadm trigger when: solokeys_copy.changed diff --git a/roles/opensuse-leap/tasks/ssh.yml b/roles/opensuse-leap/tasks/ssh.yml index 81d098e..34e5aa3 100644 --- a/roles/opensuse-leap/tasks/ssh.yml +++ b/roles/opensuse-leap/tasks/ssh.yml @@ -1,26 +1,26 @@ --- - name: Disable SSH passwords become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config regexp: '^#?\w*PasswordAuthentication (yes|no)' line: 'PasswordAuthentication no' register: changed_ssh_config - name: Enable SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service enabled: yes state: started - name: Restart SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service state: restarted when: changed_ssh_config.changed == true - name: Allow SSH through firewall become: true - firewalld: + ansible.posix.firewalld: service: ssh permanent: yes state: enabled diff --git a/roles/opensuse-tumbleweed/tasks/modules.yml b/roles/opensuse-tumbleweed/tasks/modules.yml index c3e93e4..c817eac 100644 --- a/roles/opensuse-tumbleweed/tasks/modules.yml +++ b/roles/opensuse-tumbleweed/tasks/modules.yml @@ -1,13 +1,13 @@ --- - name: Blacklist pcspkr module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist pcspkr create: yes - name: Blacklist dvb_usb_rtl28xxu module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist dvb_usb_rtl28xxu create: yes diff --git a/roles/opensuse-tumbleweed/tasks/packages-cli.yml b/roles/opensuse-tumbleweed/tasks/packages-cli.yml index 7b141c3..b2faaa6 100644 --- a/roles/opensuse-tumbleweed/tasks/packages-cli.yml +++ b/roles/opensuse-tumbleweed/tasks/packages-cli.yml @@ -2,7 +2,7 @@ # The zypper module requires python-xml on openSUSE. - name: Install CLI patterns become: true - zypper: + community.general.zypper: name: '{{ patterns }}' state: present type: pattern @@ -12,7 +12,7 @@ - devel_rpm_build - name: Install CLI packages become: true - zypper: + community.general.zypper: name: '{{ packages }}' state: present type: package diff --git a/roles/opensuse-tumbleweed/tasks/packages-gui.yml b/roles/opensuse-tumbleweed/tasks/packages-gui.yml index d6b03a7..756d463 100644 --- a/roles/opensuse-tumbleweed/tasks/packages-gui.yml +++ b/roles/opensuse-tumbleweed/tasks/packages-gui.yml @@ -2,7 +2,7 @@ # The zypper module requires python-xml on openSUSE. - name: Install GUI packages become: true - zypper: + community.general.zypper: name: '{{ packages }}' state: present type: package diff --git a/roles/opensuse-tumbleweed/tasks/solokeys.yml b/roles/opensuse-tumbleweed/tasks/solokeys.yml index bea6284..baf9e16 100644 --- a/roles/opensuse-tumbleweed/tasks/solokeys.yml +++ b/roles/opensuse-tumbleweed/tasks/solokeys.yml @@ -1,15 +1,15 @@ --- - name: Install solokeys udev rule become: true - copy: + ansible.builtin.copy: src: 70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules register: solokeys_copy - name: Reload udevadm rules become: true - command: udevadm control --reload-rules + ansible.builtin.command: udevadm control --reload-rules when: solokeys_copy.changed - name: Trigger udevadm become: true - command: udevadm trigger + ansible.builtin.command: udevadm trigger when: solokeys_copy.changed diff --git a/roles/opensuse-tumbleweed/tasks/ssh.yml b/roles/opensuse-tumbleweed/tasks/ssh.yml index 81d098e..34e5aa3 100644 --- a/roles/opensuse-tumbleweed/tasks/ssh.yml +++ b/roles/opensuse-tumbleweed/tasks/ssh.yml @@ -1,26 +1,26 @@ --- - name: Disable SSH passwords become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config regexp: '^#?\w*PasswordAuthentication (yes|no)' line: 'PasswordAuthentication no' register: changed_ssh_config - name: Enable SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service enabled: yes state: started - name: Restart SSH become: true - systemd: + ansible.builtin.systemd: name: sshd.service state: restarted when: changed_ssh_config.changed == true - name: Allow SSH through firewall become: true - firewalld: + ansible.posix.firewalld: service: ssh permanent: yes state: enabled diff --git a/roles/ubuntu/tasks/build-env.yml b/roles/ubuntu/tasks/build-env.yml index d2a72bd..1d227f6 100644 --- a/roles/ubuntu/tasks/build-env.yml +++ b/roles/ubuntu/tasks/build-env.yml @@ -1,7 +1,7 @@ --- - name: Install build environment packages become: true - apt: + ansible.builtin.apt: name: '{{ packages }}' state: present force_apt_get: yes @@ -16,12 +16,12 @@ - pbuilder - name: Copy pbuilderrc become: true - copy: + ansible.builtin.copy: src: pbuilderrc dest: /etc/pbuilderrc - name: Set permissions on /var/cache/pbuilder/result become: true - file: + ansible.builtin.file: path: /var/cache/pbuilder/result state: directory owner: root diff --git a/roles/ubuntu/tasks/modules.yml b/roles/ubuntu/tasks/modules.yml index c3e93e4..c817eac 100644 --- a/roles/ubuntu/tasks/modules.yml +++ b/roles/ubuntu/tasks/modules.yml @@ -1,13 +1,13 @@ --- - name: Blacklist pcspkr module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist pcspkr create: yes - name: Blacklist dvb_usb_rtl28xxu module become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/blacklist.conf line: blacklist dvb_usb_rtl28xxu create: yes diff --git a/roles/ubuntu/tasks/packages-cli.yml b/roles/ubuntu/tasks/packages-cli.yml index b6ad5b7..fe80389 100644 --- a/roles/ubuntu/tasks/packages-cli.yml +++ b/roles/ubuntu/tasks/packages-cli.yml @@ -1,7 +1,7 @@ --- - name: Install CLI packages become: true - apt: + ansible.builtin.apt: name: '{{ packages }}' state: present force_apt_get: yes @@ -37,6 +37,6 @@ - zsh - name: Load /etc/profile in zsh become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/zsh/zprofile line: emulate sh -c 'source /etc/profile' diff --git a/roles/ubuntu/tasks/packages-gui.yml b/roles/ubuntu/tasks/packages-gui.yml index 6cec4bf..7cdcc0d 100644 --- a/roles/ubuntu/tasks/packages-gui.yml +++ b/roles/ubuntu/tasks/packages-gui.yml @@ -1,7 +1,7 @@ --- - name: Install GUI packages become: true - apt: + ansible.builtin.apt: name: '{{ packages }}' state: present force_apt_get: yes diff --git a/roles/ubuntu/tasks/ssh.yml b/roles/ubuntu/tasks/ssh.yml index 85b9093..b517f0f 100644 --- a/roles/ubuntu/tasks/ssh.yml +++ b/roles/ubuntu/tasks/ssh.yml @@ -1,20 +1,20 @@ --- - name: Disable SSH passwords become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config regexp: '^#?\w*PasswordAuthentication (yes|no)' line: 'PasswordAuthentication no' register: changed_ssh_config - name: Enable SSH become: true - systemd: + ansible.builtin.systemd: name: ssh.service enabled: yes state: started - name: Restart SSH become: true - systemd: + ansible.builtin.systemd: name: ssh.service state: restarted when: changed_ssh_config.changed == true