From eadca53553541f2ab2e20ce4760ac28d4732a71d Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Wed, 16 Nov 2022 20:07:27 +0100 Subject: [PATCH] Add role profanity --- playbook.yml | 1 + roles/profanity/meta/main.yml | 3 +++ roles/profanity/tasks/main.yml | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 roles/profanity/meta/main.yml create mode 100644 roles/profanity/tasks/main.yml diff --git a/playbook.yml b/playbook.yml index d3f7a07..d988764 100644 --- a/playbook.yml +++ b/playbook.yml @@ -38,3 +38,4 @@ - {role: gaming, tags: gaming} - {role: etckeeper, tags: etckeeper} - {role: neomutt, tags: neomutt} + - {role: profanity, tags: profanity} diff --git a/roles/profanity/meta/main.yml b/roles/profanity/meta/main.yml new file mode 100644 index 0000000..edef5f0 --- /dev/null +++ b/roles/profanity/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - role: check-sudo diff --git a/roles/profanity/tasks/main.yml b/roles/profanity/tasks/main.yml new file mode 100644 index 0000000..0af4e1f --- /dev/null +++ b/roles/profanity/tasks/main.yml @@ -0,0 +1,25 @@ +--- +- name: Install profanity (Archlinux) + become: true + pacman: + name: + - profanity + when: ansible_facts['distribution'] == 'Archlinux' + +- name: Install profanity (Debian) + become: true + apt: + name: + - profanity + when: ansible_facts['distribution'] == 'Debian' + +- name: Create needed directory + file: + path: ~/.config/profanity + state: directory + mode: 0755 + +- name: Copy profanity config + copy: src={{ item.src }} dest={{ item.dest }} mode=0644 + with_items: + - {src: 'profrc', dest: '~/.config/profanity/profrc'}