Skip to content

Commit

Permalink
Merge pull request #26 from 0x0I/min_ansible_version
Browse files Browse the repository at this point in the history
update supported Ansible minimum version and apply refactorizations
  • Loading branch information
O1ahmad authored Feb 10, 2020
2 parents a450296 + 73bcd67 commit b5421d0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
2 changes: 2 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
state: stopped
enabled: false
listen: Uninstall service
ignore_errors: true

- name: Remove Lotus systemd service file
become: true
Expand All @@ -29,6 +30,7 @@
state: stopped
enabled: false
listen: Uninstall service
ignore_errors: true

- name: Remove Lotus storage miner systemd service file
become: true
Expand Down
10 changes: 4 additions & 6 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ transport:
provisioner:
hosts: test-kitchen
name: ansible_playbook
require_chef_for_busser: false
require_ruby_for_busser: false
require_pip: true
ansible_version: 2.9.4
ansible_verbose: true
ansible_cfg_path: test/ansible.cfg
requirements_path: test/requirements-test.yml
idempotency_test: true
require_chef_for_busser: false
require_ruby_for_busser: false

verifier:
name: inspec
Expand All @@ -46,17 +48,13 @@ platforms:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable sshd.service
- yum -y install python-pip
provisioner:
require_pip: true
- name: fedora-31
driver_config:
<<: *default_driver_config
provision_command:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable sshd.service
- yum -y install python-pip
provisioner:
require_pip: true
- name: ubuntu-18.04
driver_config:
<<: *default_driver_config
Expand Down
2 changes: 1 addition & 1 deletion tasks/common/install/archive_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
get_url:
url: "{{ archive_url }}"
dest: "/tmp/{{ archive_url | urlsplit('path') | basename }}"
checksum: "{{ checksum_format }}:{{ archive_checksum }}"
checksum: "{{ (archive_checksum|length > 0) | ternary(checksum_format+':'+archive_checksum, '') }}"
mode: '0775'
register: archive_tmp
tags:
Expand Down
3 changes: 1 addition & 2 deletions tasks/common/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
command: /bin/true
notify:
- Uninstall service
rescue:
always:
- name: Ensure flush of handlers
meta: flush_handlers
always:
- name: End play following uninstallation
meta: end_play
tags:
Expand Down
10 changes: 0 additions & 10 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
tags:
- preflight

- name: Include OS and distribution specific installation tasks.
include_tasks: "{{ item }}"
with_first_found:
- files:
- "{{ ansible_distribution|lower }}/install.yml"
- "{{ ansible_os_family|lower }}/install.yml"
skip: true
tags:
- install

- name: Include common installation tasks
include_tasks: "common/install.yml"
tags:
Expand Down

0 comments on commit b5421d0

Please sign in to comment.