Skip to content

Commit

Permalink
Fixed Ansible Lint warnings (#120)
Browse files Browse the repository at this point in the history
In preparation for Molecule upgrade.
  • Loading branch information
freemanjp authored Sep 1, 2023
1 parent 556ee8b commit faca102
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 49 deletions.
3 changes: 2 additions & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ rules:
new-lines:
type: unix
trailing-spaces: disable
truthy: disable
truthy:
allowed-values: ['true', 'false', 'on']
12 changes: 6 additions & 6 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
- name: 'xdesktop: apply glib schemas changes'
become: yes
command: '/usr/bin/glib-compile-schemas {{ xdesktop_glib_schemas_directory }}'
- name: 'X-Desktop: apply glib schemas changes'
become: true
ansible.builtin.command: '/usr/bin/glib-compile-schemas {{ xdesktop_glib_schemas_directory }}'

- name: update font-cache
become: yes
command: fc-cache -fv
- name: Update font-cache
become: true
ansible.builtin.command: fc-cache -fv
8 changes: 4 additions & 4 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
hosts: all

pre_tasks:
- name: update apt cache
apt:
update_cache: yes
changed_when: no
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
changed_when: false

roles:
- role: ansible-role-xdesktop
Expand Down
6 changes: 3 additions & 3 deletions tasks/accessories.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: install accessory apps and fonts
become: yes
apt:
- name: Install accessory apps and fonts
become: true
ansible.builtin.apt:
name:
# Terminal emulator
- terminator
Expand Down
28 changes: 14 additions & 14 deletions tasks/gnome-desktop-configure.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
---
- name: write xorg screensaver config
become: yes
template:
- name: Write xorg screensaver config
become: true
ansible.builtin.template:
src: screensaver.conf.j2
dest: '/usr/share/X11/xorg.conf.d/60-ansible-screensaver.conf'
owner: root
group: root
mode: 'u=rw,go=r'

- name: write gnome screensaver config
become: yes
template:
- name: Write gnome screensaver config
become: true
ansible.builtin.template:
src: screensaver.gschema.override.j2
dest: '{{ xdesktop_glib_schemas_directory }}/20_ansible_screensaver.gschema.override'
owner: root
group: root
mode: 'u=rw,go=r'
register: screensaver_config

- name: write gnome lock screen config
become: yes
template:
- name: Write gnome lock screen config
become: true
ansible.builtin.template:
src: lockscreen.gschema.override.j2
dest: '{{ xdesktop_glib_schemas_directory }}/20_ansible_lockscreen.gschema.override'
owner: root
group: root
mode: 'u=rw,go=r'
register: lockscreen_config

- name: assert dock position valid
- name: Assert dock position valid
assert:
that:
- "xdesktop_dock_position in ('LEFT', 'RIGHT', 'BOTTOM')"

- name: write gnome dock config
become: yes
template:
- name: Write gnome dock config
become: true
ansible.builtin.template:
src: dock.gschema.override.j2
dest: '{{ xdesktop_glib_schemas_directory }}/20_ansible_dock.gschema.override'
owner: root
group: root
mode: 'u=rw,go=r'
notify: 'xdesktop: apply glib schemas changes'
notify: 'X-Desktop: apply glib schemas changes'
8 changes: 4 additions & 4 deletions tasks/gnome-desktop-install.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: install ubuntu-desktop
become: yes
apt:
- name: Install ubuntu-desktop
become: true
ansible.builtin.apt:
name:
- ubuntu-desktop
# Archive manager
Expand All @@ -15,4 +15,4 @@
- yaru-theme-icon
- yaru-theme-unity
state: present
install_recommends: no
install_recommends: false
34 changes: 17 additions & 17 deletions tasks/nerd-font.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
---
- name: create download directory
file:
- name: Create download directory
ansible.builtin.file:
state: directory
mode: 'u=rwx,go=rx'
dest: '{{ xdesktop_download_dir }}'

- name: download Nerd Font
get_url:
- name: Download Nerd Font
ansible.builtin.get_url:
url: '{{ xdesktop_nerd_font_redis_url }}'
checksum: 'sha256:{{ xdesktop_nerd_font_redis_sha256sum }}'
dest: '{{ xdesktop_download_dir }}/{{ xdesktop_nerd_font_local_filename }}'
force: no
force: false
mode: 'u=rw,go=r'

- name: create font directory
become: yes
file:
- name: Create font directory
become: true
ansible.builtin.file:
state: directory
mode: 'u=rwx,g=rwxs,o=rx'
dest: '{{ xdesktop_font_install_directory }}'

- name: install Nerd Font
become: yes
unarchive:
- name: Install Nerd Font
become: true
ansible.builtin.unarchive:
src: '{{ xdesktop_download_dir }}/{{ xdesktop_nerd_font_local_filename }}'
remote_src: yes
remote_src: true
dest: '{{ xdesktop_font_install_directory }}'
include: '{{ xdesktop_nerd_font_install_files }}'
mode: 'ug=rw,o=r'
owner: root
group: staff
notify: update font-cache
notify: Update font-cache

- name: write monospace font config
become: yes
template:
- name: Write monospace font config
become: true
ansible.builtin.template:
src: monospace_font.gschema.override.j2
dest: '{{ xdesktop_glib_schemas_directory }}/20_ansible_monospace_font.gschema.override'
owner: root
group: root
mode: 'u=rw,go=r'
notify: 'xdesktop: apply glib schemas changes'
notify: 'X-Desktop: apply glib schemas changes'

0 comments on commit faca102

Please sign in to comment.