Use fully-qualified module names

This commit is contained in:
Anthony Rose 2021-02-19 20:32:22 +00:00
parent 414d50abb3
commit 33eca23199
64 changed files with 190 additions and 189 deletions

View file

@ -1,3 +1,4 @@
--- ---
collections: collections:
- ansible.posix - ansible.posix
- community.general

View file

@ -1,13 +1,13 @@
--- ---
- name: Set system locale - name: Set system locale
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/locale.conf path: /etc/locale.conf
line: "LANG=en_GB.UTF-8" line: "LANG=en_GB.UTF-8"
create: yes create: yes
- name: Set default paper size - name: Set default paper size
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/papersize path: /etc/papersize
line: a4 line: a4
create: yes create: yes

View file

@ -1,13 +1,13 @@
--- ---
- name: Blacklist pcspkr module - name: Blacklist pcspkr module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist pcspkr line: blacklist pcspkr
create: yes create: yes
- name: Blacklist dvb_usb_rtl28xxu module - name: Blacklist dvb_usb_rtl28xxu module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist dvb_usb_rtl28xxu line: blacklist dvb_usb_rtl28xxu
create: yes create: yes

View file

@ -1,11 +1,11 @@
--- ---
- name: Upgrade all packages - name: Upgrade all packages
become: true become: true
pacman: community.general.pacman:
upgrade: yes upgrade: yes
- name: Install CLI packages - name: Install CLI packages
become: true become: true
pacman: community.general.pacman:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
update_cache: yes update_cache: yes
@ -39,7 +39,7 @@
- zsh - zsh
- name: Enable TLP - name: Enable TLP
become: true become: true
systemd: ansible.builtin.systemd:
name: tlp.service name: tlp.service
enabled: true enabled: true
state: started state: started

View file

@ -1,7 +1,7 @@
--- ---
- name: Install GUI packages - name: Install GUI packages
become: true become: true
pacman: community.general.pacman:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
update_cache: yes update_cache: yes

View file

@ -1,7 +1,7 @@
--- ---
- name: Enable CUPS - name: Enable CUPS
become: true become: true
systemd: ansible.builtin.systemd:
name: org.cups.cupsd.service name: org.cups.cupsd.service
enabled: yes enabled: yes
state: started state: started

View file

@ -1,15 +1,15 @@
--- ---
- name: Install solokeys udev rule - name: Install solokeys udev rule
become: true become: true
copy: ansible.builtin.copy:
src: 70-solokeys-access.rules src: 70-solokeys-access.rules
dest: /etc/udev/rules.d/70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules
register: solokeys_copy register: solokeys_copy
- name: Reload udevadm rules - name: Reload udevadm rules
become: true become: true
command: udevadm control --reload-rules ansible.builtin.command: udevadm control --reload-rules
when: solokeys_copy.changed when: solokeys_copy.changed
- name: Trigger udevadm - name: Trigger udevadm
become: true become: true
command: udevadm trigger ansible.builtin.command: udevadm trigger
when: solokeys_copy.changed when: solokeys_copy.changed

View file

@ -1,20 +1,20 @@
--- ---
- name: Disable SSH passwords - name: Disable SSH passwords
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: '^#?\w*PasswordAuthentication (yes|no)' regexp: '^#?\w*PasswordAuthentication (yes|no)'
line: 'PasswordAuthentication no' line: 'PasswordAuthentication no'
register: changed_ssh_config register: changed_ssh_config
- name: Enable SSH - name: Enable SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
enabled: yes enabled: yes
state: started state: started
- name: Restart SSH - name: Restart SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
state: restarted state: restarted
when: changed_ssh_config.changed == true when: changed_ssh_config.changed == true

View file

@ -1,7 +1,7 @@
--- ---
- name: Install build environment packages - name: Install build environment packages
become: true become: true
apt: ansible.builtin.apt:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
force_apt_get: yes force_apt_get: yes
@ -16,12 +16,12 @@
- pbuilder - pbuilder
- name: Copy pbuilderrc - name: Copy pbuilderrc
become: true become: true
copy: ansible.builtin.copy:
src: pbuilderrc src: pbuilderrc
dest: /etc/pbuilderrc dest: /etc/pbuilderrc
- name: Set permissions on /var/cache/pbuilder/result - name: Set permissions on /var/cache/pbuilder/result
become: true become: true
file: ansible.builtin.file:
path: /var/cache/pbuilder/result path: /var/cache/pbuilder/result
state: directory state: directory
owner: root owner: root

View file

@ -1,11 +1,11 @@
--- ---
- name: Set default Xorg/Wayland keyboard layout - name: Set default Xorg/Wayland keyboard layout
become: true become: true
copy: ansible.builtin.copy:
src: keyboard src: keyboard
dest: /etc/default/keyboard dest: /etc/default/keyboard
register: keyboard_copy register: keyboard_copy
- name: Update initramfs - name: Update initramfs
become: true become: true
command: /usr/sbin/update-initramfs -k all -u ansible.builtin.command: /usr/sbin/update-initramfs -k all -u
when: keyboard_copy.changed when: keyboard_copy.changed

View file

@ -1,13 +1,13 @@
--- ---
- name: Blacklist pcspkr module - name: Blacklist pcspkr module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist pcspkr line: blacklist pcspkr
create: yes create: yes
- name: Blacklist dvb_usb_rtl28xxu module - name: Blacklist dvb_usb_rtl28xxu module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist dvb_usb_rtl28xxu line: blacklist dvb_usb_rtl28xxu
create: yes create: yes

View file

@ -1,7 +1,7 @@
--- ---
- name: Install CLI packages - name: Install CLI packages
become: true become: true
apt: ansible.builtin.apt:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
force_apt_get: yes force_apt_get: yes
@ -44,6 +44,6 @@
- zsh - zsh
- name: Load /etc/profile in zsh - name: Load /etc/profile in zsh
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/zsh/zprofile path: /etc/zsh/zprofile
line: emulate sh -c 'source /etc/profile' line: emulate sh -c 'source /etc/profile'

View file

@ -1,7 +1,7 @@
--- ---
- name: Install GUI packages - name: Install GUI packages
become: true become: true
apt: ansible.builtin.apt:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
force_apt_get: yes force_apt_get: yes

View file

