Skip to content

Commit

Permalink
Fix ansible-lint rule violations
Browse files Browse the repository at this point in the history
  • Loading branch information
ansible-code-bot-stage[bot] committed Jun 19, 2024
1 parent 7d1546f commit e271f5c
Show file tree
Hide file tree
Showing 20 changed files with 65 additions and 58 deletions.
5 changes: 2 additions & 3 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
### REQUIRED
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
Expand All @@ -8,7 +9,7 @@ namespace: wzzrd
name: atuin

# The version of the collection. Must be compatible with semantic versioning
version: "2.1.1"
version: 2.1.1

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand All @@ -18,7 +19,6 @@ readme: README.md
authors:
- Maxim Burgerhout <[email protected]>


### OPTIONAL but strongly recommended
# A short summary description of the collection
description: Install and manage atuin on your systems
Expand All @@ -37,7 +37,6 @@ tags:
- tools

dependencies: {}

repository: https://github.com/wzzrd/ansible-collection-atuin

documentation: https://github.com/wzzrd/ansible-collection-atuin
Expand Down
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Collections must specify a minimum required ansible version to upload
# to galaxy
requires_ansible: '>=2.15.0'
requires_ansible: ">=2.15.0"

# Content that Ansible needs to load from another location or that has
# been deprecated/removed
Expand Down
34 changes: 17 additions & 17 deletions roles/atuin_client/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ atuin_client_bin_dir: /usr/local/bin
atuin_client_libc_variant: gnu

## where to store your database, default is your system data directory
atuin_client_db_path: "~/.local/share/atuin/history.db"
atuin_client_db_path: ~/.local/share/atuin/history.db

## where to store your encryption key, default is your system data directory
atuin_client_key_path: "~/.local/share/atuin/key"
atuin_client_key_path: ~/.local/share/atuin/key

## where to store your auth session token, default is your system data directory
atuin_client_session_path: "~/.local/share/atuin/session"
atuin_client_session_path: ~/.local/share/atuin/session

## date format used, either "us" or "uk"
atuin_client_dialect: "uk"
atuin_client_dialect: uk

## default timezone to use when displaying time
## either "l", "local" to use the system's current local timezone, or an offset
## from UTC in the format of "<+|->H[H][:M[M][:S[S]]]"
## for example: "+9", "-05", "+03:30", "-01:23:45", etc.
atuin_client_timezone: "local"
atuin_client_timezone: local

## enable or disable automatic sync
atuin_client_auto_sync: true
Expand All @@ -32,20 +32,20 @@ atuin_client_auto_sync: true
atuin_client_update_check: true

## address of the sync server
atuin_client_sync_address: "https://api.atuin.sh"
atuin_client_sync_address: https://api.atuin.sh

## how often to sync history. note that this is only triggered when a command
## is ran, so sync intervals may well be longer
## set it to 0 to sync after every command
atuin_client_sync_frequency: "10m"
atuin_client_sync_frequency: 10m

## which search mode to use
## possible values: prefix, fulltext, fuzzy, skim
atuin_client_search_mode: "fuzzy"
atuin_client_search_mode: fuzzy

## which filter mode to use
## possible values: global, host, session, directory
atuin_client_filter_mode: "global"
atuin_client_filter_mode: global

## With workspace filtering enabled, Atuin will filter for commands executed
## in any directory within a git repository tree (default: false)
Expand All @@ -54,16 +54,16 @@ atuin_client_workspaces: false
## which filter mode to use when atuin is invoked from a shell up-key binding
## the accepted values are identical to those of "filter_mode"
## leave unspecified to use same mode set in "filter_mode"
atuin_client_filter_mode_shell_up_key_binding: "global"
atuin_client_filter_mode_shell_up_key_binding: global

## which search mode to use when atuin is invoked from a shell up-key binding
## the accepted values are identical to those of "search_mode"
## leave unspecified to use same mode set in "search_mode"
atuin_client_search_mode_shell_up_key_binding: "fuzzy"
atuin_client_search_mode_shell_up_key_binding: fuzzy

## which style to use
## possible values: auto, full, compact
atuin_client_style: "auto"
atuin_client_style: auto

## the maximum number of lines the interface should take up
## set it to 0 to always go full screen
Expand All @@ -78,13 +78,13 @@ atuin_client_show_preview: false

