Commit 37da548a authored by nanahira's avatar nanahira

setcap

parent 83560db3
...@@ -34,6 +34,30 @@ ...@@ -34,6 +34,30 @@
name: vm.swappiness name: vm.swappiness
value: 1 value: 1
sysctl_set: true sysctl_set: true
- name: net.ipv4.ip_forward
become: true
sysctl:
name: net.ipv4.ip_forward
value: 1
sysctl_set: true
- name: fs.inotify.max_user_watches
become: true
sysctl:
name: fs.inotify.max_user_watches
value: 524288
sysctl_set: true
- name: net.ipv4.conf.all.rp_filter
become: true
sysctl:
name: net.ipv4.conf.all.rp_filter
value: 0
sysctl_set: true
- name: net.ipv4.conf.default.rp_filter
become: true
sysctl:
name: net.ipv4.conf.default.rp_filter
value: 0
sysctl_set: true
- name: TCP BBR - name: TCP BBR
become: true become: true
sysctl: sysctl:
...@@ -61,11 +85,26 @@ ...@@ -61,11 +85,26 @@
update_cache: true update_cache: true
upgrade: dist upgrade: dist
when: "ansible_distribution != 'CentOS'" when: "ansible_distribution != 'CentOS'"
- name: yum update
become: true
yum:
name: '*'
update_cache: true
state: latest
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 7"
- name: dnf update
become: true
dnf:
name: '*'
#update_cache: true
state: latest
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 8"
- name: fixup iptables with qemu - name: fixup iptables with qemu
become: true become: true
iptables: iptables:
chain: FORWARD chain: FORWARD
flush: true flush: true
when: 'hypervisor is defined'
- name: apt - name: apt
become: true become: true
apt: apt:
...@@ -92,13 +131,6 @@ ...@@ -92,13 +131,6 @@
apt: apt:
autoremove: true autoremove: true
when: "ansible_distribution != 'CentOS'" when: "ansible_distribution != 'CentOS'"
- name: yum update
become: true
yum:
name: '*'
update_cache: true
state: latest
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 7"
- name: epel 7 - name: epel 7
become: true become: true
yum: yum:
...@@ -116,13 +148,6 @@ ...@@ -116,13 +148,6 @@
# yum: # yum:
# autoremove: true # autoremove: true
# when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7" # when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7"
- name: dnf update
become: true
dnf:
name: '*'
#update_cache: true
state: latest
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 8"
- name: epel 8 - name: epel 8
become: true become: true
dnf: dnf:
......
...@@ -98,6 +98,10 @@ ...@@ -98,6 +98,10 @@
- name: nodejs version - name: nodejs version
become: true become: true
shell: n 12 shell: n 12
- name: node setcap
become: true
with_items: ['/usr/bin/node', '/usr/local/bin/node']
shell: 'setcap cap_net_bind_service=+eip {{item}}'
- name: npm - name: npm
become: true become: true
with_items: with_items:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment