Skip to content
Snippets Groups Projects
Commit abe84eed authored by Jan Vykopal's avatar Jan Vykopal
Browse files

Merge branch '4-chrony-service' into 'master'

Resolve "Activate ntp service for time synchronization" for Qemu and VBox

Closes #4

See merge request !2
parents b1c64cb1 f368ad35
Branches main
No related tags found
1 merge request!2Resolve "Activate ntp service for time synchronization" for Qemu and VBox
Pipeline #64360 passed with stages
in 59 minutes and 3 seconds
# Changelog
## [qemu-0.1.0], [vbox-0.1.0] - 2020-11-8
### Added
- Service chrony for time synchronization over NTP
- This CHANGELOG file and versioning
[qemu-0.1.0]: https://gitlab.ics.muni.cz/muni-kypo-images/kali-2019.4/-/tree/qemu-0.1.0
[vbox-0.1.0]: https://gitlab.ics.muni.cz/muni-kypo-images/kali-2019.4/-/tree/vbox-0.1.0
...@@ -53,7 +53,9 @@ ...@@ -53,7 +53,9 @@
"ssh_wait_timeout": "{{user `ssh_wait_timeout`}}", "ssh_wait_timeout": "{{user `ssh_wait_timeout`}}",
"type": "qemu", "type": "qemu",
"vm_name": "{{user `vm_name`}}", "vm_name": "{{user `vm_name`}}",
"vnc_bind_address": "{{user `vnc_bind_address`}}" "vnc_bind_address": "{{user `vnc_vrdp_bind_address`}}",
"vnc_port_min": "{{user `vnc_vrdp_port`}}",
"vnc_port_max": "{{user `vnc_vrdp_port`}}"
}, },
{ {
"boot_command": [ "boot_command": [
...@@ -104,7 +106,10 @@ ...@@ -104,7 +106,10 @@
"ssh_username": "{{user `ssh_username`}}", "ssh_username": "{{user `ssh_username`}}",
"ssh_wait_timeout": "{{user `ssh_wait_timeout`}}", "ssh_wait_timeout": "{{user `ssh_wait_timeout`}}",
"type": "virtualbox-iso", "type": "virtualbox-iso",
"vm_name": "{{user `vm_name`}}" "vm_name": "{{user `vm_name`}}",
"vrdp_bind_address": "{{user `vnc_vrdp_bind_address`}}",
"vrdp_port_min": "{{user `vnc_vrdp_port`}}",
"vrdp_port_max": "{{user `vnc_vrdp_port`}}"
} }
], ],
"provisioners": [ "provisioners": [
...@@ -169,6 +174,7 @@ ...@@ -169,6 +174,7 @@
"ssh_username": "root", "ssh_username": "root",
"ssh_wait_timeout": "90m", "ssh_wait_timeout": "90m",
"vm_name": "kali", "vm_name": "kali",
"vnc_bind_address": "0.0.0.0" "vnc_vrdp_bind_address": "127.0.0.1",
"vnc_vrdp_port": "5900"
} }
} }
...@@ -8,7 +8,15 @@ ...@@ -8,7 +8,15 @@
- name: Gather facts - name: Gather facts
setup: setup:
- name: Gather services facts
service_facts:
- name: Print hello world - name: Print hello world
debug: debug:
msg: "Hello World" msg: "Hello World"
- name: Check that chrony is running
assert:
that:
- ansible_facts.services.chrony.state == "running"
...@@ -10,3 +10,8 @@ sed -i 's/#\?PermitRootLogin.*/PermitRootLogin without-password/g' /etc/ssh/sshd ...@@ -10,3 +10,8 @@ sed -i 's/#\?PermitRootLogin.*/PermitRootLogin without-password/g' /etc/ssh/sshd
# install resolvconf # install resolvconf
apt-get -y install resolvconf apt-get -y install resolvconf
# install and configure chrony
apt-get -y install chrony
sed -i 's/pool .*/pool 0.pool.ntp.org iburst/' /etc/chrony/chrony.conf
systemctl enable chrony
systemctl start chrony
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment