-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTemplate-Cloud-Userdata.yml
More file actions
33 lines (26 loc) · 1.82 KB
/
Template-Cloud-Userdata.yml
File metadata and controls
33 lines (26 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- name: add cloud-run-userdata script (RHEL)
when: ansible_os_family == "RedHat"
template: src=templates/RHEL/cloud-run-userdata-rhel.j2 dest=/usr/share/cloudstack/cloudstack-run-userdata mode=0755
- name: add cloud-run-userdata script (Debian)
when: ansible_os_family == "Debian"
template: src=templates/Debian/cloud-run-userdata-debian.j2 dest=/usr/share/cloudstack/cloudstack-run-userdata mode=0755
- name: add cloud-run-userdata script (FreeBSD)
when: ansible_os_family == "FreeBSD"
template: src=templates/FreeBSD/cloud-run-userdata-freebsd.j2 dest=/usr/share/cloudstack/cloudstack_run_userdata mode=0755
- name: setup cloudstack-run-userdata (init)
when: upstart.stat.exists == false and systemd.stat.exists == false and ansible_os_family != "FreeBSD"
file: state=link src=/usr/share/cloudstack/cloudstack-run-userdata dest=/etc/init.d/cloudstack-run-userdata mode=0755 force=yes
- name: setup cloudstack-run-userdata (upstart)
when: upstart.stat.exists == true and systemd.stat.exists == false and ansible_os_family != "FreeBSD"
template: src=templates/upstart/run-userdata.upstart.j2 dest=/etc/init/cloudstack-run-userdata.conf mode=0644
- name: setup cloudstack-run-userdata (systemd)
when: upstart.stat.exists == false and systemd.stat.exists == true and ansible_os_family != "FreeBSD"
template: src=templates/systemd/run-userdata.systemd.j2 dest=/usr/lib/systemd/system/cloudstack-run-userdata.service mode=0644
- name: setup cloudstack-run-userdata (FreeBSD)
when: upstart.stat.exists == false and systemd.stat.exists == false and ansible_os_family == "FreeBSD"
template: src=templates/FreeBSD/cloud-userdata-rc.j2 dest=/usr/local/etc/rc.d/cloudstack_run_userdata mode=0755
- name: clear init legacy
when: ansible_os_family == "RedHat"
shell: chkconfig --del cloudstack-run-userdata
ignore_errors: true