Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase
uses: actions/checkout@v3
uses: actions/checkout@v5

- name: Set up Python 3
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: '3.x'
python-version: '3 - 3.13'

- name: Install test dependencies
run: |
Expand All @@ -44,27 +44,24 @@ jobs:
fail-fast: false
matrix:
include:
- distro: debian8
- distro: debian9
- distro: debian10
- distro: ubuntu1604
ansible-version: '>=2.10, <2.11'
- distro: ubuntu1604
ansible-version: '>=9, <10'
- distro: ubuntu1804

ansible-version: '>=9, <10'
steps:
- name: Check out the codebase
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
path: "${{ github.repository }}"

- name: Set up Python 3
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: '3.x'
python-version: '3 - 3.13'

- name: Install test dependencies
run: pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker
run: |
pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker

- name: Run Molecule tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase
uses: actions/checkout@v3
uses: actions/checkout@v5

- name: Publish to Galaxy
uses: robertdebock/galaxy-action@1.2.0
Expand Down
6 changes: 1 addition & 5 deletions molecule/default/collections.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
---
collections:
- name: community.docker
version: '>=1.2.0,<2'
- name: community.general
version: '>=2,<3'
collections: []
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ driver:
name: docker
platforms:
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1604}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
4 changes: 2 additions & 2 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tasks file
---
- name: configure | stat directories

Check warning on line 3 in tasks/configure.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.stat:
path: "{{ item }}/"
register: _stat_directories
Expand All @@ -10,13 +10,13 @@
- twisted-connect-proxy-configure-directories
- twisted-connect-proxy-configure-directories-stat

- name: configure | create directories

Check warning on line 13 in tasks/configure.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.file:
path: "{{ item.item }}"
state: directory
owner: "{{ twisted_connect_proxy_user }}"
group: "{{ twisted_connect_proxy_group }}"
mode: 0755
mode: '0755'
with_items: "{{ _stat_directories.results }}"
when:
- item.stat is defined
Expand All @@ -25,13 +25,13 @@
- twisted-connect-proxy-configure-directories
- twisted-connect-proxy-configure-directories-create

- name: configure | update configuration file(s)

Check warning on line 28 in tasks/configure.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: 0644
mode: '0644'
with_items:
- src: "{{ twisted_connect_proxy_etc_default_file.lstrip('/') }}.j2"
dest: "{{ twisted_connect_proxy_etc_default_file }}"
Expand Down
4 changes: 2 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
state: directory
owner: root
group: root
mode: 0755
mode: '0755'
tags:
- twisted-connect-proxy-install-download
- twisted-connect-proxy-install-download-directory
Expand All @@ -26,7 +26,7 @@
dest: "{{ twisted_connect_proxy_downloads_path }}/server.py"
owner: root
group: root
mode: 0755
mode: '0755'
force: true
notify: restart twisted-connect-proxy
tags:
Expand Down
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
- name: facts | set
ansible.builtin.set_fact:
is_docker_guest: "{{ ansible_virtualization_role | default('host') == 'guest' and ansible_virtualization_type | default('none') == 'docker' }}"
is_docker_guest: "{{ ansible_facts['virtualization_role'] | default('host') == 'guest' and ansible_facts['virtualization_type'] | default('none') == 'docker' }}"
tags:
- configuration
- twisted-connect
Expand Down Expand Up @@ -49,13 +49,13 @@
block:
- name: service upstart
ansible.builtin.import_tasks: service-upstart.yml
when: ansible_service_mgr != 'systemd'
when: ansible_facts['service_mgr'] != 'systemd'
tags:
- twisted-connect-service-upstart

- name: service systemd
ansible.builtin.import_tasks: service-systemd.yml
when: ansible_service_mgr == 'systemd'
when: ansible_facts['service_mgr'] == 'systemd'
tags:
- twisted-connect-service-systemd

Expand Down
2 changes: 1 addition & 1 deletion tasks/service-initd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
dest: "{{ twisted_connect_proxy_etc_init_d_file }}"
owner: root
group: root
mode: 0755
mode: '0755'
notify: restart twisted-connect-proxy
tags:
- twisted-connect-proxy-service-initd-update
2 changes: 1 addition & 1 deletion tasks/service-systemd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
dest: "{{ twisted_connect_proxy_etc_systemd_file }}"
owner: root
group: root
mode: 0644
mode: '0644'
register: _update_systemd_script
notify: restart twisted-connect-proxy
tags:
Expand Down
2 changes: 1 addition & 1 deletion tasks/service-upstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
dest: "{{ twisted_connect_proxy_etc_init_file }}"
owner: root
group: root
mode: 0644
mode: '0644'
notify: restart twisted-connect-proxy
tags:
- twisted-connect-proxy-service-upstart-update
2 changes: 1 addition & 1 deletion tests/tasks/post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- name: test proxy installation # noqa command-instead-of-module
ansible.builtin.command: >
curl -sL --head https://www.google.com --proxy http://{{ ansible_lo['ipv4']['address'] }}:{{ twisted_connect_proxy_port }}
curl -sL --head https://www.google.com --proxy http://{{ ansible_facts['lo']['ipv4']['address'] }}:{{ twisted_connect_proxy_port }}
register: _result
changed_when: false
failed_when: _result.stdout.find('HTTP/1.1 200 CONNECT OK') == -1
Expand Down
3 changes: 2 additions & 1 deletion tests/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# test file
---
- hosts: localhost
- name: converge
hosts: localhost
connection: local
become: true
pre_tasks:
Expand Down
3 changes: 2 additions & 1 deletion tests/vagrant.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# test file
---
- hosts: all
- name: converge
hosts: all
remote_user: vagrant
become: true
pre_tasks:
Expand Down
Loading