@ -1,15 +1,15 @@
--- ---
- name: Install solokeys udev rule - name: Install solokeys udev rule
become: true become: true
copy: ansible.builtin.copy:
src: 70-solokeys-access.rules src: 70-solokeys-access.rules
dest: /etc/udev/rules.d/70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules
register: solokeys_copy register: solokeys_copy
- name: Reload udevadm rules - name: Reload udevadm rules
become: true become: true
command: udevadm control --reload-rules ansible.builtin.command: udevadm control --reload-rules
when: solokeys_copy.changed when: solokeys_copy.changed
- name: Trigger udevadm - name: Trigger udevadm
become: true become: true
command: udevadm trigger ansible.builtin.command: udevadm trigger
when: solokeys_copy.changed when: solokeys_copy.changed

View file

@ -1,20 +1,20 @@
--- ---
- name: Disable SSH passwords - name: Disable SSH passwords
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: '^#?\w*PasswordAuthentication (yes|no)' regexp: '^#?\w*PasswordAuthentication (yes|no)'
line: 'PasswordAuthentication no' line: 'PasswordAuthentication no'
register: changed_ssh_config register: changed_ssh_config
- name: Enable SSH - name: Enable SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: ssh.service name: ssh.service
enabled: yes enabled: yes
state: started state: started
- name: Restart SSH - name: Restart SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: ssh.service name: ssh.service
state: restarted state: restarted
when: changed_ssh_config.changed == true when: changed_ssh_config.changed == true

View file

@ -1,13 +1,13 @@
--- ---
- name: Blacklist pcspkr module - name: Blacklist pcspkr module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist pcspkr line: blacklist pcspkr
create: yes create: yes
- name: Blacklist dvb_usb_rtl28xxu module - name: Blacklist dvb_usb_rtl28xxu module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist dvb_usb_rtl28xxu line: blacklist dvb_usb_rtl28xxu
create: yes create: yes

View file

@ -1,11 +1,11 @@
--- ---
- name: Check for CentOS-Stream-PowerTools.repo file - name: Check for CentOS-Stream-PowerTools.repo file
stat: ansible.builtin.stat:
path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo
register: pt register: pt
- name: Enable CentOS Stream PowerTools repository - name: Enable CentOS Stream PowerTools repository
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo
create: false create: false
regexp: ^enabled= regexp: ^enabled=
@ -13,7 +13,7 @@
when: ansible_distribution == 'CentOS' and pt.stat.exists when: ansible_distribution == 'CentOS' and pt.stat.exists
- name: Install CLI packages - name: Install CLI packages
become: true become: true
dnf: ansible.builtin.dnf:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
vars: vars:

View file

@ -1,7 +1,7 @@
--- ---
- name: Install GUI packages - name: Install GUI packages
become: true become: true
dnf: ansible.builtin.dnf:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
vars: vars:

View file

@ -1,15 +1,15 @@
--- ---
- name: Install solokeys udev rule - name: Install solokeys udev rule
become: true become: true
copy: ansible.builtin.copy:
src: 70-solokeys-access.rules src: 70-solokeys-access.rules
dest: /etc/udev/rules.d/70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules
register: solokeys_copy register: solokeys_copy
- name: Reload udevadm rules - name: Reload udevadm rules
become: true become: true
command: udevadm control --reload-rules ansible.builtin.command: udevadm control --reload-rules
when: solokeys_copy.changed when: solokeys_copy.changed
- name: Trigger udevadm - name: Trigger udevadm
become: true become: true
command: udevadm trigger ansible.builtin.command: udevadm trigger
when: solokeys_copy.changed when: solokeys_copy.changed

View file

@ -1,26 +1,26 @@
--- ---
- name: Disable SSH passwords - name: Disable SSH passwords
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: '^#?\w*PasswordAuthentication (yes|no)' regexp: '^#?\w*PasswordAuthentication (yes|no)'
line: 'PasswordAuthentication no' line: 'PasswordAuthentication no'
register: changed_ssh_config register: changed_ssh_config
- name: Enable SSH - name: Enable SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
enabled: yes enabled: yes
state: started state: started
- name: Restart SSH - name: Restart SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
state: restarted state: restarted
when: changed_ssh_config.changed == true when: changed_ssh_config.changed == true
- name: Allow SSH through firewall - name: Allow SSH through firewall
become: true become: true
firewalld: ansible.posix.firewalld:
service: ssh service: ssh
permanent: yes permanent: yes
state: enabled state: enabled

View file

@ -1,13 +1,13 @@
--- ---
- name: Blacklist pcspkr module - name: Blacklist pcspkr module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist pcspkr line: blacklist pcspkr
create: yes create: yes
- name: Blacklist dvb_usb_rtl28xxu module - name: Blacklist dvb_usb_rtl28xxu module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist dvb_usb_rtl28xxu line: blacklist dvb_usb_rtl28xxu
create: yes create: yes

View file

@ -1,7 +1,7 @@
--- ---
- name: Install CLI packages - name: Install CLI packages
become: true become: true
dnf: ansible.builtin.dnf:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
vars: vars:

View file

@ -1,7 +1,7 @@
--- ---
- name: Install GUI packages - name: Install GUI packages
become: true become: true
dnf: ansible.builtin.dnf:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
vars: vars:

View file

@ -1,15 +1,15 @@
--- ---
- name: Install solokeys udev rule - name: Install solokeys udev rule
become: true become: true
copy: ansible.builtin.copy:
src: 70-solokeys-access.rules src: 70-solokeys-access.rules
dest: /etc/udev/rules.d/70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules
register: solokeys_copy register: solokeys_copy
- name: Reload udevadm rules - name: Reload udevadm rules
become: true become: true
command: udevadm control --reload-rules ansible.builtin.command: udevadm control --reload-rules
when: solokeys_copy.changed when: solokeys_copy.changed
- name: Trigger udevadm - name: Trigger udevadm
become: true become: true
command: udevadm trigger ansible.builtin.command: udevadm trigger
when: solokeys_copy.changed when: solokeys_copy.changed

View file

@ -1,26 +1,26 @@
--- ---
- name: Disable SSH passwords - name: Disable SSH passwords
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: '^#?\w*PasswordAuthentication (yes|no)' regexp: '^#?\w*PasswordAuthentication (yes|no)'
line: 'PasswordAuthentication no' line: 'PasswordAuthentication no'
register: changed_ssh_config register: changed_ssh_config
- name: Enable SSH - name: Enable SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
enabled: yes enabled: yes
state: started state: started
- name: Restart SSH - name: Restart SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
state: restarted state: restarted
when: changed_ssh_config.changed == true when: changed_ssh_config.changed == true
- name: Allow SSH through firewall - name: Allow SSH through firewall
become: true become: true
firewalld: ansible.posix.firewalld:
service: ssh service: ssh
permanent: yes permanent: yes
state: enabled state: enabled

View file

