add depends: k3s -> common

This commit is contained in:
Haitao Pan 2023-03-24 10:35:43 +08:00
parent 187f793fe5
commit ee6d86bbf2
2 changed files with 7 additions and 15 deletions

View File

@ -1,15 +1,15 @@
- name: update /etc/hostname
template: src=templates/hostname dest=/etc/hostname owner=root group=root mode=0644 unsafe_writes=yes
- name: Set timezone
shell: "timedatectl set-timezone Asia/Shanghai"
- name: Set hostname
shell: "hostname -F /etc/hostname"
- name: update /etc/hostname
template: src=templates/hostname dest=/etc/hostname owner=root group=root mode=0644 unsafe_writes=yes
- name: Update /etc/hosts
template: src=templates/hosts dest=/etc/hosts owner=root group=root mode=0644 force=yes unsafe_writes=yes
- name: Set logrotate for monitor-agent log
template: src=templates/logrotate-monitor-agent dest=/etc/logrotate.d/monitor-agent owner=root group=root mode=0644 force=yes unsafe_writes=yes
- name: Install packages
shell: "yum makecache && yum install -y audit"
when: ansible_facts['distribution'] != "Ubuntu"
@ -18,13 +18,3 @@
shell: "apt install -y auditd"
when: ansible_facts['distribution'] == "Ubuntu"
- name: Restart crond service
shell: "systemctl restart crond"
when: ansible_facts['distribution'] != "Ubuntu"
- name: Restart crond service
shell: "systemctl restart cron"
when: ansible_facts['distribution'] == "Ubuntu"
- name: Set timezone
shell: "timedatectl set-timezone Asia/Shanghai"

View File

@ -0,0 +1,2 @@
dependencies:
- role: common