@@ -1,27 +1,10 @@ | |||||
--- | --- | ||||
- setup: | |||||
gather_subset: '!all' | |||||
when: not root_target_directory is defined | |||||
- apt: | |||||
pkg: dbus | |||||
state: present | |||||
when: | |||||
- not root_target_directory is defined | |||||
- ansible_os_family == "Debian" | |||||
- name: hostname | - name: hostname | ||||
hostname: | hostname: | ||||
name: "{{inventory_hostname}}" | name: "{{inventory_hostname}}" | ||||
when: not root_target_directory is defined | when: not root_target_directory is defined | ||||
- name: etc directory | |||||
file: | |||||
path: "{{ root_target_directory }}/etc" | |||||
state: directory | |||||
when: root_target_directory is defined | |||||
- name: hostname file | - name: hostname file | ||||
copy: | copy: | ||||
content: "{{inventory_hostname}}" | content: "{{inventory_hostname}}" | ||||
@@ -1,10 +1,5 @@ | |||||
--- | --- | ||||
- name: apt install console-setup | |||||
apt: | |||||
pkg: console-setup | |||||
when: not root_target_directory is defined | |||||
- name: default directory | - name: default directory | ||||
file: | file: | ||||
path: "{{ root_target_directory | default('') }}/etc/default" | path: "{{ root_target_directory | default('') }}/etc/default" | ||||
@@ -1,5 +1,14 @@ | |||||
--- | --- | ||||
# packages setup | |||||
- import_tasks: debian_repos.yaml | |||||
when: | |||||
- ansible_distribution == "Debian" | |||||
- not ansible_lsb.id is defined or ansible_lsb.id != "Raspbian" | |||||
- import_tasks: debian_packages.yaml | |||||
when: ansible_distribution == "Debian" | |||||
# user setup | # user setup | ||||
- import_tasks: root_user.yaml | - import_tasks: root_user.yaml | ||||
- import_tasks: ssh-agent.yaml | - import_tasks: ssh-agent.yaml | ||||
@@ -20,14 +29,6 @@ | |||||
- import_tasks: network.yaml | - import_tasks: network.yaml | ||||
# packages setup | |||||
- import_tasks: debian_repos.yaml | |||||
when: | |||||
- ansible_distribution == "Debian" | |||||
- not ansible_lsb.id is defined or ansible_lsb.id != "Raspbian" | |||||
- import_tasks: debian_packages.yaml | |||||
when: ansible_distribution == "Debian" | |||||
# shell setup | # shell setup | ||||
- import_tasks: shells/fish.yaml | - import_tasks: shells/fish.yaml | ||||
tags: | tags: | ||||
@@ -1,9 +1,5 @@ | |||||
--- | --- | ||||
- name: ensure resolvconf is installed | |||||
apt: | |||||
pkg: resolvconf | |||||
- name: link resolv.conf | - name: link resolv.conf | ||||
file: | file: | ||||
src: /run/resolvconf/resolv.conf | src: /run/resolvconf/resolv.conf | ||||
@@ -0,0 +1,30 @@ | |||||
--- | |||||
- name: fish package | |||||
apt: | |||||
pkg: fish | |||||
- name: fish config directory | |||||
file: | |||||
path: /etc/fish/conf.d | |||||
state: directory | |||||
- name: fish config files | |||||
copy: | |||||
src: shells/fish/global/ | |||||
dest: /etc/fish/conf.d/ | |||||
with_items: | |||||
- fish_title | |||||
- fish_prompt | |||||
- fish_greeting | |||||
# root user | |||||
- name: fish root user config directory | |||||
file: | |||||
path: /root/.config/fish/conf.d/ | |||||
state: directory | |||||
- name: fish root user config files | |||||
copy: | |||||
src: shells/fish/root/ | |||||
dest: /root/.config/fish/conf.d/ |
@@ -0,0 +1,6 @@ | |||||
--- | |||||
- name: xonsh config | |||||
copy: | |||||
src: shells/xonsh/xonshrc | |||||
dest: /etc/xonshrc |
@@ -61,6 +61,10 @@ debian_common_packages: | |||||
- python3-setuptools | - python3-setuptools | ||||
- golang | - golang | ||||
# system | |||||
- console-setup | |||||
- dbus | |||||
# security tools | # security tools | ||||
- openssh-client | - openssh-client | ||||
- ssh-agent-filter | - ssh-agent-filter | ||||