## what to do when the escape key is pressed when searching
## possible values: return-original, return-query
atuin_client_exit_mode: "return-original"
atuin_client_exit_mode: return-original

## possible values: emacs, subl
atuin_client_word_jump_mode: "emacs"
atuin_client_word_jump_mode: emacs

## characters that count as a part of a word
atuin_client_word_chars: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
atuin_client_word_chars: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

## number of context lines to show when scrolling by pages
atuin_client_scroll_context_lines: 1
Expand Down Expand Up @@ -145,7 +145,7 @@ atuin_client_enter_accept: true
## keybinding is defined. If this is set to "emacs", "vim-insert", or
## "vim-normal", the startup keymap mode in the Atuin search is forced to be
## the specified one.
atuin_client_keymap_mode: "auto"
atuin_client_keymap_mode: auto

## Cursor style in each keymap mode. If specified, the cursor style is changed
## in entering the cursor shape. Available values are "default" and
Expand Down Expand Up @@ -176,4 +176,4 @@ atuin_client_common_subcommands: |
]
# Set commands that should be totally stripped and ignored from stats
atuin_client_common_prefix: ["sudo"]
atuin_client_common_prefix: [sudo]
1 change: 1 addition & 0 deletions roles/atuin_client/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
galaxy_info:
author: Maxim Burgerhout
description: Role to deploy the atuin shell history tool
Expand Down
3 changes: 2 additions & 1 deletion roles/atuin_client/molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Converge
hosts: all
# We disable gather facts because it would fail due to our container not
Expand All @@ -9,7 +10,7 @@
- name: Gather required subset of facts
ansible.builtin.setup:
gather_subset:
- '!all'
- "!all"

roles:
- role: atuin_client
Expand Down
8 changes: 4 additions & 4 deletions roles/atuin_client/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
- name: ubi9
image: registry.access.redhat.com/ubi9/ubi-init:latest
Expand All @@ -19,15 +19,15 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
provisioner:
name: ansible
inventory:
host_vars:
ubi8:
atuin_client_libc_variant: "musl"
atuin_client_libc_variant: musl
ubi9:
atuin_client_libc_variant: "gnu"
atuin_client_libc_variant: gnu
verifier:
name: ansible
1 change: 1 addition & 0 deletions roles/atuin_client/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Prepare containers for molecule tests
hosts: all
gather_facts: false
Expand Down
1 change: 1 addition & 0 deletions roles/atuin_client/molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Verify
hosts: all
# We disable gather facts because it would fail due to our container not
Expand Down
18 changes: 8 additions & 10 deletions roles/atuin_client/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,14 @@

- name: Download and install new binary, if needed, for old atuin
when:
- (detected_version is not defined) or
(atuin_client_version != detected_version)
- (detected_version is not defined) or (atuin_client_version != detected_version)
- atuin_client_version is version('18.3.0', '<')
tags:
- version
block:
- name: Formulate artifact name
ansible.builtin.set_fact:
atuin_client_artifact: atuin-v{{ atuin_client_version }}-{{ ansible_architecture }}-unknown-linux-{{ atuin_client_libc_variant }}.tar.gz # noqa yaml[line-length]
atuin_client_artifact: atuin-v{{ atuin_client_version }}-{{ ansible_architecture }}-unknown-linux-{{ atuin_client_libc_variant }}.tar.gz # noqa yaml[line-length]

- name: Show artifact name
ansible.builtin.debug:
Expand All @@ -57,8 +56,8 @@
ansible.builtin.unarchive:
src: https://github.com/atuinsh/atuin/releases/download/v{{ atuin_client_version }}/{{ atuin_client_artifact }} # noqa yaml[line-length].
remote_src: true
dest: "/tmp"
include: "atuin-v{{ atuin_client_version }}-{{ ansible_architecture }}-unknown-linux-{{ atuin_client_libc_variant }}/atuin" # noqa yaml[line-length]
dest: /tmp
include: atuin-v{{ atuin_client_version }}-{{ ansible_architecture }}-unknown-linux-{{ atuin_client_libc_variant }}/atuin # noqa yaml[line-length]
owner: root
group: root
mode: "0755"
Expand All @@ -82,15 +81,14 @@