@ -1,12 +1,12 @@
--- ---
- name: Install core CLI packages - name: Install core CLI packages
become: true become: true
pkgng: community.general.pkgng:
name: drm-kmod,en-freebsd-doc,git,pkg,py37-ansible,sudo name: drm-kmod,en-freebsd-doc,git,pkg,py37-ansible,sudo
state: present state: present
- name: Install additional CLI packages - name: Install additional CLI packages
become: true become: true
pkgng: community.general.pkgng:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
vars: vars:
@ -24,7 +24,7 @@
- zsh - zsh
- name: Install asciidoctor-pdf Ruby gem - name: Install asciidoctor-pdf Ruby gem
become: true become: true
gem: community.general.gem:
name: asciidoctor-pdf name: asciidoctor-pdf
state: present state: present
pre_release: yes pre_release: yes

View file

@ -1,12 +1,12 @@
--- ---
- name: Install core GUI packages - name: Install core GUI packages
become: true become: true
pkgng: community.general.pkgng:
name: drm-kmod,xdm,xorg,xterm name: drm-kmod,xdm,xorg,xterm
state: present state: present
- name: Install additional GUI packages - name: Install additional GUI packages
become: true become: true
pkgng: community.general.pkgng:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
vars: vars:

View file

@ -1,31 +1,31 @@
--- ---
- name: Enable IPv6 privacy - name: Enable IPv6 privacy
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/rc.conf path: /etc/rc.conf
regexp: '^ipv6_privacy=.*' regexp: '^ipv6_privacy=.*'
line: 'ipv6_privacy="YES"' line: 'ipv6_privacy="YES"'
- name: Set wlan0 arguments - name: Set wlan0 arguments
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/rc.conf path: /etc/rc.conf
regexp: '^create_args_wlan0=.*' regexp: '^create_args_wlan0=.*'
line: 'create_args_wlan0="country GB"' line: 'create_args_wlan0="country GB"'
- name: Enable WPA/DHCP for wlan0 - name: Enable WPA/DHCP for wlan0
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/rc.conf path: /etc/rc.conf
regexp: '^ifconfig_wlan0=.*' regexp: '^ifconfig_wlan0=.*'
line: 'ifconfig_wlan0="WPA SYNCDHCP"' line: 'ifconfig_wlan0="WPA SYNCDHCP"'
- name: Enable IPv6 for wlan0 - name: Enable IPv6 for wlan0
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/rc.conf path: /etc/rc.conf
regexp: '^ifconfig_wlan0_ipv6=.*' regexp: '^ifconfig_wlan0_ipv6=.*'
line: 'ifconfig_wlan0_ipv6="inet6 accept_rtadv"' line: 'ifconfig_wlan0_ipv6="inet6 accept_rtadv"'
- name: Enable SDDM - name: Enable SDDM
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/rc.conf path: /etc/rc.conf
regexp: '^sddm_enable=.*' regexp: '^sddm_enable=.*'
line: 'sddm_enable="YES"' line: 'sddm_enable="YES"'

View file

@ -1,20 +1,20 @@
--- ---
- name: Disable SSH passwords - name: Disable SSH passwords
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: '^#?\w*PasswordAuthentication (yes|no)' regexp: '^#?\w*PasswordAuthentication (yes|no)'
line: 'PasswordAuthentication no' line: 'PasswordAuthentication no'
register: changed_ssh_config register: changed_ssh_config
- name: Enable SSH - name: Enable SSH
become: true become: true
service: ansible.builtin.service:
name: sshd name: sshd
enabled: yes enabled: yes
state: started state: started
- name: Restart SSH - name: Restart SSH
become: true become: true
service: ansible.builtin.service:
name: sshd name: sshd
state: restarted state: restarted
when: changed_ssh_config.changed == true when: changed_ssh_config.changed == true

View file

@ -1,7 +1,7 @@
--- ---
- name: Enable wheel group to use sudo - name: Enable wheel group to use sudo
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /usr/local/etc/sudoers.d/wheel path: /usr/local/etc/sudoers.d/wheel
regexp: 'wheel' regexp: 'wheel'
line: '%wheel ALL=(ALL) ALL' line: '%wheel ALL=(ALL) ALL'

View file

@ -1,25 +1,25 @@
--- ---
- name: Disable core dumps - name: Disable core dumps
become: true become: true
sysctl: ansible.posix.sysctl:
name: kern.coredump name: kern.coredump
value: '0' value: '0'
sysctl_set: yes sysctl_set: yes
- name: Use IPv6 temporary addresses - name: Use IPv6 temporary addresses
become: true become: true
sysctl: ansible.posix.sysctl:
name: net.inet6.ip6.use_tempaddr name: net.inet6.ip6.use_tempaddr
value: '1' value: '1'
sysctl_set: yes sysctl_set: yes
- name: Prefer IPv6 temporary addresses - name: Prefer IPv6 temporary addresses
become: true become: true
sysctl: ansible.posix.sysctl:
name: net.inet6.ip6.prefer_tempaddr name: net.inet6.ip6.prefer_tempaddr
value: '1' value: '1'
sysctl_set: yes sysctl_set: yes
- name: Disable VT bell - name: Disable VT bell
become: true become: true
sysctl: ansible.posix.sysctl:
name: kern.vt.enable_bell name: kern.vt.enable_bell
value: '0' value: '0'
sysctl_set: yes sysctl_set: yes

View file

@ -1,18 +1,18 @@
--- ---
- name: Start DBUS service - name: Start DBUS service
become: true become: true
service: ansible.builtin.service:
name: dbus name: dbus
state: started state: started
enabled: yes enabled: yes
- name: Set xorg keyboard layout - name: Set xorg keyboard layout
become: true become: true
copy: ansible.builtin.copy:
src: keyboard-gb.conf src: keyboard-gb.conf
dest: /usr/local/etc/X11/xorg.conf.d/keyboard-gb.conf dest: /usr/local/etc/X11/xorg.conf.d/keyboard-gb.conf
- name: Set xorg screen size for kvm/qemu - name: Set xorg screen size for kvm/qemu
become: true become: true
copy: ansible.builtin.copy:
src: screen-qemu.conf src: screen-qemu.conf
dest: /usr/local/etc/X11/xorg.conf.d/screen-qemu.conf dest: /usr/local/etc/X11/xorg.conf.d/screen-qemu.conf
when: ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm" when: ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm"

View file

