Fix ansible-lint test failures for ironic

With the merge of https://review.openstack.org/520177 in the
tests repo some ansible-lint failures which previously were
not being picked up are now detected.

Change-Id: I76157ccedfbcb8b0c2cba852bfa6b78ba6981c6c
This commit is contained in:
Jesse Pretorius 2017-11-24 11:07:49 +00:00
parent 2690270a75
commit f227693bf5
1 changed files with 8 additions and 1 deletions

View File

@ -35,10 +35,12 @@
use: "{{ ansible_pkg_mgr }}"
delegate_to: "{{ physical_host }}"
run_once: true
- name: Ensure xfsprogs is installed on containers
package:
name: xfsprogs
state: present
- name: Openstack directory Create
file:
state: directory
@ -46,8 +48,9 @@
with_items:
- 'swift1'
- 'swift2'
- name: Create sparse Swift files
shell: "truncate -s 1024G /opt/{{container_name}}_{{ item }}.img"
command: "truncate -s 1024G /opt/{{container_name}}_{{ item }}.img"
args:
creates: "/opt/{{ container_name}}_{{ item }}.img"
with_items:
@ -55,6 +58,7 @@
- 'swift2'
register: swift_create
delegate_to: "{{ physical_host }}"
- name: Format the Swift files
filesystem:
fstype: xfs
@ -65,6 +69,7 @@
- 'swift1'
- 'swift2'
delegate_to: "{{ physical_host }}"
- name: Create the Swift fstab entries and mount the file systems
mount:
name: "/srv/{{ container_name }}_{{ item }}"
@ -82,6 +87,7 @@
retries: 5
delay: 2
delegate_to: "{{ physical_host }}"
- name: Swift extra lxc config
lxc_container:
name: "{{ container_name }}"
@ -89,6 +95,7 @@
- "lxc.mount.entry=/srv/{{ container_name }}_swift1 openstack/swift1 none bind 0 0"
- "lxc.mount.entry=/srv/{{ container_name }}_swift2 openstack/swift2 none bind 0 0"
delegate_to: "{{ physical_host }}"
- name: Wait for container connectivity
wait_for_connection:
connect_timeout: "{{ lxc_container_wait_params.connect_timeout | default(omit) }}"