libvirt_cloud/roles/ansible-gentoo_install/tasks/daemons.yml
2023-12-30 12:01:03 +00:00

45 lines
1.0 KiB
YAML

# -*- mode: yaml; indent-tabs-mode: nil; tab-width: 2; coding: utf-8-unix -*-
---
- name: "DEBUG: ansible-gentoo_install daemons"
debug:
verbosity: 1
msg: "DEBUG: ansible-gentoo_install daemons"
- name: test we are in the chroot
shell: |
df | grep {{AGI_NBD_MP}} && exit 1
- name: merge packages
shell: |
MODE={{AGI_PROXY_MODE|default('')}}
. /usr/local/bin/proxy_export.bash
box_gentoo_emerge.bash -v {{AGI_bootstrap_pkgs}}
when: "'AGI_bootstrap_pkgs' != []"
- name: start syslog daemon at boot
service:
name: "{{ AGI_install_syslog_daemon.split('/')[1] }}"
enabled: true
- name: start cron daemon at boot
service:
name: "{{ AGI_install_cron_daemon.split('/')[1] }}"
enabled: true
- name: configure sshd
lineinfile:
dest: /etc/ssh/sshd_config
line: 'PermitRootLogin yes'
regexp: '^PermitRootLogin'
- name: start sshd at boot
service:
name: sshd
enabled: true
- name: start qemu-guest-agent daemon at boot
service:
name: qemu-guest-agent
enabled: true