@ -1,23 +1,23 @@
--- ---
- name: Create user bin directory - name: Create user bin directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/bin" path: "{{ ansible_env.HOME }}/bin"
state: directory state: directory
- name: Create user opt directory - name: Create user opt directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/opt" path: "{{ ansible_env.HOME }}/opt"
state: directory state: directory
- name: Create systemd user directory - name: Create systemd user directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.config/systemd/user" path: "{{ ansible_env.HOME }}/.config/systemd/user"
state: directory state: directory
- name: Create ~/.ssh directory - name: Create ~/.ssh directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.ssh" path: "{{ ansible_env.HOME }}/.ssh"
state: directory state: directory
mode: '0700' mode: '0700'
- name: Create ~/.config directory - name: Create ~/.config directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.config" path: "{{ ansible_env.HOME }}/.config"
state: directory state: directory
mode: '0700' mode: '0700'

View file

@ -1,25 +1,25 @@
--- ---
- name: Copy .gemrc - name: Copy .gemrc
copy: ansible.builtin.copy:
src: gemrc src: gemrc
dest: "{{ ansible_env.HOME }}/.gemrc" dest: "{{ ansible_env.HOME }}/.gemrc"
- name: Remove .hushlogin - name: Remove .hushlogin
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.hushlogin" path: "{{ ansible_env.HOME }}/.hushlogin"
state: absent state: absent
- name: Copy .tmux.conf - name: Copy .tmux.conf
copy: ansible.builtin.copy:
src: tmux.conf src: tmux.conf
dest: "{{ ansible_env.HOME }}/.tmux.conf" dest: "{{ ansible_env.HOME }}/.tmux.conf"
- name: Copy openpgp.asc - name: Copy openpgp.asc
copy: ansible.builtin.copy:
src: openpgp.asc src: openpgp.asc
dest: "{{ ansible_env.HOME }}/.config/openpgp.asc" dest: "{{ ansible_env.HOME }}/.config/openpgp.asc"
- name: Copy .dput.cf - name: Copy .dput.cf
copy: ansible.builtin.copy:
src: dput.cf src: dput.cf
dest: "{{ ansible_env.HOME }}/.dput.cf" dest: "{{ ansible_env.HOME }}/.dput.cf"
- name: Copy .mailcap - name: Copy .mailcap
copy: ansible.builtin.copy:
src: mailcap src: mailcap
dest: "{{ ansible_env.HOME }}/.mailcap" dest: "{{ ansible_env.HOME }}/.mailcap"

View file

@ -1,86 +1,86 @@
--- ---
- name: Git pull.rebase - name: Git pull.rebase
git_config: community.general.git_config:
name: pull.rebase name: pull.rebase
value: 'true' value: 'true'
scope: global scope: global
- name: Git push.default - name: Git push.default
git_config: community.general.git_config:
name: push.default name: push.default
value: simple value: simple
scope: global scope: global
- name: Git color.ui - name: Git color.ui
git_config: community.general.git_config:
name: color.ui name: color.ui
value: auto value: auto
scope: global scope: global
- name: Git credential.helper - name: Git credential.helper
git_config: community.general.git_config:
name: credential.helper name: credential.helper
value: store value: store
scope: global scope: global
- name: Git gui.encoding - name: Git gui.encoding
git_config: community.general.git_config:
name: gui.encoding name: gui.encoding
value: utf-8 value: utf-8
scope: global scope: global
- name: Git guitool.Rebase.cmd - name: Git guitool.Rebase.cmd
git_config: community.general.git_config:
name: guitool.Rebase.cmd name: guitool.Rebase.cmd
value: rebase value: rebase
scope: global scope: global
- name: Git user.name - name: Git user.name
git_config: community.general.git_config:
name: user.name name: user.name
value: Anthony Perkins value: Anthony Perkins
scope: global scope: global
- name: Git user.email - name: Git user.email
git_config: community.general.git_config:
name: user.email name: user.email
value: anthony@acperkins.com value: anthony@acperkins.com
scope: global scope: global
- name: Git alias.ci - name: Git alias.ci
git_config: community.general.git_config:
name: alias.ci name: alias.ci
value: commit value: commit
scope: global scope: global
- name: Git alias.co - name: Git alias.co
git_config: community.general.git_config:
name: alias.co name: alias.co
value: checkout value: checkout
scope: global scope: global
- name: Git alias.ff - name: Git alias.ff
git_config: community.general.git_config:
name: alias.ff name: alias.ff
value: merge --ff-only value: merge --ff-only
scope: global scope: global
- name: Git alias.graph - name: Git alias.graph
git_config: community.general.git_config:
name: alias.graph name: alias.graph
value: log --graph --oneline --all value: log --graph --oneline --all
scope: global scope: global
- name: Git alias.l1 - name: Git alias.l1
git_config: community.general.git_config:
name: alias.l1 name: alias.l1
value: log --pretty=oneline value: log --pretty=oneline
scope: global scope: global
- name: Git alias.last - name: Git alias.last
git_config: community.general.git_config:
name: alias.last name: alias.last
value: log -1 HEAD --pretty=fuller value: log -1 HEAD --pretty=fuller
scope: global scope: global
- name: Git alias.unstage - name: Git alias.unstage
git_config: community.general.git_config:
name: alias.unstage name: alias.unstage
value: reset HEAD -- value: reset HEAD --
scope: global scope: global
- name: Git alias.up - name: Git alias.up
git_config: community.general.git_config:
name: alias.up name: alias.up
value: pull --rebase value: pull --rebase
scope: global scope: global
- name: Git URL rewrite - name: Git URL rewrite
git_config: community.general.git_config:
name: url."https://code.acperkins.com/".insteadof name: url."https://code.acperkins.com/".insteadof
value: https://git.acperkins.com/ value: https://git.acperkins.com/
scope: global scope: global

View file

@ -1,21 +1,21 @@
--- ---
- name: Copy .bashrc - name: Copy .bashrc
copy: ansible.builtin.copy:
src: bashrc src: bashrc
dest: "{{ ansible_env.HOME }}/.bashrc" dest: "{{ ansible_env.HOME }}/.bashrc"
- name: Copy .bash_profile - name: Copy .bash_profile
copy: ansible.builtin.copy:
src: bash_profile src: bash_profile
dest: "{{ ansible_env.HOME }}/.bash_profile" dest: "{{ ansible_env.HOME }}/.bash_profile"
- name: Copy .profile - name: Copy .profile
copy: ansible.builtin.copy:
src: profile src: profile
dest: "{{ ansible_env.HOME }}/.profile" dest: "{{ ansible_env.HOME }}/.profile"
- name: Copy .shrc - name: Copy .shrc
copy: ansible.builtin.copy:
src: shrc src: shrc
dest: "{{ ansible_env.HOME }}/.shrc" dest: "{{ ansible_env.HOME }}/.shrc"
- name: Copy .zshrc - name: Copy .zshrc
copy: ansible.builtin.copy:
src: zshrc src: zshrc
dest: "{{ ansible_env.HOME }}/.zshrc" dest: "{{ ansible_env.HOME }}/.zshrc"

