Add gdb role for Debian
This commit is contained in:
parent
bb945190f8
commit
cee0c443a3
5
roles/gdb/tasks/Debian.yaml
Normal file
5
roles/gdb/tasks/Debian.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: install apt package
|
||||||
|
apt:
|
||||||
|
name: gdb
|
||||||
|
state: latest
|
19
roles/gdb/tasks/main.yaml
Normal file
19
roles/gdb/tasks/main.yaml
Normal 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'
|
3
roles/gdb/templates/gdbinit
Normal file
3
roles/gdb/templates/gdbinit
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Enable saving command history
|
||||||
|
set history filename {{state_dir}}/history
|
||||||
|
set history save on
|
Loading…
x
Reference in New Issue
Block a user