File tree Expand file tree Collapse file tree 15 files changed +51
-34
lines changed Expand file tree Collapse file tree 15 files changed +51
-34
lines changed Original file line number Diff line number Diff line change 11---
22warn_list:
33 - role-name
4+ - name[play]
45 - name[casing]
5- - '503'
6+ - no-handler
Original file line number Diff line number Diff line change 2323 python-version : ' 3.x'
2424
2525 - 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
2729
2830 - name : Lint code
2931 run : |
4345 matrix :
4446 include :
4547 - distro : debian8
46- ansible-version : ' <2.10'
4748 - distro : debian9
4849 - distro : debian10
49- - distro : ubuntu1604
50- ansible-version : ' >=2.9, <2.10'
5150 - distro : ubuntu1604
5251 ansible-version : ' >=2.10, <2.11'
5352 - distro : ubuntu1604
7372 molecule test
7473 env :
7574 ANSIBLE_FORCE_COLOR : ' 1'
76- ANSIBLE_VERBOSITY : ' 3 '
75+ ANSIBLE_VERBOSITY : ' 2 '
7776 MOLECULE_DEBUG : ' 1'
7877 MOLECULE_DISTRO : " ${{ matrix.distro }}"
7978 PY_COLORS : ' 1'
Original file line number Diff line number Diff line change 1- FROM ubuntu:16 .04
1+ FROM ubuntu:18 .04
22MAINTAINER Mischa ter Smitten <mtersmitten@oefenweb.nl>
33
4+ ENV LANG C.UTF-8
5+ ENV LC_ALL C.UTF-8
6+
47# python
58RUN 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 && \
710 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 -
912RUN rm -rf $HOME/.cache
1013
1114# 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 && \
1316 apt-get clean
14- RUN pip install ansible==2.9.15
17+ RUN pip3 install ansible==2.10.7
1518RUN rm -rf $HOME/.cache
1619
1720# provision
Original file line number Diff line number Diff line change 11# handlers file
22---
33- name : reload ufw
4- ufw :
4+ community.general. ufw :
55 state : reloaded
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ galaxy_info:
77 company : Oefenweb.nl B.V.
88 description : Set up ufw in Debian-like systems
99 license : MIT
10- min_ansible_version : 2.9 .0
10+ min_ansible_version : 2.10 .0
1111 platforms :
1212 - name : Ubuntu
1313 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 44 become : true
55 pre_tasks :
66 - name : include vars
7- include_vars : " {{ playbook_dir }}/../../tests/vars/main.yml"
7+ ansible.builtin. include_vars : " {{ playbook_dir }}/../../tests/vars/main.yml"
88 roles :
99 - ../../../
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ platforms:
88 image : " geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1604}-ansible:latest"
99 command : ${MOLECULE_DOCKER_COMMAND:-""}
1010 volumes :
11- - /sys/fs/cgroup:/sys/fs/cgroup:ro
11+ - /sys/fs/cgroup:/sys/fs/cgroup:rw
12+ - /var/lib/containerd
13+ cgroupns_mode : host
1214 privileged : true
1315 pre_build_image : true
14- capabilities :
15- - NET_ADMIN
1616provisioner :
1717 name : ansible
1818 playbooks :
Original file line number Diff line number Diff line change 1+ # requirements file
2+ ---
3+ collections :
4+ - name : community.general
5+ - name : ansible.posix
Original file line number Diff line number Diff line change 11# tasks file
22---
33- name : configure | create (local facts) directory
4- file :
4+ ansible.builtin. file :
55 path : /etc/ansible/facts.d/
66 state : directory
77 owner : root
1111 - ufw-configure-facts
1212
1313- name : configure | update configuration file(s)
14- template :
14+ ansible.builtin. template :
1515 src : " {{ item.src }}"
1616 dest : " {{ item.dest }}"
1717 owner : root
2727 - ufw-configure-facts
2828
2929- name : configure | reset
30- ufw :
30+ community.general. ufw :
3131 state : reset
3232 when : configuration is changed
3333 tags :
3434 - ufw-configure-reset
3535
3636- name : configure | default (incoming) policy
37- ufw :
37+ community.general. ufw :
3838 policy : " {{ ufw_default_incoming_policy }}"
3939 direction : incoming
4040 notify : reload ufw
4343 - ufw-configure-default-policy-incoming
4444
4545- name : configure | default (outgoing) policy
46- ufw :
46+ community.general. ufw :
4747 policy : " {{ ufw_default_outgoing_policy }}"
4848 direction : outgoing
4949 notify : reload ufw
5252 - ufw-configure-default-policy-outgoing
5353
5454- name : configure | rules
55- ufw :
55+ community.general. ufw :
5656 rule : " {{ item.rule }}"
5757 interface : " {{ item.interface | default('') }}"
5858 direction : " {{ item.direction | default('in') }}"
7070 - ufw-configure-rules
7171
7272- name : configure | logging
73- ufw :
73+ community.general. ufw :
7474 logging : " {{ ufw_logging }}"
7575 notify : reload ufw
7676 tags :
You can’t perform that action at this time.
0 commit comments