View file

@ -1,24 +1,24 @@
--- ---
- name: Add home rsa key to authorized_keys - name: Add home rsa key to authorized_keys
lineinfile: ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/.ssh/authorized_keys" 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" line: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUfTUp1m8MUCjj0Vu8E9sVGwvf4FWL4QcaZ6m8gK5+xGZl+w+yAcb1acH/96Y0DaP4ZNDassC5OlE6F1oJ+cIKtTykXBxqlChLRDCdX8JCt3sBaVmEcRJ0v8MMQrqWX2ajAW6fC/zNYJ4qbhTMGLiEUPbYu7gZKn0e+MEPBRrxdXzqVLTBq0RMelGx74UpZUwzwROq+VxLsFrumFZNFNJL+rWEK3XO5SsQkNp5QNYluIr8+WDbVU6V2thgJTcFpWWWYVg/al5iY5/bcnVSpzoab7Xxo98OYzpSrY0g+CqkLQkfRehOUMeEOGQYZxpUaXFhg2jE+Kf7W2gm3CeJWTzP home"
create: yes create: yes
mode: '0600' mode: '0600'
- name: Add work rsa key to authorized_keys - name: Add work rsa key to authorized_keys
lineinfile: ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/.ssh/authorized_keys" 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" line: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAjRPqXzNlrmPWGC6yRCnZszewblS6JcQeNBkHuNmWD9WoMFGLvjkl+NGiC01k9su4JMfz6vOvNG1A6J16+uhEz0+Q70Z/kCM91EqYK8iiGA+qfC2y5PMA10BtWInQ9OqPbanv38ZBB7+afOcEbGR3CC56rp/uibwdBo2RpVRjAjZfsC64tZ6Pt8C55rVvBeZwNtXtw9RIwKAJGmlBsZEdIKpTHIf2IDfPWX3OLahcNA5/6aNB65qQV7fqQXEgBSjJmMsdCD8Jy5O+f7rzC+kFxozB/36mV1pBgZhT/iTK9fFJip0vyFFjk4CPRRbrnnJUBod/aGfWAP876b/0DXviWQ== work"
create: yes create: yes
mode: '0600' mode: '0600'
- name: Add home ed25519 key to authorized_keys - name: Add home ed25519 key to authorized_keys
lineinfile: ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/.ssh/authorized_keys" path: "{{ ansible_env.HOME }}/.ssh/authorized_keys"
line: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKG63aHe1QmTPj4mWg0F/fAzcB78tBJglxyLI0AzOKvW acp-home" line: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKG63aHe1QmTPj4mWg0F/fAzcB78tBJglxyLI0AzOKvW acp-home"
create: yes create: yes
mode: '0600' mode: '0600'
- name: Add work ed25519 key to authorized_keys - name: Add work ed25519 key to authorized_keys
lineinfile: ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/.ssh/authorized_keys" path: "{{ ansible_env.HOME }}/.ssh/authorized_keys"
line: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMMMawkF2TJzmqHewciwMRhOOTE9W1+vXq1yzV13KWUg acp-work" line: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMMMawkF2TJzmqHewciwMRhOOTE9W1+vXq1yzV13KWUg acp-work"
create: yes create: yes

View file

@ -1,5 +1,5 @@
--- ---
- name: Clone vim settings - name: Clone vim settings
git: ansible.builtin.git:
repo: https://code.acperkins.com/acp/vimfiles.git repo: https://code.acperkins.com/acp/vimfiles.git
dest: "{{ ansible_env.HOME }}/.vim" dest: "{{ ansible_env.HOME }}/.vim"

View file

@ -1,17 +1,17 @@
--- ---
- name: Create user applications directory - name: Create user applications directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.local/share/applications" path: "{{ ansible_env.HOME }}/.local/share/applications"
state: directory state: directory
- name: Create user autostart directory - name: Create user autostart directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.config/autostart" path: "{{ ansible_env.HOME }}/.config/autostart"
state: directory state: directory
- name: Create ~/.fvwm directory - name: Create ~/.fvwm directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.fvwm" path: "{{ ansible_env.HOME }}/.fvwm"
state: directory state: directory
- name: Create ~/.local/share/fonts directory - name: Create ~/.local/share/fonts directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.local/share/fonts" path: "{{ ansible_env.HOME }}/.local/share/fonts"
state: directory state: directory

View file

@ -1,46 +1,46 @@
--- ---
- name: Copy .Xresources - name: Copy .Xresources
copy: ansible.builtin.copy:
src: Xresources src: Xresources
dest: "{{ ansible_env.HOME }}/.Xresources" dest: "{{ ansible_env.HOME }}/.Xresources"
- name: Copy .fonts.conf - name: Copy .fonts.conf
copy: ansible.builtin.copy:
src: fonts.conf src: fonts.conf
dest: "{{ ansible_env.HOME }}/.fonts.conf" dest: "{{ ansible_env.HOME }}/.fonts.conf"
- name: Create stalonetrayrc - name: Create stalonetrayrc
copy: ansible.builtin.copy:
src: stalonetrayrc src: stalonetrayrc
dest: "{{ ansible_env.HOME }}/.stalonetrayrc" dest: "{{ ansible_env.HOME }}/.stalonetrayrc"
- name: Create fvwm config file - name: Create fvwm config file
copy: ansible.builtin.copy:
src: fvwmrc src: fvwmrc
dest: "{{ ansible_env.HOME }}/.fvwm/config" dest: "{{ ansible_env.HOME }}/.fvwm/config"
- name: Create NetBSD xsession file - name: Create NetBSD xsession file
copy: ansible.builtin.copy:
src: xsession-netbsd src: xsession-netbsd
dest: "{{ ansible_env.HOME }}/.xsession" dest: "{{ ansible_env.HOME }}/.xsession"
when: ansible_system == "NetBSD" when: ansible_system == "NetBSD"
- name: Create xinitrc symlink - name: Create xinitrc symlink
file: ansible.builtin.file:
src: ".xsession" src: ".xsession"
dest: "{{ ansible_env.HOME }}/.xinitrc" dest: "{{ ansible_env.HOME }}/.xinitrc"
state: link state: link
when: ansible_system == "NetBSD" when: ansible_system == "NetBSD"
- name: Load ~/.Xresources - name: Load ~/.Xresources
copy: ansible.builtin.copy:
src: "xrdb.desktop" src: "xrdb.desktop"
dest: "{{ ansible_env.HOME }}/.config/autostart/xrdb.desktop" dest: "{{ ansible_env.HOME }}/.config/autostart/xrdb.desktop"
when: ansible_distribution == "Fedora" or ansible_distribution == "Debian" when: ansible_distribution == "Fedora" or ansible_distribution == "Debian"
- name: Add to-do list launcher - name: Add to-do list launcher
template: ansible.builtin.template:
src: todo.desktop src: todo.desktop
dest: "{{ ansible_env.HOME }}/.local/share/applications/todo.desktop" dest: "{{ ansible_env.HOME }}/.local/share/applications/todo.desktop"
- name: Copy .xbindkeysrc - name: Copy .xbindkeysrc
copy: ansible.builtin.copy:
src: "xbindkeysrc" src: "xbindkeysrc"
dest: "{{ ansible_env.HOME }}/.xbindkeysrc" dest: "{{ ansible_env.HOME }}/.xbindkeysrc"
- name: Add custom Chromium launcher - name: Add custom Chromium launcher
template: ansible.builtin.template:
src: chromium-browser.desktop src: chromium-browser.desktop
dest: "{{ ansible_env.HOME }}/.local/share/applications/chromium-browser.desktop" dest: "{{ ansible_env.HOME }}/.local/share/applications/chromium-browser.desktop"
vars: vars:

