-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTemplate-Cloud-Password.yml
37 lines (29 loc) · 2.17 KB
/
Template-Cloud-Password.yml
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
34
35
36
37
---
- name: add cloud-set-guest-password script (RHEL)
when: ansible_os_family == "RedHat"
template: src=templates/RHEL/cloud-set-guest-password-rhel.j2 dest=/usr/share/cloudstack/cloudstack-set-guest-password mode=0755
- name: add cloud-set-guest-password script (Debian)
when: ansible_distribution == "Debian"
template: src=templates/Debian/cloud-set-guest-password-debian.j2 dest=/usr/share/cloudstack/cloudstack-set-guest-password mode=0755
- name: add cloud-set-guest-password script (Ubuntu)
when: ansible_distribution == "Ubuntu"
template: src=templates/Ubuntu/cloud-set-guest-password-ubuntu.j2 dest=/usr/share/cloudstack/cloudstack-set-guest-password mode=0755
- name: add cloud-set-guest-password script (FreeBSD)
when: ansible_os_family == "FreeBSD"
template: src=templates/FreeBSD/cloud-set-guest-password-freebsd.j2 dest=/usr/share/cloudstack/cloudstack_set_guest_password mode=0755
- name: setup cloudstack-set-guest-password (init)
when: upstart.stat.exists == false and systemd.stat.exists == false and ansible_os_family != "FreeBSD"
file: state=link src=/usr/share/cloudstack/cloudstack-set-guest-password dest=/etc/init.d/cloudstack-set-guest-password mode=0755 force=yes
- name: setup cloudstack-set-guest-password (upstart)
when: upstart.stat.exists == true and systemd.stat.exists == false and ansible_os_family != "FreeBSD"
template: src=templates/upstart/set-guest-password.upstart.j2 dest=/etc/init/cloudstack-set-guest-password.conf mode=0644
- name: setup cloudstack-set-guest-password (systemd)
when: upstart.stat.exists == false and systemd.stat.exists == true and ansible_os_family != "FreeBSD"
template: src=templates/systemd/set-guest-password.systemd.j2 dest=/usr/lib/systemd/system/cloudstack-set-guest-password.service mode=0644
- name: setup cloudstack-set-guest-password (FreeBSD)
when: upstart.stat.exists == false and systemd.stat.exists == false and ansible_os_family == "FreeBSD"
template: src=templates/FreeBSD/cloud-password-rc.j2 dest=/usr/local/etc/rc.d/cloudstack_set_guest_password mode=0755
- name: clear init legacy
when: ansible_os_family == "RedHat"
shell: chkconfig --del cloudstack-set-guest-password
ignore_errors: true