Add gdb role for Debian

This commit is contained in:
Kenneth Benzie 2022-11-05 20:05:48 +00:00
parent bb945190f8
commit cee0c443a3
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
- name: install apt package
apt:
name: gdb
state: latest

19
roles/gdb/tasks/main.yaml Normal file
View File

@ -0,0 +1,19 @@
---
- set_fact:
config_dir: '{{ansible_env.HOME}}/.config/gdb'
state_dir: '{{ansible_env.HOME}}/.local/state/gdb'
- include_tasks: '{{ansible_os_family}}.yaml'
- name: create directory
file:
path: '{{item}}'
state: directory
with_items:
- '{{config_dir}}'
- '{{state_dir}}'
- name: create config file
template:
src: gdbinit
dest: '{{config_dir}}/gdbinit'

View File

@ -0,0 +1,3 @@
# Enable saving command history
set history filename {{state_dir}}/history
set history save on