Fix some ansible-lint complaints.
This commit is contained in:
parent
c7030c9245
commit
2cf34e8e55
64 changed files with 357 additions and 297 deletions
|
@ -1,13 +1,13 @@
|
|||
- name: make sure ansible is available
|
||||
apt:
|
||||
name: ansible
|
||||
state: latest
|
||||
state: latest # noqa package-latest
|
||||
|
||||
- name: generate ssh key
|
||||
command: "su -l {{ ansible_user }} -c \"ssh-keygen -t rsa -f /home/{{ ansible_user }}/.ssh/id_rsa -P ''\""
|
||||
args:
|
||||
creates: "/home/{{ ansible_user }}/.ssh/id_rsa"
|
||||
warn: False
|
||||
warn: false
|
||||
|
||||
- name: slurp public key
|
||||
slurp:
|
||||
|
@ -15,7 +15,8 @@
|
|||
register: sshpubkey
|
||||
|
||||
# The following seems to be necessary to get rid of a newline:
|
||||
- set_fact:
|
||||
- name: define variable
|
||||
set_fact:
|
||||
sshpubkey: "{{ sshpubkey['content'] | b64decode | replace('\n', '') }}"
|
||||
|
||||
- name: enable backports in preseed file
|
||||
|
@ -87,12 +88,15 @@
|
|||
block: |
|
||||
# Use a temporary package cache during installation, install etckeeper.
|
||||
menuentry 'Debian stable (amd64) + temporary package cache' {
|
||||
linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux mirror/http/proxy?=http://{{ ansible_hostname }}:3142/ pkgsel/include=etckeeper preseed/late_command="rm -fv /target/etc/apt/apt.conf" ---
|
||||
linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
|
||||
mirror/http/proxy?=http://{{ ansible_hostname }}:3142/ pkgsel/include=etckeeper \
|
||||
preseed/late_command="rm -fv /target/etc/apt/apt.conf" ---
|
||||
initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
|
||||
}
|
||||
|
||||
menuentry 'Debian {{ di_version }} (amd64) + preseed + kiosk.yml' {
|
||||
linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=kiosk.yml ---
|
||||
linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
|
||||
auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=kiosk.yml ---
|
||||
initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
|
||||
}
|
||||
|
||||
|
@ -128,7 +132,8 @@
|
|||
insertbefore: EOF
|
||||
block: |
|
||||
menuentry 'Debian {{ di_version }} (amd64) + preseed + kerberox-client.yml' {
|
||||
linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=kerberox-client.yml ---
|
||||
linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
|
||||
auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=kerberox-client.yml ---
|
||||
initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
|
||||
}
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK kerberox-client"
|
||||
|
@ -161,13 +166,16 @@
|
|||
block: |
|
||||
menuentry 'Debian {{ di_version }} (amd64) + preseed + sambox-client.yml' {
|
||||
regexp --set=1:oct4 --set=2:oct5 --set=3:oct6 "\:([[:xdigit:]]+)\:([[:xdigit:]]+)\:([[:xdigit:]]+)\$" $net_default_mac
|
||||
linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux auto=true priority=critical hostname=${oct4}${oct5}${oct6} url=tftp://{{ ansible_hostname }} playbook=sambox-client.yml ---
|
||||
linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
|
||||
auto=true priority=critical hostname=${oct4}${oct5}${oct6} url=tftp://{{ ansible_hostname }} \
|
||||
playbook=sambox-client.yml ---
|
||||
initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
|
||||
}
|
||||
|
||||
menuentry 'Debian daily (amd64) + preseed + sambox-client.yml' {
|
||||
regexp --set=1:oct4 --set=2:oct5 --set=3:oct6 "\:([[:xdigit:]]+)\:([[:xdigit:]]+)\:([[:xdigit:]]+)\$" $net_default_mac
|
||||
linux /d-i/n-a/daily/amd64/linux auto=true priority=critical hostname=${oct4}${oct5}${oct6} url=tftp://{{ ansible_hostname }} playbook=sambox-client.yml ---
|
||||
linux /d-i/n-a/daily/amd64/linux auto=true priority=critical hostname=${oct4}${oct5}${oct6} \
|
||||
url=tftp://{{ ansible_hostname }} playbook=sambox-client.yml ---
|
||||
initrd /d-i/n-a/daily/amd64/initrd.gz
|
||||
}
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK sambox-client"
|
||||
|
@ -181,7 +189,7 @@
|
|||
git:
|
||||
repo: 'https://salsa.debian.org/andi/debian-lan-ansible.git'
|
||||
dest: "{{ repo_dir }}"
|
||||
update: no
|
||||
update: false
|
||||
become_user: "{{ ansible_user }}"
|
||||
when: not run_in_installer|default(false)|bool
|
||||
|
||||
|
@ -189,6 +197,7 @@
|
|||
template:
|
||||
src: git-repo.j2
|
||||
dest: "/etc/systemd/system/git-repo.service"
|
||||
mode: 0644
|
||||
notify: start git-repo
|
||||
when: not run_in_installer|default(false)|bool
|
||||
|
||||
|
@ -197,7 +206,8 @@
|
|||
- name: add clients to inventory
|
||||
blockinfile:
|
||||
dest: /etc/ansible/hosts
|
||||
create: yes
|
||||
create: true
|
||||
mode: 0644
|
||||
block: |
|
||||
[kerberox-client]
|
||||
{{ in_inventory }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue