File tree Expand file tree Collapse file tree 9 files changed +33
-24
lines changed Expand file tree Collapse file tree 9 files changed +33
-24
lines changed Original file line number Diff line number Diff line change 23
23
python-version : ' 3.x'
24
24
25
25
- name : Install test dependencies
26
- run : pip install ansible-lint[community,yamllint]
26
+ run : |
27
+ pip install ansible-lint
28
+ ansible-galaxy install -r requirements.yml
27
29
28
30
- name : Lint code
29
31
run : |
43
45
matrix :
44
46
include :
45
47
- distro : debian8
46
- ansible-version : ' <2.10'
47
48
- distro : debian9
48
49
- distro : debian10
49
- - distro : ubuntu1604
50
- ansible-version : ' >=2.9, <2.10'
51
50
- distro : ubuntu1604
52
51
ansible-version : ' >=2.10, <2.11'
53
52
- distro : ubuntu1604
Original file line number Diff line number Diff line change 1
- FROM ubuntu:16 .04
1
+ FROM ubuntu:18 .04
2
2
MAINTAINER Mischa ter Smitten <
[email protected] >
3
3
4
+ ENV LANG C.UTF-8
5
+ ENV LC_ALL C.UTF-8
6
+
4
7
# python
5
8
RUN apt-get update && \
6
- DEBIAN_FRONTEND=noninteractive apt-get install -y python -minimal python -dev curl && \
9
+ DEBIAN_FRONTEND=noninteractive apt-get install -y python3 -minimal python3 -dev curl && \
7
10
apt-get clean
8
- RUN curl -sL https://bootstrap.pypa.io/pip/2.7 /get-pip.py | python -
11
+ RUN curl -sL https://bootstrap.pypa.io/pip/3.6 /get-pip.py | python3 -
9
12
RUN rm -rf $HOME/.cache
10
13
11
14
# ansible
12
- RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc libffi-dev libssl-dev && \
15
+ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-apt && \
13
16
apt-get clean
14
- RUN pip install ansible==2.9.15
17
+ RUN pip3 install ansible==2.10.7
15
18
RUN rm -rf $HOME/.cache
16
19
17
20
# provision
Original file line number Diff line number Diff line change 1
1
# meta file
2
2
---
3
3
galaxy_info :
4
- namespace : oefenweb
4
+ author : oefenweb
5
5
role_name : autossh_tunnel_server
6
- author : Mischa ter Smitten
7
6
company : Oefenweb.nl B.V.
8
7
description : Set up a persistent tunnel (using autossh) in Debian-like systems (server side)
9
8
license : MIT
10
- min_ansible_version : 2.9 .0
9
+ min_ansible_version : 2.10 .0
11
10
platforms :
12
11
- name : Ubuntu
13
12
versions :
Original file line number Diff line number Diff line change
1
+ ---
2
+ collections :
3
+ - name : community.docker
4
+ version : ' >=1.2.0,<2'
5
+ - name : community.general
6
+ version : ' >=2,<3'
Original file line number Diff line number Diff line change
1
+ # requirements file
2
+ ---
3
+ collections :
4
+ - name : ansible.posix
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
3
- name : add group
4
- group :
4
+ ansible.builtin. group :
5
5
name : " {{ item }}"
6
6
system : true
7
- with_flattened :
8
- - " {{ autossh_tunnel_server_group }}"
9
- - " {{ autossh_tunnel_server_groups }}"
7
+ with_items : " {{ [autossh_tunnel_server_group] + autossh_tunnel_server_groups }}"
10
8
tags :
11
9
- configuration
12
10
- autossh-tunnel-server
13
11
- autossh-tunnel-server-add-group
14
12
15
13
- name : add user
16
- user :
14
+ ansible.builtin. user :
17
15
name : " {{ autossh_tunnel_server_user }}"
18
16
system : true
19
17
group : " {{ autossh_tunnel_server_group }}"
25
23
- autossh-tunnel-server-add-user
26
24
27
25
- name : create authorized_keys from public key
28
- authorized_key :
26
+ ansible.posix. authorized_key :
29
27
user : " {{ autossh_tunnel_server_user }}"
30
28
key : " {{ lookup('file', item.src) }}"
31
29
state : " {{ item.state | default('present') }}"
Original file line number Diff line number Diff line change 1
1
# pre test file
2
2
---
3
3
- name : install dependencies
4
- apt :
4
+ ansible.builtin. apt :
5
5
name :
6
6
- openssh-client
7
7
state : " {{ apt_install_state | default('latest') }}"
8
8
cache_valid_time : " {{ apt_update_cache_valid_time | default(3600) }}"
9
9
10
10
- name : generate ssh key
11
- command : >
11
+ ansible.builtin. command : >
12
12
ssh-keygen -t rsa -b 2048 -C '' -P '' -f {{ autossh_tunnel_server_private_key_file }} -q
13
13
args :
14
14
creates : " {{ autossh_tunnel_server_private_key_file }}"
Original file line number Diff line number Diff line change 5
5
become : true
6
6
pre_tasks :
7
7
- name : include vars
8
- include_vars : " {{ playbook_dir }}/vars/main.yml"
8
+ ansible.builtin. include_vars : " {{ playbook_dir }}/vars/main.yml"
9
9
- name : include tasks
10
- include : " {{ playbook_dir }}/tasks/pre.yml"
10
+ ansible.builtin. include : " {{ playbook_dir }}/tasks/pre.yml"
11
11
roles :
12
12
- ../../
Original file line number Diff line number Diff line change 5
5
become : true
6
6
pre_tasks :
7
7
- name : include vars
8
- include_vars : " {{ playbook_dir }}/vars/main.yml"
8
+ ansible.builtin. include_vars : " {{ playbook_dir }}/vars/main.yml"
9
9
- name : include tasks
10
- include : " {{ playbook_dir }}/tasks/pre.yml"
10
+ ansible.builtin. include : " {{ playbook_dir }}/tasks/pre.yml"
11
11
roles :
12
12
- ../../
You can’t perform that action at this time.
0 commit comments