View file

@ -1,41 +1,41 @@
--- ---
- name: Detect Emacs binary - name: Detect Emacs binary
stat: ansible.builtin.stat:
path: "{{ prefix }}/bin/emacs" path: "{{ prefix }}/bin/emacs"
vars: vars:
prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}" prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}"
register: emacs_binary register: emacs_binary
- name: Remove ~/.emacs file - name: Remove ~/.emacs file
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.emacs" path: "{{ ansible_env.HOME }}/.emacs"
state: absent state: absent
- name: Clone Emacs settings - name: Clone Emacs settings
git: ansible.builtin.git:
repo: https://code.acperkins.com/acp/emacs.d.git repo: https://code.acperkins.com/acp/emacs.d.git
dest: "{{ ansible_env.HOME }}/.emacs.d" dest: "{{ ansible_env.HOME }}/.emacs.d"
- name: Install NotoSansMono-Regular font - name: Install NotoSansMono-Regular font
copy: ansible.builtin.copy:
src: NotoSansMono-Regular.ttf src: NotoSansMono-Regular.ttf
dest: "{{ ansible_env.HOME }}/.local/share/fonts/NotoSansMono-Regular.ttf" dest: "{{ ansible_env.HOME }}/.local/share/fonts/NotoSansMono-Regular.ttf"
- name: Install NotoSansMono-Bold font - name: Install NotoSansMono-Bold font
copy: ansible.builtin.copy:
src: NotoSansMono-Bold.ttf src: NotoSansMono-Bold.ttf
dest: "{{ ansible_env.HOME }}/.local/share/fonts/NotoSansMono-Bold.ttf" dest: "{{ ansible_env.HOME }}/.local/share/fonts/NotoSansMono-Bold.ttf"
- name: Create Emacs user service (Linux) - name: Create Emacs user service (Linux)
template: ansible.builtin.template:
src: emacs.service src: emacs.service
dest: "{{ ansible_env.HOME }}/.config/systemd/user/emacs.service" dest: "{{ ansible_env.HOME }}/.config/systemd/user/emacs.service"
vars: vars:
prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}" 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 when: ansible_system == 'Linux' and emacs_binary.stat.exists == True
- name: Add Emacs server to autostart (FreeBSD) - name: Add Emacs server to autostart (FreeBSD)
copy: ansible.builtin.copy:
src: '{{ ansible_env.HOME }}/.emacs.d/emacs-server.desktop' src: '{{ ansible_env.HOME }}/.emacs.d/emacs-server.desktop'
dest: '{{ ansible_env.HOME }}/.config/autostart' dest: '{{ ansible_env.HOME }}/.config/autostart'
remote_src: yes remote_src: yes
when: ansible_system == 'FreeBSD' and emacs_binary.stat.exists == True when: ansible_system == 'FreeBSD' and emacs_binary.stat.exists == True
- name: Start Emacs user service - name: Start Emacs user service
systemd: ansible.builtin.systemd:
name: emacs.service name: emacs.service
scope: user scope: user
daemon_reload: yes daemon_reload: yes
@ -43,7 +43,7 @@
state: started state: started
when: ansible_system == 'Linux' and emacs_binary.stat.exists == True when: ansible_system == 'Linux' and emacs_binary.stat.exists == True
- name: Create Emacs client launcher - name: Create Emacs client launcher
copy: ansible.builtin.copy:
src: "{{ ansible_env.HOME }}/.emacs.d/emacs-client.desktop" src: "{{ ansible_env.HOME }}/.emacs.d/emacs-client.desktop"
dest: "{{ ansible_env.HOME }}/.local/share/applications/emacs.desktop" dest: "{{ ansible_env.HOME }}/.local/share/applications/emacs.desktop"
remote_src: yes remote_src: yes

View file

@ -1,10 +1,10 @@
--- ---
- name: Check for profiles.ini - name: Check for profiles.ini
stat: ansible.builtin.stat:
path: "{{ ansible_env.HOME }}/.mozilla/firefox/profiles.ini" path: "{{ ansible_env.HOME }}/.mozilla/firefox/profiles.ini"
register: profile_ini register: profile_ini
- name: Copy Firefox preferences to Profile0 - name: Copy Firefox preferences to Profile0
copy: ansible.builtin.copy:
src: user.js src: user.js
dest: "{{ ansible_env.HOME }}/.mozilla/firefox/{{ lookup('ini', 'Path section=Profile0 file={{ ansible_env.HOME }}/.mozilla/firefox/profiles.ini') }}/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 when: profile_ini.stat.exists

View file

@ -1,17 +1,17 @@
--- ---
- name: Create MATE layouts directory - name: Create MATE layouts directory
file: ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.local/share/mate-panel/layouts" path: "{{ ansible_env.HOME }}/.local/share/mate-panel/layouts"
state: directory state: directory
- name: Copy MATE panel layout - name: Copy MATE panel layout
template: ansible.builtin.template:
src: mate-acp.layout src: mate-acp.layout
dest: "{{ ansible_env.HOME }}/.local/share/mate-panel/layouts/acp.layout" dest: "{{ ansible_env.HOME }}/.local/share/mate-panel/layouts/acp.layout"
vars: vars:
prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}" prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}"
esr: "{{ '-esr' if ansible_distribution == 'Debian' else '' }}" esr: "{{ '-esr' if ansible_distribution == 'Debian' else '' }}"
- name: Copy MATE Clock reset script - name: Copy MATE Clock reset script
copy: ansible.builtin.copy:
src: reset-mate-clock.sh src: reset-mate-clock.sh
dest: "{{ ansible_env.HOME }}/bin/reset-mate-clock" dest: "{{ ansible_env.HOME }}/bin/reset-mate-clock"
mode: '0755' mode: '0755'

