readme updoots
Jes Olson j3s@c3f.net
Tue, 27 Sep 2022 21:15:01 -0500
1 files changed,
15 insertions(+),
41 deletions(-)
jump to
M
README
→
README
@@ -277,58 +277,32 @@ - the repo is re-cloned on every run *shrug*
BONUS SECTION! :3 :3 <3 :3 - common config management patterns to zoa + common config management patterns in zoa -### install a package, -### but only if the distro is debian +### install a package - zoa -if [ "$DISTRO" = "debian" ]; then +(this is distro dependent) +apt update +apt install -y cowsay + +### install a package, but only if the distro is debian + +if [ "$OS_RELEASE_ID" = "debian" ]; then apt install -y cowsay fi - - ansible -- name: add package - when: ansible_facts['os_family'] == "Debian" - package: - name: 'cowsay' - state: present -### place sshd_config, -### and reload ssh when it changes - ansible -# handlers/main.yml -- name: restart-sshd - service: - name: sshd - state: restarted - -# tasks/main.yml -- name: Configure sshd - template: - src: sshd_config.j2 - dest: /etc/ssh/sshd_config - owner: root - group: root - mode: 0644 - notify: restart-sshd +### place sshd_config, and reload ssh when it changes - zoa zoa-file sshd /etc/ssh/sshd_config systemctl restart sshd chown root:root /etc/ssh/sshd_config chmod 0644 /etc/ssh/sshd_config ### append an iptables rule to the input chain - ansible -- name: do the thing - iptables: - chain: INPUT - protocol: tcp - destination_port: '22' - ctstate: NEW - syn: match - jump: ACCEPT - zoa rule='INPUT --protocol tcp --dport 69 --jump ACCEPT' iptables --check $rule || iptables --append $rule + +### clone a remote git repo, pull it constantly + +git clone git@git.sr.ht:~example/example /opt/repo || + git fetch /opt/repo