Explorar el Código

package setup only at one place

master
padre
commit
372a76e107
Se han modificado 7 ficheros con 49 adiciones y 34 borrados
  1. +0
    -17
      tasks/hostname.yaml
  2. +0
    -5
      tasks/keyboard_configuration.yaml
  3. +9
    -8
      tasks/main.yaml
  4. +0
    -4
      tasks/network.yaml
  5. +30
    -0
      tasks/shells/fish.yaml
  6. +6
    -0
      tasks/shells/xonsh.yaml
  7. +4
    -0
      vars/main.yaml

+ 0
- 17
tasks/hostname.yaml Ver fichero

@@ -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
hostname:
name: "{{inventory_hostname}}"
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
copy:
content: "{{inventory_hostname}}"


+ 0
- 5
tasks/keyboard_configuration.yaml Ver fichero

@@ -1,10 +1,5 @@
---

- name: apt install console-setup
apt:
pkg: console-setup
when: not root_target_directory is defined

- name: default directory
file:
path: "{{ root_target_directory | default('') }}/etc/default"


+ 9
- 8
tasks/main.yaml Ver fichero

@@ -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
- import_tasks: root_user.yaml
- import_tasks: ssh-agent.yaml
@@ -20,14 +29,6 @@

- 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
- import_tasks: shells/fish.yaml
tags:


+ 0
- 4
tasks/network.yaml Ver fichero

@@ -1,9 +1,5 @@
---

- name: ensure resolvconf is installed
apt:
pkg: resolvconf

- name: link resolv.conf
file:
src: /run/resolvconf/resolv.conf


+ 30
- 0
tasks/shells/fish.yaml Ver fichero

@@ -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/

+ 6
- 0
tasks/shells/xonsh.yaml Ver fichero

@@ -0,0 +1,6 @@
---

- name: xonsh config
copy:
src: shells/xonsh/xonshrc
dest: /etc/xonshrc

+ 4
- 0
vars/main.yaml Ver fichero

@@ -61,6 +61,10 @@ debian_common_packages:
- python3-setuptools
- golang

# system
- console-setup
- dbus

# security tools
- openssh-client
- ssh-agent-filter