mirror of
				https://github.com/Maks1mS/alt-linux-vagrant-boxes.git
				synced 2025-11-04 14:51:23 +03:00 
			
		
		
		
	init
This commit is contained in:
		
							
								
								
									
										18
									
								
								alt-server-v-10/http/autoinstall.scm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								alt-server-v-10/http/autoinstall.scm
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
("/sysconfig-base/language" action "write" lang ("en_US"))
 | 
			
		||||
("/sysconfig-base/kbd" action "write" layout "ctrl_shift_toggle")
 | 
			
		||||
("/datetime-installer" action "write" commit #t name "RU" zone "Europe/Moscow" utc #t)
 | 
			
		||||
("/evms/control" action "write" control open installer #t)
 | 
			
		||||
("/evms/control" action "write" control update)
 | 
			
		||||
("/evms/profiles/server" action apply commit #f clearall #t exclude ())
 | 
			
		||||
("/evms/control" action "write" control commit)
 | 
			
		||||
("/evms/control" action "write" control close)
 | 
			
		||||
("/pkg-init" action "write")
 | 
			
		||||
("/pkg-install" action "write" lists "" auto #t)
 | 
			
		||||
("/preinstall" action "write")
 | 
			
		||||
("/grub" action "write" device "/dev/vda" passwd #f passwd_1 "*" passwd_2 "*")
 | 
			
		||||
("/net-eth" action "write" reset #t)
 | 
			
		||||
("/net-eth" action "write" name "eth0" configuration "dhcp")
 | 
			
		||||
("/net-eth" action "write" commit #t)
 | 
			
		||||
("/root/change_password" language ("en_US") passwd_2 "vagrant" passwd_1 "vagrant")
 | 
			
		||||
("/users/create_account" new_name "vagrant" gecos "vagrant" allow_su #t auto #f passwd_1 "vagrant" passwd_2 "vagrant" autologin #f)
 | 
			
		||||
("/postinstall/laststate" script "http://server/script.sh")
 | 
			
		||||
							
								
								
									
										5
									
								
								alt-server-v-10/http/vm-profile.scm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								alt-server-v-10/http/vm-profile.scm
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
((server
 | 
			
		||||
  (title . "Setup")
 | 
			
		||||
  (action . trivial)
 | 
			
		||||
  (actiondata  ("/" (size 1024000 . #t ) (fsim . "Ext2/3") (methods plain)))
 | 
			
		||||
))
 | 
			
		||||
							
								
								
									
										11
									
								
								alt-server-v-10/setup.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								alt-server-v-10/setup.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
#!/bin/bash -e
 | 
			
		||||
 | 
			
		||||
# add vagrant's public key - user can ssh without password
 | 
			
		||||
mkdir -pm 700 /home/vagrant/.ssh
 | 
			
		||||
curl -q -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
 | 
			
		||||
chmod 0600 /home/vagrant/.ssh/authorized_keys
 | 
			
		||||
chown -R vagrant:vagrant /home/vagrant/.ssh
 | 
			
		||||
 | 
			
		||||
# give sudo access (grants all permissions to user vagrant)
 | 
			
		||||
echo "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
 | 
			
		||||
chmod 0440 /etc/sudoers.d/vagrant
 | 
			
		||||
							
								
								
									
										17
									
								
								alt-server-v-10/setup.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								alt-server-v-10/setup.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
---
 | 
			
		||||
- name: Provision
 | 
			
		||||
  hosts: default
 | 
			
		||||
  become: true
 | 
			
		||||
  become_method: su
 | 
			
		||||
  gather_facts: false
 | 
			
		||||
  vars:
 | 
			
		||||
    become_password: vagrant
 | 
			
		||||
  tasks:
 | 
			
		||||
    - name: Shell
 | 
			
		||||
      ansible.builtin.shell: |
 | 
			
		||||
        mkdir -pm 700 /home/vagrant/.ssh
 | 
			
		||||
        curl -q -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
 | 
			
		||||
        chmod 0600 /home/vagrant/.ssh/authorized_keys
 | 
			
		||||
        chown -R vagrant:vagrant /home/vagrant/.ssh
 | 
			
		||||
        echo "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
 | 
			
		||||
        chmod 0440 /etc/sudoers.d/vagrant
 | 
			
		||||
							
								
								
									
										22
									
								
								alt-server-v-10/vars.pkrvars.hcl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								alt-server-v-10/vars.pkrvars.hcl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
iso_url = "./iso/alt-server-v-10.1-x86_64.iso"
 | 
			
		||||
iso_checksum = "sha256:9955e7bb5ee9affbe3de7473a3bcd53f7d8463b9e2f43ef6831ebfe71bc7da6c"
 | 
			
		||||
 | 
			
		||||
ssh_username = "vagrant"
 | 
			
		||||
ssh_password = "vagrant"
 | 
			
		||||
 | 
			
		||||
vm_name = "alt-server-v-10"
 | 
			
		||||
 | 
			
		||||
http_dir = "./alt-server-v-10/http"
 | 
			
		||||
 | 
			
		||||
output_directory = "./builds/alt-server-v-10"
 | 
			
		||||
output_filename = "alt-server-v-10-amd64"
 | 
			
		||||
 | 
			
		||||
boot_command = [
 | 
			
		||||
  "<wait><wait><wait><wait><wait><wait><wait><wait>",
 | 
			
		||||
  "e<wait><down><down><down><end><spacebar>",
 | 
			
		||||
  "ai curl=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
 | 
			
		||||
  "<f10>"
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
setup_playbook = "./alt-server-v-10/setup.yml"
 | 
			
		||||
setup_script = "./alt-server-v-10/setup.sh"
 | 
			
		||||
		Reference in New Issue
	
	Block a user