-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
282 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
exclude_paths: | ||
./.travis.yml | ||
tests/* | ||
- tests/* | ||
- .github/** | ||
skip_list: | ||
- name[template] | ||
- command-instead-of-shell # Use shell only when shell functionality is required. | ||
- no-changed-when # Commands should not change things if nothing needs doing. | ||
- package-latest # Package installs should not use latest. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tasks/ssh_client_config.yml no-changed-when | ||
tasks/create_routes_dns.yml no-changed-when | ||
tasks/create_routes_lb.yml no-changed-when | ||
tasks/create_routes_cidr.yml no-changed-when | ||
tasks/configure_sysctl.yml no-changed-when | ||
tasks/configure_sysctl.yml command-instead-of-shell | ||
tasks/install.yml no-changed-when | ||
tasks/install.yml package-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
exclude_paths: | ||
- tests/* | ||
- .github/** | ||
skip_list: | ||
- name[template] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tasks/ssh_client_config.yml no-changed-when | ||
tasks/create_routes_dns.yml no-changed-when | ||
tasks/create_routes_lb.yml no-changed-when | ||
tasks/create_routes_cidr.yml no-changed-when | ||
tasks/configure_sysctl.yml no-changed-when | ||
tasks/configure_sysctl.yml command-instead-of-shell | ||
tasks/install.yml no-changed-when | ||
tasks/install.yml package-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
patreon: papanito | ||
custom: https://flattr.com/@papanito | ||
custom: https://flattr.com/@papanito |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
--- | ||
# handlers file for cloudflared | ||
# handlers file for cloudflared | ||
- name: Reload systemd | ||
ansible.builtin.systemd: | ||
daemon_reload: true | ||
no_block: false | ||
|
||
- name: Link Stop-Script | ||
ansible.builtin.file: | ||
src: "/etc/init.d/{{ systemd_filename }}-{{ tunnel_name }}" | ||
path: "/etc/{{ item_runlevel }}/K01{{ systemd_filename }}-{{ tunnel_name }}" | ||
state: link | ||
with_items: | ||
- rc0.d | ||
- rc1.d | ||
- rc6.d | ||
loop_control: | ||
loop_var: item_runlevel | ||
|
||
- name: Link Start-Script | ||
ansible.builtin.file: | ||
src: "/etc/init.d/{{ systemd_filename }}-{{ tunnel_name }}" | ||
path: "/etc/{{ item_runlevel }}/S99{{ systemd_filename }}-{{ tunnel_name }}" | ||
state: link | ||
with_items: | ||
- rc2.d | ||
- rc3.d | ||
- rc4.d | ||
- rc5.d | ||
loop_control: | ||
loop_var: item_runlevel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,19 @@ | ||
--- | ||
- name: Define required variables for configure | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
tunnel_name: "{{ item.key }}" | ||
initv_pid_file: "/var/run/{{ systemd_filename }}_{{ tunnel_name }}.pid" | ||
initv_log_file: "/var/log/{{ systemd_filename }}_{{ tunnel_name }}.log" | ||
|
||
- name: Install cloudflared service for service '{{ tunnel_name }}' in System-V | ||
- name: Install cloudflare system-v service for service '{{ tunnel_name }}' | ||
ansible.builtin.template: | ||
src: cloudflared.initv.j2 | ||
dest: "/etc/init.d/{{ systemd_filename }}-{{ tunnel_name }}" | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
mode: "755" | ||
register: service_template | ||
no_log: True | ||
|
||
- name: Link Stop-Script to /etc/init.d/"{{ systemd_filename }}-{{ tunnel_name }}" | ||
ansible.builtin.file: | ||
src: "/etc/init.d/{{ systemd_filename }}-{{ tunnel_name }}" | ||
path: "/etc/{{ item_runlevel }}/K01{{ systemd_filename }}-{{ tunnel_name }}" | ||
state: link | ||
with_items: | ||
- rc0.d | ||
- rc1.d | ||
- rc6.d | ||
loop_control: | ||
loop_var: item_runlevel | ||
when: service_template.changed | ||
|
||
- name: "Link Start-Script /etc/init.d/{{ systemd_filename }}-{{ tunnel_name }}" | ||
ansible.builtin.file: | ||
src: "/etc/init.d/{{ systemd_filename }}-{{ tunnel_name }}" | ||
path: "/etc/{{ item_runlevel }}/S99{{ systemd_filename }}-{{ tunnel_name }}" | ||
state: link | ||
with_items: | ||
- rc2.d | ||
- rc3.d | ||
- rc4.d | ||
- rc5.d | ||
loop_control: | ||
loop_var: item_runlevel | ||
when: service_template.changed | ||
no_log: true | ||
notify: | ||
- Link Stop-Script | ||
- Link Start-Script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
- name: Register OS uname | ||
shell: uname | ||
ansible.builtin.shell: uname | ||
register: os_uname | ||
|
||
- name: "Change sysctl-settings net.core.rmem_max=2500000 (uname: {{ os_uname.stdout }})" | ||
sysctl: | ||
- name: "Change sysctl-settings net.core.rmem_max=2500000 (uname: {{ os_uname.stdout }})" | ||
ansible.posix.sysctl: | ||
name: net.core.rmem_max | ||
value: 2500000 | ||
sysctl_set: yes | ||
sysctl_set: true | ||
state: present | ||
reload: yes | ||
ignoreerrors: yes | ||
reload: true | ||
ignoreerrors: true | ||
when: os_uname.stdout == "Linux" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
- name: Define required variables for configure | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
tunnel_name: "{{ cf_tunnel.key }}" | ||
|
||
- name: Install cloudflared service for service '{{ tunnel_name }}' in systemd | ||
ansible.builtin.template: | ||
src: cloudflared.service.j2 | ||
dest: "{{ cf_systemd_target_dir }}/{{ systemd_filename }}@.service" | ||
mode: "644" | ||
register: service_template | ||
no_log: True | ||
|
||
- name: Reload systemd | ||
ansible.builtin.systemd: | ||
daemon_reload: yes | ||
no_block: no | ||
when: service_template.changed | ||
no_log: true | ||
notify: | ||
- Reload systemd |
Oops, something went wrong.