- name: Download and install new binary, if needed, for new atuin
when:
- (detected_version is not defined) or
(atuin_client_version != detected_version)
- (detected_version is not defined) or (atuin_client_version != detected_version)
- atuin_client_version is version('18.3.0', '>=')
tags:
- version
block:
- name: Formulate artifact name
ansible.builtin.set_fact:
atuin_client_artifact: atuin-{{ ansible_architecture }}-unknown-linux-{{ atuin_client_libc_variant }}.tar.gz # noqa yaml[line-length]
atuin_client_artifact: atuin-{{ ansible_architecture }}-unknown-linux-{{ atuin_client_libc_variant }}.tar.gz # noqa yaml[line-length]

- name: Show artifact name
ansible.builtin.debug:
Expand All @@ -103,8 +101,8 @@
ansible.builtin.unarchive:
src: https://github.com/atuinsh/atuin/releases/download/v{{ atuin_client_version }}/{{ atuin_client_artifact }} # noqa yaml[line-length].
remote_src: true
dest: "/tmp"
include: "atuin-{{ ansible_architecture }}-unknown-linux-{{ atuin_client_libc_variant }}/atuin" # noqa yaml[line-length]
dest: /tmp
include: atuin-{{ ansible_architecture }}-unknown-linux-{{ atuin_client_libc_variant }}/atuin # noqa yaml[line-length]
owner: root
group: root
mode: "0755"
Expand Down
1 change: 1 addition & 0 deletions roles/atuin_client/tasks/users.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Get user info for {{ item }}
ansible.builtin.getent:
database: passwd
Expand Down
4 changes: 2 additions & 2 deletions roles/atuin_server/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: "Restart atuin"
- name: Restart atuin
ansible.builtin.service:
name: atuin
state: restarted

- name: "Reload systemd"
- name: Reload systemd
ansible.builtin.systemd:
daemon_reload: true
1 change: 1 addition & 0 deletions roles/atuin_server/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
galaxy_info:
author: Maxim Burgerhout
description: Role to deploy the atuin shell history tool, server component
Expand Down
5 changes: 3 additions & 2 deletions roles/atuin_server/molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Converge server
hosts: all
# We disable gather facts because it would fail due to our container not
Expand All @@ -7,13 +8,13 @@
gather_facts: false
vars:
atuin_client_version: 18.3.0
atuin_server_db_uri: "postgres://atuin:atuin@{{ atuin_server_host }}/atuin"
atuin_server_db_uri: postgres://atuin:atuin@{{ atuin_server_host }}/atuin

pre_tasks:
- name: Gather required subset of facts
ansible.builtin.setup:
gather_subset:
- '!all'
- "!all"
- default_ipv4

roles:
Expand Down
8 changes: 4 additions & 4 deletions roles/atuin_server/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
- name: ubi9
image: registry.access.redhat.com/ubi9/ubi-init:latest
Expand All @@ -20,15 +20,15 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
provisioner:
name: ansible
inventory:
host_vars:
ubi8:
atuin_client_libc_variant: "musl"
atuin_client_libc_variant: musl
ubi9:
atuin_client_libc_variant: "gnu"
atuin_client_libc_variant: gnu
verifier:
name: ansible
1 change: 1 addition & 0 deletions roles/atuin_server/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Prepare containers for molecule tests
hosts: ubi8
gather_facts: false
Expand Down
1 change: 1 addition & 0 deletions roles/atuin_server/molecule/default/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
collections:
- containers.podman
1 change: 1 addition & 0 deletions roles/atuin_server/molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Verify
hosts: all
# We disable gather facts because it would fail due to our container not
Expand Down
8 changes: 4 additions & 4 deletions roles/atuin_server/tasks/create_user.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
- name: "Create atuin group"
- name: Create atuin group
ansible.builtin.group:
name: "{{ atuin_server_group }}"
system: true
state: "present"
state: present

- name: "Create atuin user"
- name: Create atuin user
ansible.builtin.user:
name: "{{ atuin_server_user }}"
comment: "atuin server user"
comment: atuin server user
group: "{{ atuin_server_group }}"
home: "{{ atuin_server_home }}"
shell: /sbin/nologin
Expand Down
Loading

0 comments on commit e271f5c

Please sign in to comment.