Skip to content

Commit

Permalink
fix issues found by ansible-lint 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Dec 24, 2018
1 parent 9d08bd4 commit 978bf80
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ script:
done
# Check Ansible playbooks
- ansible-playbook -i 'localhost,' --syntax-check ansible/*.yml
- ansible-lint -x ANSIBLE0010 ansible/*.yml
- ansible-lint -x 204,403 ansible/*.yml
8 changes: 8 additions & 0 deletions ansible/build_remote_ssh_fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
- name: Install libselinux-python needed for Fedora
dnf:
name: libselinux-python
register: result
until: result is succeeded

- name: Disable SELinux
selinux:
Expand All @@ -57,11 +59,15 @@
dnf:
name: "{{ item }}"
with_items: "{{ rpmfusion_repositories }}"
register: result
until: result is succeeded

- name: Upgrade all packages
dnf:
name: "*"
state: latest
register: result
until: result is succeeded

- name: Check if reboot is necessary
shell: if [ "$(rpm -q --last kernel-core | awk 'NR==1 {sub(/kernel-core-/,""); print $1}')" != "$(uname -r)" ]; then echo 'reboot'; fi
Expand Down Expand Up @@ -93,6 +99,8 @@
dnf:
name: "{{ item }}"
with_items: "{{ packages }}"
register: result
until: result is succeeded

- name: Download and unzip packer
unarchive:
Expand Down
8 changes: 8 additions & 0 deletions ansible/build_remote_ssh_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
apt:
upgrade: dist
update_cache: yes
register: result
until: result is succeeded

- name: Get latest version of Vagrant
uri:
Expand All @@ -48,16 +50,22 @@
- name: Install Vagrant
apt:
deb: "https://releases.hashicorp.com/vagrant/{{ vagrant_uri.json.current_version }}/vagrant_{{ vagrant_uri.json.current_version }}_{{ ansible_architecture }}.deb"
register: result
until: result is succeeded

- name: Install packages
apt:
name: "{{ item }}"
loop: "{{ packages }}"
register: result
until: result is succeeded

# python-winrm for python2 is not part of ubuntu
- name: Instal pywinrm
pip:
name: pywinrm
register: result
until: result is succeeded

- name: Add the current user "{{ ansible_user_id }}" to kvm group
user:
Expand Down

0 comments on commit 978bf80

Please sign in to comment.