Skip to content

Commit

Permalink
fix ansible warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
merifri committed Jan 7, 2019
1 parent b6c66f0 commit 44f9dfe
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ mtproxy_config_update: True

ansible_become: yes
apt_cache_valid_time: 86400
remote_package_retries: 5
3 changes: 1 addition & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ galaxy_info:

license: MIT

min_ansible_version: 2.4
min_ansible_version: 2.6

platforms:
- name: Ubuntu
Expand All @@ -27,7 +27,6 @@ galaxy_info:
galaxy_tags:
- mtproxy
- mtproto
- telegram-proxy
- telegram

dependencies: []
17 changes: 10 additions & 7 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- include_vars: "{{ item }}"
- name: "include OS-specific variables"
include_vars: "{{ item }}"
with_first_found:
- "../vars/{{ ansible_os_family }}.yml"
- "../vars/os_defaults.yml"
Expand Down Expand Up @@ -32,20 +33,22 @@

- name: "install dependencies with apt"
apt:
name: "{{ item }}"
name: "{{ mtproxy_dependencies }}"
update_cache: yes
cache_valid_time: "{{ apt_cache_valid_time }}"
with_items:
- "{{ mtproxy_dependencies }}"
when: ansible_os_family == "Debian"
retries: "{{ remote_package_retries }}"
register: apt_result
until: apt_result is succeeded
tags: [mtproxy, mtproxy-install]

- name: "install dependencies with yum"
yum:
name: "{{ item }}"
with_items:
- "{{ mtproxy_dependencies }}"
name: "{{ mtproxy_dependencies }}"
when: ansible_os_family == "RedHat"
retries: "{{ remote_package_retries }}"
register: yum_result
until: yum_result is succeeded
tags: [mtproxy, mtproxy-install]

- name: "get source"
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile-centos7
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN yum -y install epel-release && \
yum -y install sudo python python-devel python-pip \
initscripts libffi-devel && \
pip install -q cffi && \
pip install -q ansible==2.5.2
pip install -q ansible==2.7.4

WORKDIR /tmp/ansible-role-mtproxy
COPY . /tmp/ansible-role-mtproxy
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile-debian9
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN apt-get update -qq && \
apt-get install -qq sudo python-apt python-pycurl python-pip python-dev \
libffi-dev && \
pip install -U setuptools && \
pip install -q ansible==2.5.2
pip install -q ansible==2.7.4

WORKDIR /tmp/ansible-role-mtproxy
COPY . /tmp/ansible-role-mtproxy
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile-ubuntu16.04
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN apt-get update -qq && \
apt-get install -qq sudo python-apt python-pycurl python-pip python-dev \
libffi-dev && \
pip install -U setuptools && \
pip install -q ansible==2.5.2
pip install -q ansible==2.7.4

WORKDIR /tmp/ansible-role-mtproxy
COPY . /tmp/ansible-role-mtproxy
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile-ubuntu18.04
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN apt-get update -qq && \
apt-get install -qq sudo python-apt python-pycurl python-pip python-dev \
libffi-dev && \
pip install -U setuptools && \
pip install -q ansible==2.5.2
pip install -q ansible==2.7.4

WORKDIR /tmp/ansible-role-mtproxy
COPY . /tmp/ansible-role-mtproxy
Expand Down

0 comments on commit 44f9dfe

Please sign in to comment.