View file

@ -1,10 +1,10 @@
--- ---
- name: Check for Sublime Text directory - name: Check for Sublime Text directory
stat: ansible.builtin.stat:
path: "{{ ansible_env.HOME }}/.config/sublime-text-3/Packages/User" path: "{{ ansible_env.HOME }}/.config/sublime-text-3/Packages/User"
register: sublime register: sublime
- name: Copy Sublime Text preferences - name: Copy Sublime Text preferences
copy: ansible.builtin.copy:
src: Preferences.sublime-settings src: Preferences.sublime-settings
dest: "{{ ansible_env.HOME }}/.config/sublime-text-3/Packages/User/Preferences.sublime-settings" dest: "{{ ansible_env.HOME }}/.config/sublime-text-3/Packages/User/Preferences.sublime-settings"
when: sublime.stat.exists when: sublime.stat.exists

View file

@ -1,13 +1,13 @@
--- ---
- name: Disable getty on /dev/console - name: Disable getty on /dev/console
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ttys path: /etc/ttys
regexp: ^console\s+ regexp: ^console\s+
line: 'console "/usr/libexec/getty Pc" vt100 off secure' line: 'console "/usr/libexec/getty Pc" vt100 off secure'
- name: Enable getty on /dev/ttyE0 - name: Enable getty on /dev/ttyE0
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ttys path: /etc/ttys
regexp: ^ttyE0\s+ regexp: ^ttyE0\s+
line: 'ttyE0 "/usr/libexec/getty Pc" wsvt25 on secure' line: 'ttyE0 "/usr/libexec/getty Pc" wsvt25 on secure'

View file

@ -1,21 +1,21 @@
--- ---
- name: Configure pkg to ignore OSABI - name: Configure pkg to ignore OSABI
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/pkg_install.conf path: /etc/pkg_install.conf
regexp: '^CHECK_OSABI=' regexp: '^CHECK_OSABI='
line: 'CHECK_OSABI=no' line: 'CHECK_OSABI=no'
create: yes create: yes
- name: Configure PKG_PATH - name: Configure PKG_PATH
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/pkg_install.conf path: /etc/pkg_install.conf
regexp: '^PKG_PATH=' regexp: '^PKG_PATH='
line: 'PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/{{ ansible_machine }}/{{ ansible_distribution_release }}/All' line: 'PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/{{ ansible_machine }}/{{ ansible_distribution_release }}/All'
create: yes create: yes
- name: Install CLI packages - name: Install CLI packages
become: true become: true
pkgin: community.general.pkgin:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
vars: vars:

View file

@ -1,7 +1,7 @@
--- ---
- name: Install GUI packages - name: Install GUI packages
become: true become: true
pkgin: community.general.pkgin:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
vars: vars:

View file

@ -1,7 +1,7 @@
--- ---
- name: Enable wheel group to use sudo - name: Enable wheel group to use sudo
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /usr/pkg/etc/sudoers.d/wheel path: /usr/pkg/etc/sudoers.d/wheel
regexp: 'wheel' regexp: 'wheel'
line: '%wheel ALL=(ALL) ALL' line: '%wheel ALL=(ALL) ALL'

View file

@ -1,19 +1,19 @@
--- ---
- name: Enable xdm - name: Enable xdm
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/rc.conf path: /etc/rc.conf
regexp: ^xdm=.* regexp: ^xdm=.*
line: xdm=YES line: xdm=YES
- name: Copy dbus service - name: Copy dbus service
become: true become: true
copy: ansible.builtin.copy:
src: /usr/pkg/share/examples/rc.d/dbus src: /usr/pkg/share/examples/rc.d/dbus
dest: /etc/rc.d/dbus dest: /etc/rc.d/dbus
remote_src: yes remote_src: yes
- name: Enable dbus - name: Enable dbus
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/rc.conf path: /etc/rc.conf
regexp: ^dbus=.* regexp: ^dbus=.*
line: dbus=YES line: dbus=YES

View file

@ -1,13 +1,13 @@
--- ---
- name: Blacklist pcspkr module - name: Blacklist pcspkr module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist pcspkr line: blacklist pcspkr
create: yes create: yes
- name: Blacklist dvb_usb_rtl28xxu module - name: Blacklist dvb_usb_rtl28xxu module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist dvb_usb_rtl28xxu line: blacklist dvb_usb_rtl28xxu
create: yes create: yes

View file

@ -2,7 +2,7 @@
# The zypper module requires python-xml on openSUSE. # The zypper module requires python-xml on openSUSE.
- name: Install CLI patterns - name: Install CLI patterns
become: true become: true
zypper: community.general.zypper:
name: '{{ patterns }}' name: '{{ patterns }}'
state: present state: present
type: pattern type: pattern
@ -12,7 +12,7 @@
- devel_rpm_build - devel_rpm_build
- name: Install CLI packages - name: Install CLI packages
become: true become: true
zypper: community.general.zypper:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
type: package type: package

View file

@ -2,7 +2,7 @@
# The zypper module requires python-xml on openSUSE. # The zypper module requires python-xml on openSUSE.
- name: Install GUI packages - name: Install GUI packages
become: true become: true
zypper: community.general.zypper:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
type: package type: package

View file

@ -1,15 +1,15 @@
--- ---
- name: Install solokeys udev rule - name: Install solokeys udev rule
become: true become: true
copy: ansible.builtin.copy:
src: 70-solokeys-access.rules src: 70-solokeys-access.rules
dest: /etc/udev/rules.d/70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules
register: solokeys_copy register: solokeys_copy
- name: Reload udevadm rules - name: Reload udevadm rules
become: true become: true
command: udevadm control --reload-rules ansible.builtin.command: udevadm control --reload-rules
when: solokeys_copy.changed when: solokeys_copy.changed
- name: Trigger udevadm - name: Trigger udevadm
become: true become: true
command: udevadm trigger ansible.builtin.command: udevadm trigger
when: solokeys_copy.changed when: solokeys_copy.changed

View file

