Compare commits
4 Commits
3b312e6f9a
...
flatpak
| Author | SHA1 | Date | |
|---|---|---|---|
| 652d32b175 | |||
| 9497da521c | |||
| df00529f86 | |||
| 58cd98c817 |
@@ -127,14 +127,6 @@ function Invoke-GitClone {
|
|||||||
if ($result.rc -ne 0) {
|
if ($result.rc -ne 0) {
|
||||||
$module.FailJson($result.stderr)
|
$module.FailJson($result.stderr)
|
||||||
}
|
}
|
||||||
# Ensure the newly cloned repository has the correct owner
|
|
||||||
$userName = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
|
||||||
$idRef = [System.Security.Principal.NTAccount]::new($userName)
|
|
||||||
Get-Item $dest | foreach { `
|
|
||||||
$_ ; $_ | Get-ChildItem -Force -Recurse `
|
|
||||||
} | foreach { `
|
|
||||||
$acl = $_ | Get-Acl; $acl.SetOwner($idRef); $_ | Set-Acl -AclObject $acl `
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Invoke-GitCheckout {
|
function Invoke-GitCheckout {
|
||||||
@@ -228,4 +220,13 @@ if ($recursive) {
|
|||||||
Invoke-GitSubmoduleUpdate $dest
|
Invoke-GitSubmoduleUpdate $dest
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Ensure the repository has the correct owner
|
||||||
|
$userName = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
||||||
|
$idRef = [System.Security.Principal.NTAccount]::new($userName)
|
||||||
|
Get-Item $dest | foreach { `
|
||||||
|
$_ ; $_ | Get-ChildItem -Force -Recurse `
|
||||||
|
} | foreach { `
|
||||||
|
$acl = $_ | Get-Acl; $acl.SetOwner($idRef); $_ | Set-Acl -AclObject $acl `
|
||||||
|
}
|
||||||
|
|
||||||
$module.ExitJson()
|
$module.ExitJson()
|
||||||
|
|||||||
@@ -35,6 +35,11 @@
|
|||||||
https://downloads.1password.com/linux/debian/{{arch}} stable main
|
https://downloads.1password.com/linux/debian/{{arch}} stable main
|
||||||
dest: /etc/apt/sources.list.d/1password.list
|
dest: /etc/apt/sources.list.d/1password.list
|
||||||
|
|
||||||
|
- name: apt update
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
|
||||||
- name: install gui package
|
- name: install gui package
|
||||||
when: '"WSL" not in ansible_kernel'
|
when: '"WSL" not in ansible_kernel'
|
||||||
become: true
|
become: true
|
||||||
|
|||||||
@@ -9,10 +9,6 @@
|
|||||||
repo: git@code.infektor.net:config/AutoHotKey.git
|
repo: git@code.infektor.net:config/AutoHotKey.git
|
||||||
dest: '{{autohotkey_repo_dir}}'
|
dest: '{{autohotkey_repo_dir}}'
|
||||||
branch: master
|
branch: master
|
||||||
- win_owner:
|
|
||||||
path: '{{autohotkey_repo_dir}}'
|
|
||||||
user: Benie
|
|
||||||
recurse: true
|
|
||||||
|
|
||||||
- name: create scheduled task
|
- name: create scheduled task
|
||||||
win_scheduled_task:
|
win_scheduled_task:
|
||||||
|
|||||||
6
roles/flatpak/tasks/Debian.yaml
Normal file
6
roles/flatpak/tasks/Debian.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: install apt package
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
name: flatpak
|
||||||
|
state: latest
|
||||||
9
roles/flatpak/tasks/main.yaml
Normal file
9
roles/flatpak/tasks/main.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- include_tasks: '{{ansible_os_family}}.yaml'
|
||||||
|
|
||||||
|
- name: add flathub repository remote
|
||||||
|
become: true
|
||||||
|
flatpak_remote:
|
||||||
|
name: flathub
|
||||||
|
state: present
|
||||||
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
@@ -1,5 +1,17 @@
|
|||||||
---
|
---
|
||||||
|
- name: slurp /etc/os-release
|
||||||
|
slurp:
|
||||||
|
src: /etc/os-release
|
||||||
|
register: os_release_slurp
|
||||||
|
- set_fact:
|
||||||
|
os_release: "{{ os_release_slurp.content |
|
||||||
|
b64decode | trim() | replace('=', ': ') | from_yaml }}"
|
||||||
|
|
||||||
|
- include_tasks: Ubuntu.yaml
|
||||||
|
when: "'ID_LIKE' in os_release and os_release.ID_LIKE == 'ubuntu debian'"
|
||||||
|
|
||||||
- name: install apt packages
|
- name: install apt packages
|
||||||
|
when: "'ID_LIKE' not in os_release"
|
||||||
become: true
|
become: true
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
- include_tasks: Ubuntu.yaml
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
- include_tasks: Ubuntu.yaml
|
|
||||||
@@ -1,5 +1,2 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: '{{ansible_os_family}}.yaml'
|
- include_tasks: '{{ansible_os_family}}.yaml'
|
||||||
when: ansible_os_family in ['Darwin', 'Windows']
|
|
||||||
- include_tasks: '{{ansible_distribution}}.yaml'
|
|
||||||
when: ansible_os_family not in ['Darwin', 'Windows']
|
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
- name: slurp /etc/os-release
|
||||||
|
slurp:
|
||||||
|
src: /etc/os-release
|
||||||
|
register: os_release_slurp
|
||||||
|
- set_fact:
|
||||||
|
os_release: "{{ os_release_slurp.content |
|
||||||
|
b64decode | trim() | replace('=', ': ') | from_yaml }}"
|
||||||
|
|
||||||
- name: add neovim stable ppa
|
- name: add neovim stable ppa
|
||||||
when: ansible_distribution == 'Ubuntu' and
|
when: "'ID_LIKE' in os_release and os_release.ID_LIKE == 'ubuntu debian'"
|
||||||
ansible_distribution_version == '20.04'
|
|
||||||
become: true
|
become: true
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: ppa:neovim-ppa/stable
|
repo: ppa:neovim-ppa/stable
|
||||||
|
|||||||
@@ -12,7 +12,3 @@
|
|||||||
repo: git@github.com:kbenzie/notes.git
|
repo: git@github.com:kbenzie/notes.git
|
||||||
dest: '{{obsidian_notes_repo}}'
|
dest: '{{obsidian_notes_repo}}'
|
||||||
branch: main
|
branch: main
|
||||||
- win_owner:
|
|
||||||
path: '{{obsidian_notes_repo}}'
|
|
||||||
user: Benie
|
|
||||||
recurse: true
|
|
||||||
|
|||||||
Reference in New Issue
Block a user