@@ -29,4 +29,5 @@ debian_sources: true | |||||
debian_backports_sources: "{{debian_sources}}" | debian_backports_sources: "{{debian_sources}}" | ||||
debian_security_sources: "{{debian_sources}}" | debian_security_sources: "{{debian_sources}}" | ||||
common_package_intallation: true | |||||
microcode_update: false | microcode_update: false |
@@ -3,7 +3,6 @@ | |||||
- name: debian base packages | - name: debian base packages | ||||
apt: | apt: | ||||
pkg: "{{ debian_base_packages }}" | pkg: "{{ debian_base_packages }}" | ||||
when: debian_base_packages is defined | |||||
- name: debian boot packages | - name: debian boot packages | ||||
apt: | apt: | ||||
@@ -13,6 +12,7 @@ | |||||
- name: debian common packages | - name: debian common packages | ||||
apt: | apt: | ||||
pkg: "{{ debian_common_packages }}" | pkg: "{{ debian_common_packages }}" | ||||
when: common_package_intallation | |||||
- name: debian custom packages | - name: debian custom packages | ||||
apt: | apt: | ||||
@@ -5,26 +5,15 @@ | |||||
name: "{{inventory_hostname}}" | name: "{{inventory_hostname}}" | ||||
when: not root_target_directory is defined | when: not root_target_directory is defined | ||||
- name: hostname file | |||||
copy: | |||||
content: "{{inventory_hostname}}" | |||||
dest: "{{ root_target_directory }}/etc/hostname" | |||||
when: root_target_directory is defined | |||||
- name: hosts file | |||||
file: | |||||
path: "{{ root_target_directory }}/etc/hosts" | |||||
state: touch | |||||
when: root_target_directory is defined | |||||
- name: localhost ipv4 entry | - name: localhost ipv4 entry | ||||
lineinfile: | lineinfile: | ||||
dest: "{{ root_target_directory | default('') }}/etc/hosts" | dest: "{{ root_target_directory | default('') }}/etc/hosts" | ||||
regexp: '^127\.0\.0\.1' | regexp: '^127\.0\.0\.1' | ||||
line: "127.0.0.1 localhost {{inventory_hostname}}" | |||||
line: "127.0.0.1 localhost {{inventory_hostname}} {{inventory_hostname_short}}" | |||||
- name: localhost ipv6 entry | - name: localhost ipv6 entry | ||||
lineinfile: | lineinfile: | ||||
dest: "{{ root_target_directory | default('') }}/etc/hosts" | dest: "{{ root_target_directory | default('') }}/etc/hosts" | ||||
regexp: '^::1' | regexp: '^::1' | ||||
line: "::1 localhost ip6-localhost ip6-loopback {{inventory_hostname}}" | |||||
line: "::1 localhost ip6-localhost ip6-loopback {{inventory_hostname}} {{inventory_hostname_short}}" |
@@ -1,12 +1,6 @@ | |||||
--- | --- | ||||
- name: default directory | |||||
file: | |||||
path: "{{ root_target_directory | default('') }}/etc/default" | |||||
state: directory | |||||
when: root_target_directory is defined | |||||
- name: keyboard configuration | - name: keyboard configuration | ||||
template: | template: | ||||
src: default-keyboard.j2 | src: default-keyboard.j2 | ||||
dest: "{{ root_target_directory | default('') }}/etc/default/keyboard" | |||||
dest: /etc/default/keyboard |
@@ -11,18 +11,17 @@ | |||||
name: root | name: root | ||||
generate_ssh_key: yes | generate_ssh_key: yes | ||||
ssh_key_type: ed25519 | ssh_key_type: ed25519 | ||||
when: | |||||
- root_ssh_key | |||||
- not root_target_directory is defined | |||||
when: root_ssh_key | |||||
- name: root user ssh directory | - name: root user ssh directory | ||||
file: | file: | ||||
path: "{{ root_target_directory | default('') }}/root/.ssh" | |||||
path: /root/.ssh | |||||
state: directory | state: directory | ||||
mode: 0700 | |||||
when: root_ssh_authorized_keys is defined | when: root_ssh_authorized_keys is defined | ||||
- name: root user ssh authorized keys | - name: root user ssh authorized keys | ||||
template: | |||||
src: root_user_ssh_authorized_keys.j2 | |||||
dest: "{{ root_target_directory | default('') }}/root/.ssh/authorized_keys" | |||||
copy: | |||||
content: "{{ root_ssh_authorized_keys | join('\n') }}" | |||||
dest: /root/.ssh/authorized_keys | |||||
when: root_ssh_authorized_keys is defined | when: root_ssh_authorized_keys is defined |