@ -1,26 +1,26 @@
--- ---
- name: Disable SSH passwords - name: Disable SSH passwords
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: '^#?\w*PasswordAuthentication (yes|no)' regexp: '^#?\w*PasswordAuthentication (yes|no)'
line: 'PasswordAuthentication no' line: 'PasswordAuthentication no'
register: changed_ssh_config register: changed_ssh_config
- name: Enable SSH - name: Enable SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
enabled: yes enabled: yes
state: started state: started
- name: Restart SSH - name: Restart SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
state: restarted state: restarted
when: changed_ssh_config.changed == true when: changed_ssh_config.changed == true
- name: Allow SSH through firewall - name: Allow SSH through firewall
become: true become: true
firewalld: ansible.posix.firewalld:
service: ssh service: ssh
permanent: yes permanent: yes
state: enabled state: enabled

View file

@ -1,13 +1,13 @@
--- ---
- name: Blacklist pcspkr module - name: Blacklist pcspkr module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist pcspkr line: blacklist pcspkr
create: yes create: yes
- name: Blacklist dvb_usb_rtl28xxu module - name: Blacklist dvb_usb_rtl28xxu module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist dvb_usb_rtl28xxu line: blacklist dvb_usb_rtl28xxu
create: yes create: yes

View file

@ -2,7 +2,7 @@
# The zypper module requires python-xml on openSUSE. # The zypper module requires python-xml on openSUSE.
- name: Install CLI patterns - name: Install CLI patterns
become: true become: true
zypper: community.general.zypper:
name: '{{ patterns }}' name: '{{ patterns }}'
state: present state: present
type: pattern type: pattern
@ -12,7 +12,7 @@
- devel_rpm_build - devel_rpm_build
- name: Install CLI packages - name: Install CLI packages
become: true become: true
zypper: community.general.zypper:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
type: package type: package

View file

@ -2,7 +2,7 @@
# The zypper module requires python-xml on openSUSE. # The zypper module requires python-xml on openSUSE.
- name: Install GUI packages - name: Install GUI packages
become: true become: true
zypper: community.general.zypper:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
type: package type: package

View file

@ -1,15 +1,15 @@
--- ---
- name: Install solokeys udev rule - name: Install solokeys udev rule
become: true become: true
copy: ansible.builtin.copy:
src: 70-solokeys-access.rules src: 70-solokeys-access.rules
dest: /etc/udev/rules.d/70-solokeys-access.rules dest: /etc/udev/rules.d/70-solokeys-access.rules
register: solokeys_copy register: solokeys_copy
- name: Reload udevadm rules - name: Reload udevadm rules
become: true become: true
command: udevadm control --reload-rules ansible.builtin.command: udevadm control --reload-rules
when: solokeys_copy.changed when: solokeys_copy.changed
- name: Trigger udevadm - name: Trigger udevadm
become: true become: true
command: udevadm trigger ansible.builtin.command: udevadm trigger
when: solokeys_copy.changed when: solokeys_copy.changed

View file

@ -1,26 +1,26 @@
--- ---
- name: Disable SSH passwords - name: Disable SSH passwords
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: '^#?\w*PasswordAuthentication (yes|no)' regexp: '^#?\w*PasswordAuthentication (yes|no)'
line: 'PasswordAuthentication no' line: 'PasswordAuthentication no'
register: changed_ssh_config register: changed_ssh_config
- name: Enable SSH - name: Enable SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
enabled: yes enabled: yes
state: started state: started
- name: Restart SSH - name: Restart SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: sshd.service name: sshd.service
state: restarted state: restarted
when: changed_ssh_config.changed == true when: changed_ssh_config.changed == true
- name: Allow SSH through firewall - name: Allow SSH through firewall
become: true become: true
firewalld: ansible.posix.firewalld:
service: ssh service: ssh
permanent: yes permanent: yes
state: enabled state: enabled

View file

@ -1,7 +1,7 @@
--- ---
- name: Install build environment packages - name: Install build environment packages
become: true become: true
apt: ansible.builtin.apt:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
force_apt_get: yes force_apt_get: yes
@ -16,12 +16,12 @@
- pbuilder - pbuilder
- name: Copy pbuilderrc - name: Copy pbuilderrc
become: true become: true
copy: ansible.builtin.copy:
src: pbuilderrc src: pbuilderrc
dest: /etc/pbuilderrc dest: /etc/pbuilderrc
- name: Set permissions on /var/cache/pbuilder/result - name: Set permissions on /var/cache/pbuilder/result
become: true become: true
file: ansible.builtin.file:
path: /var/cache/pbuilder/result path: /var/cache/pbuilder/result
state: directory state: directory
owner: root owner: root

View file

@ -1,13 +1,13 @@
--- ---
- name: Blacklist pcspkr module - name: Blacklist pcspkr module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist pcspkr line: blacklist pcspkr
create: yes create: yes
- name: Blacklist dvb_usb_rtl28xxu module - name: Blacklist dvb_usb_rtl28xxu module
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/modprobe.d/blacklist.conf path: /etc/modprobe.d/blacklist.conf
line: blacklist dvb_usb_rtl28xxu line: blacklist dvb_usb_rtl28xxu
create: yes create: yes

View file

@ -1,7 +1,7 @@
--- ---
- name: Install CLI packages - name: Install CLI packages
become: true become: true
apt: ansible.builtin.apt:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
force_apt_get: yes force_apt_get: yes
@ -37,6 +37,6 @@
- zsh - zsh
- name: Load /etc/profile in zsh - name: Load /etc/profile in zsh
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/zsh/zprofile path: /etc/zsh/zprofile
line: emulate sh -c 'source /etc/profile' line: emulate sh -c 'source /etc/profile'

View file

@ -1,7 +1,7 @@
--- ---
- name: Install GUI packages - name: Install GUI packages
become: true become: true
apt: ansible.builtin.apt:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
force_apt_get: yes force_apt_get: yes

View file

@ -1,20 +1,20 @@
--- ---
- name: Disable SSH passwords - name: Disable SSH passwords
become: true become: true
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: '^#?\w*PasswordAuthentication (yes|no)' regexp: '^#?\w*PasswordAuthentication (yes|no)'
line: 'PasswordAuthentication no' line: 'PasswordAuthentication no'
register: changed_ssh_config register: changed_ssh_config
- name: Enable SSH - name: Enable SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: ssh.service name: ssh.service
enabled: yes enabled: yes
state: started state: started
- name: Restart SSH - name: Restart SSH
become: true become: true
systemd: ansible.builtin.systemd:
name: ssh.service name: ssh.service
state: restarted state: restarted
when: changed_ssh_config.changed == true when: changed_ssh_config.changed == true