fix network activation at reboot and disable network configuration for debian image
This commit is contained in:
parent
124ff2fd40
commit
e58efdb5ad
@ -1,4 +1,4 @@
|
||||
version: '3.7'
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
gentoo_packer:
|
||||
@ -16,7 +16,7 @@ services:
|
||||
- "./image/assets:/packer"
|
||||
- "./image/cache:/packer-cache"
|
||||
ports:
|
||||
- "5900:5900"
|
||||
- "5900:5900"
|
||||
|
||||
debian_packer:
|
||||
image: ${REGISTRY_URL}/${IMAGE_NAME}:${VERSION}
|
||||
@ -26,7 +26,7 @@ services:
|
||||
- SSH_LIVE_USERNAME=debian
|
||||
- SSH_LIVE_PASSWORD=debian
|
||||
- IMAGE_VERSION=10.7.0
|
||||
- ANSIBLE_EXTRA_VARS=generated_user=antoine generated_group=users
|
||||
- ANSIBLE_EXTRA_VARS=generated_user=antoine generated_group=users enable_network=false
|
||||
- ANSIBLE_PLAYBOOK=/packer/ansible/playbook-debian.yml
|
||||
- ISO_CHECKSUM=file:https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA512SUMS
|
||||
#- ISO_CHECKSUM=file:https://cdimage.debian.org/mirror/cdimage/archive/10.7.0/amd64/iso-cd/SHA512SUMS
|
||||
@ -36,4 +36,4 @@ services:
|
||||
- "./image/assets:/packer"
|
||||
- "./image/cache:/packer-cache"
|
||||
ports:
|
||||
- "5900:5900"
|
||||
- "5900:5900"
|
||||
|
@ -12,6 +12,7 @@
|
||||
fail_msg: "Pass param ssh_pub, generated_user and generated_group to launch this playbook"
|
||||
roles:
|
||||
- role: debian-init
|
||||
enable_network: false
|
||||
- role: create-user
|
||||
vars:
|
||||
ssh_public_key: "{{ ssh_pub }}"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
grub_file: "/etc/default/grub"
|
||||
grub_timeout: 1
|
||||
|
||||
@ -11,3 +10,10 @@ initial_package:
|
||||
- vim
|
||||
- lsb-release
|
||||
- cloud-init
|
||||
- bash-completion
|
||||
|
||||
initial_service:
|
||||
- serial-getty@ttyS0.service
|
||||
|
||||
# configure and enable network /etc/network/interface file
|
||||
enable_network: true
|
||||
|
@ -14,9 +14,10 @@
|
||||
dest: "{{ network_config.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
mode: "0644"
|
||||
notify:
|
||||
- Restart networking
|
||||
when: enable_network
|
||||
|
||||
- name: "flush all notified handler"
|
||||
meta: flush_handlers
|
||||
@ -28,3 +29,13 @@
|
||||
update_cache: yes
|
||||
state: present
|
||||
notify: Start qemu-guest service
|
||||
|
||||
- name: "start/enable initial service"
|
||||
become: yes
|
||||
service:
|
||||
name: "{{ service }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
loop: "{{ initial_service }}"
|
||||
loop_control:
|
||||
loop_var: service
|
||||
|
Loading…
Reference in New Issue
Block a user