Skip to content

Commit

Permalink
Fix the variable syntax, to comply with new syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
sac committed Jun 22, 2016
1 parent 03dd017 commit ceba489
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 21 deletions.
10 changes: 5 additions & 5 deletions playbooks/auto_lvcreate_for_gluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
lv: action=create lvname=metadata compute=metadata_compute lvtype='thick'
snapshot_reserve="{{ snapshot_reserve }}"
vgname={{ item }}
with_items: vgs
with_items: "{{ vgs }}"
ignore_errors: yes

- name: create data LV that has a size which is a multiple of stripe width
lv: action=create lvname={{ item.pool }} lvtype='thick'
compute=poolsize_compute vgname={{ item.vg }}
snapshot_reserve="{{ snapshot_reserve }}"
with_items: lvpools
with_items: "{{ lvpools }}"
ignore_errors: yes

- name: Convert the logical volume
Expand All @@ -25,18 +25,18 @@
diskcount="{{ diskcount }}"
stripesize="{{stripesize}}"
snapshot_reserve="{{ snapshot_reserve }}"
with_items: lvpools
with_items: "{{ lvpools }}"
ignore_errors: yes

- name: create stripe-aligned thin volume
lv: action=create poolname={{ item.pool }} lvtype="thinlv"
compute=rhs disktype="{{ disktype }}"
vgname={{ item.vg }} lvname={{ item.lv }}
snapshot_reserve="{{ snapshot_reserve }}"
with_items: lvpools
with_items: "{{ lvpools }}"
ignore_errors: yes

- name: Change the attributes of the logical volume
lv: action=change zero=n vgname={{ item.vg }} lvname={{ item.pool }}
with_items: lvpools
with_items: "{{ lvpools }}"
ignore_errors: yes
4 changes: 2 additions & 2 deletions playbooks/client_volume_umount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
- name: Unmount the volumes
mount: name={{ item }} src="{{ mountpoint }}" fstype=glusterfs
state=absent
with_items: mountpoint
with_items: "{{ mountpoint }}"

- name: Delete the mount points
file: path={{ item }} state=absent
with_items: mountpoint
with_items: "{{ mountpoint }}"
2 changes: 1 addition & 1 deletion playbooks/create-brick-dirs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
tasks:
- name: Create the brick dirs, skips if present
file: path={{ item }} state=directory
with_items: brick_dirs
with_items: "{{ brick_dirs }}"

2 changes: 1 addition & 1 deletion playbooks/fscreate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
- name: Create a xfs filesystem
filesystem: fstype="{{ fstype }}" dev={{ item }}
opts="{{ opts }}"
with_items: lvols
with_items: "{{ lvols }}"
2 changes: 1 addition & 1 deletion playbooks/gluster-client-cifs-mount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
state=mounted
when: item.fstype == 'cifs'

with_items: client_mounts
with_items: "{{ client_mounts }}"

2 changes: 1 addition & 1 deletion playbooks/gluster-client-fuse-mount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
state=mounted
when: item.fstype == 'fuse'

with_items: client_mounts
with_items: "{{ client_mounts }}"

2 changes: 1 addition & 1 deletion playbooks/gluster-client-nfs-mount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
state=mounted
when: item.fstype == 'nfs'

with_items: client_mounts
with_items: "{{ client_mounts }}"
2 changes: 1 addition & 1 deletion playbooks/lvcreate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
chunksize="{{ chunksize }}" poolmetadatasize="{{ poolmetadatasize }}"
poolname={{ item.lv }}
pvname="{{ pvname }}"
with_items: lvnamelist
with_items: "{{ lvnamelist }}"
2 changes: 1 addition & 1 deletion playbooks/mount-in-samba-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
opts=acl,
state=mounted

with_items: smb_mountpoint
with_items: "{{ smb_mountpoint }}"

- name: Provide permissions using setfacl
command: setfacl -m user:"{{ smb_username }}":rwx "{{smb_mountpoint}}"
5 changes: 2 additions & 3 deletions playbooks/mount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
tasks:
- name: Create the backend disks, skips if present
file: path={{ item.path }} state=directory
with_items: mntpath
with_items: "{{ mntpath }}"

- name: Mount the volumes
mount: name={{ item.path }} src={{ item.device }} fstype=xfs
opts="inode64,noatime,nodiratime" state=mounted

with_items: mntpath
with_items: "{{ mntpath }}"
2 changes: 1 addition & 1 deletion playbooks/pvcreate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
- name: Create Physical Volume
pv: action=create disks={{ item }}
options="--dataalignment {{ dalign }}k"
with_items: bricks
with_items: "{{ bricks }}"
register: result
failed_when: "result.rc != 0 and 'Physical Volume Exists' not in result.msg"
2 changes: 1 addition & 1 deletion playbooks/service_management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
tasks:
- name: start/stop/restart/reload services
service: name={{ item }} state="{{ state }}"
with_items: service
with_items: "{{ service }}"

2 changes: 1 addition & 1 deletion playbooks/vgcreate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
disktype="{{ disktype }}"
stripesize="{{ stripesize }}"
dalign="{{ dalign }}"
with_items: vgnames
with_items: "{{ vgnames }}"
register: result
failed_when: "result.rc != 0 and 'already exists' not in result.msg and 'is already in volume group' not in result.msg"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ansible==1.9.2
ansible==2.1
ecdsa==0.13
Jinja2==2.7.3
MarkupSafe==0.23
Expand Down

0 comments on commit ceba489

Please sign in to comment.