diff --git a/roles/gdb/tasks/Debian.yaml b/roles/gdb/tasks/Debian.yaml new file mode 100644 index 0000000..53ad2c7 --- /dev/null +++ b/roles/gdb/tasks/Debian.yaml @@ -0,0 +1,5 @@ +--- +- name: install apt package + apt: + name: gdb + state: latest diff --git a/roles/gdb/tasks/main.yaml b/roles/gdb/tasks/main.yaml new file mode 100644 index 0000000..d21885c --- /dev/null +++ b/roles/gdb/tasks/main.yaml @@ -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' diff --git a/roles/gdb/templates/gdbinit b/roles/gdb/templates/gdbinit new file mode 100644 index 0000000..aaa3a5a --- /dev/null +++ b/roles/gdb/templates/gdbinit @@ -0,0 +1,3 @@ +# Enable saving command history +set history filename {{state_dir}}/history +set history save on