Skip to content

Commit

Permalink
more lint
Browse files Browse the repository at this point in the history
Signed-off-by: clux <sszynrae@gmail.com>
  • Loading branch information
clux committed Jun 25, 2023
1 parent 619df05 commit 1d4c71e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ jobs:
- run: env | grep SHELLCHECK
- run: just lint
- uses: ansible/ansible-lint-action@v6
with:
path: 'site.yml bootstrap.yml'
4 changes: 2 additions & 2 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ rules:
trailing-spaces: enable
indentation: # lists start with hyphen on the same indentation level as parent
spaces: 2
indent-sequences: no
check-multi-line-strings: no
indent-sequences: false
check-multi-line-strings: false
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ lint:

# run full lint plus bats test
test: lint
ansible-lint site.yml bootstrap.yml
ansible-lint site.yml bootstrap.yml secrets.yml
bats test
1 change: 1 addition & 0 deletions roles/xdg/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

- name: xdg-mime sshtorrent
command: xdg-mime default sshtorrent.desktop x-scheme-handler/magnet
changed_when: true # TODO: fixme
21 changes: 12 additions & 9 deletions roles/xdg/tasks/torrent.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
---
# xdg

- template: src=templates/sshtorrent.desktop dest=/usr/share/applications/
- template:
src: templates/sshtorrent.desktop
dest: /usr/share/applications/
mode: 0644
become: true
notify: xdg-mime sshtorrent

- template:
src=templates/magnet
dest=/home/{{ user }}/.local/bin/magnet
owner={{ user }}
mode="u+rwx"
src: templates/magnet
dest: /home/{{ user }}/.local/bin/magnet
owner: '{{ user }}'
mode: "u+rwx"
when: inventory_hostname != "broxy"

- template:
src=templates/magnet.local
dest=/home/{{ user }}/.local/bin/magnet
owner={{ user }}
mode="u+rwx"
src: templates/magnet.local
dest: /home/{{ user }}/.local/bin/magnet
owner: '{{ user }}'
mode: "u+rwx"
when: inventory_hostname == "broxy"
19 changes: 12 additions & 7 deletions secrets.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
---
- connection: local
- name: provision secrets from gogs post bootstrap
connection: local
hosts: all
vars_files:
- vars/gogs.yml
user: "{{ user }}"
tasks:
- template: src=templates/ssh_config.j2 dest=/home/{{ user }}/.ssh/config
- name: provision an initial ssh config
template:
src: templates/ssh_config.j2
dest: /home/{{ user }}/.ssh/config
mode: 0755

- name: Checkout secret modules
git:
repo=git@{{ gogs_name }}:{{ gogs_user }}/{{ item }}.git
dest=/home/{{ user }}/{{ item }}
key_file=/home/{{ user }}/.ssh/{{ gogs_ssh_id }}
accept_hostkey=yes
update=no
repo: 'git@{{ gogs_name }}:{{ gogs_user }}/{{ item }}.git'
dest: /home/{{ user }}/{{ item }}
key_file: /home/{{ user }}/.ssh/{{ gogs_ssh_id }}
accept_hostkey: true
update: false # noqa: latest
with_items:
- ssh
- gpg

0 comments on commit 1d4c71e

Please sign in to comment.