Skip to content

Commit bb3d554

Browse files
committed
[role] Improve syntax and conditions
1 parent bd44c74 commit bb3d554

File tree

8 files changed

+13
-11
lines changed

8 files changed

+13
-11
lines changed

defaults/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ corosync_node_list:
99
- ctrl01
1010
- ctrl02
1111
- ctrl03
12-
corosync_transport: 'udpu'
12+
corosync_transport: udpu
1313
corosync_interfaces:
1414
- bindnetaddr: 192.168.56.0
1515
mcastport: 5405

handlers/main.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
# file: roles/corosync/handlers/main.yml
3-
- name: Restart Corosync
3+
- name: restart corosync
44
service:
55
name=corosync
66
state=restarted
7-
enabled=yes

tasks/backport.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
state=present
77
update_cache=yes
88

9-
- name: Install Corosync packages (Debian Jessie only)
9+
- name: Installing Corosync package (Debian Jessie only)
1010
apt:
1111
name=corosync
1212
state=latest

tasks/configuration.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
template:
55
src=etc/corosync/corosync.conf.j2
66
dest=/etc/corosync/corosync.conf
7-
notify: Restart Corosync
7+
notify: restart corosync
88

9-
- name: Starting Corosync service
9+
- name: Making sure that Corosync service is started
1010
service:
1111
name=corosync
1212
state=started

tasks/firewall.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
permanent=true
77
state=enabled
88
immediate=true
9-
with_items:
10-
- "{{ corosync_interfaces }}"
9+
with_items: "{{ corosync_interfaces }}"

tasks/install.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
22
# file: roles/corosync/tasks/install.yml
3-
- name: Install Corosync packages
3+
- name: Installing Corosync package
44
package:
55
name=corosync
66
state=latest
7-
when: ansible_distribution_release != 'jessie'
7+
when: ansible_distribution_release != 'jessie' and
8+
corosync_debian_backports is defined and
9+
corosync_debian_backports
810

9-
- name: Enable Corosync service
11+
- name: Enabling Corosync service
1012
service:
1113
name=corosync
1214
enabled=yes

tasks/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
corosync_haveged
1616

1717
- include: firewall.yml
18+
tags: [ corosync, corosync-firewall ]
1819
when: corosync_firewalld is defined and
1920
corosync_firewalld
2021

vars/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
# file: roles/corosync/vars/main.yml
33
corosync_apt_backports: "deb http://ftp.debian.org/debian jessie-backports main"
44
corosync_default_release: jessie-backports
5+
corosync_tmp_authkey: /tmp/authkey

0 commit comments

Comments
 (0)