Add gdb role for Debian
This commit is contained in:
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'
|
||||
Reference in New Issue
Block a user