From 5dfb92522eda4750b83d7c98a4f859b454577fe0 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 11 May 2022 22:27:18 +0100 Subject: [PATCH] Add ag role for Debian, macOS, and Windows --- roles/ag/tasks/Darwin.yaml | 5 +++++ roles/ag/tasks/Debian.yaml | 6 ++++++ roles/ag/tasks/Windows.yaml | 5 +++++ roles/ag/tasks/main.yaml | 2 ++ roles/neovim/tasks/Darwin.yaml | 1 - roles/neovim/tasks/Debian.yaml | 4 +--- roles/neovim/tasks/Windows.yaml | 1 - unix.yaml | 3 ++- windows.yaml | 3 ++- 9 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 roles/ag/tasks/Darwin.yaml create mode 100644 roles/ag/tasks/Debian.yaml create mode 100644 roles/ag/tasks/Windows.yaml create mode 100644 roles/ag/tasks/main.yaml diff --git a/roles/ag/tasks/Darwin.yaml b/roles/ag/tasks/Darwin.yaml new file mode 100644 index 0000000..4f7d034 --- /dev/null +++ b/roles/ag/tasks/Darwin.yaml @@ -0,0 +1,5 @@ +--- +- name: install homebrew package + apt: + name: the_silver_searcher + state: latest diff --git a/roles/ag/tasks/Debian.yaml b/roles/ag/tasks/Debian.yaml new file mode 100644 index 0000000..0375381 --- /dev/null +++ b/roles/ag/tasks/Debian.yaml @@ -0,0 +1,6 @@ +--- +- name: install apt package + become: true + apt: + name: silversearcher-ag + state: latest diff --git a/roles/ag/tasks/Windows.yaml b/roles/ag/tasks/Windows.yaml new file mode 100644 index 0000000..1d30217 --- /dev/null +++ b/roles/ag/tasks/Windows.yaml @@ -0,0 +1,5 @@ +--- +- name: install choco package + win_chocolatey: + name: ag + state: latest diff --git a/roles/ag/tasks/main.yaml b/roles/ag/tasks/main.yaml new file mode 100644 index 0000000..6853678 --- /dev/null +++ b/roles/ag/tasks/main.yaml @@ -0,0 +1,2 @@ +--- +- include_tasks: '{{ansible_os_family}}.yaml' diff --git a/roles/neovim/tasks/Darwin.yaml b/roles/neovim/tasks/Darwin.yaml index 757b380..e524f5c 100644 --- a/roles/neovim/tasks/Darwin.yaml +++ b/roles/neovim/tasks/Darwin.yaml @@ -4,7 +4,6 @@ name: - neovim - node - - the_silver_searcher state: latest - name: clone config repo diff --git a/roles/neovim/tasks/Debian.yaml b/roles/neovim/tasks/Debian.yaml index 13e1faf..ab7cfae 100644 --- a/roles/neovim/tasks/Debian.yaml +++ b/roles/neovim/tasks/Debian.yaml @@ -2,9 +2,7 @@ - name: install apt package become: true apt: - name: - - neovim - - silversearcher-ag + name: neovim state: latest - include_tasks: unix.yaml diff --git a/roles/neovim/tasks/Windows.yaml b/roles/neovim/tasks/Windows.yaml index 7c8864f..615c277 100644 --- a/roles/neovim/tasks/Windows.yaml +++ b/roles/neovim/tasks/Windows.yaml @@ -3,7 +3,6 @@ win_chocolatey: name: - neovim - - ag - nodejs state: latest diff --git a/unix.yaml b/unix.yaml index 8b236c2..503719a 100644 --- a/unix.yaml +++ b/unix.yaml @@ -4,6 +4,7 @@ roles: - role: zsh - role: tmux - - role: neovim - role: git + - role: neovim + - role: ag - role: python diff --git a/windows.yaml b/windows.yaml index 3a6f7bd..a4b88b5 100644 --- a/windows.yaml +++ b/windows.yaml @@ -13,8 +13,9 @@ roles: - role: powershell - - role: neovim - role: git + - role: neovim + - role: ag - role: python - role: autohotkey - role: 1password