Fetch module examples.
$ ae systemd
## Examples
- name: Make sure a service unit is running
ansible.builtin.systemd:
state: started
name: httpd
- name: Stop service cron on debian, if running
ansible.builtin.systemd:
name: cron
state: stopped
- name: Restart service cron on centos, in all cases, also issue daemon-reload to pick up
config changes
ansible.builtin.systemd:
state: restarted
daemon_reload: yes
name: crond
- name: Reload service httpd, in all cases
ansible.builtin.systemd:
name: httpd.service
state: reloaded
- Install
html-xml-utils
andglow
:
paru -S html-xml-utils
sudo pacman -S glow
- Install
html2md
: Use bundledhtml2md
or build from sources (rust required):
git clone https://gitlab.com/Kanedias/html2md.git
cargo build --release
- Install ansible example script:
Copy ae.sh
in ~/bin
and append this path to $PATH
.
sudo cp html2md /usr/local/bin/
Create alias in ~/.bashrc
:
alias ae="~/bin/ae.sh"
- Check if module page present in file cache
- If not present - download into file
- Read html, normalize code, select 'Examples' section
- Convert html to markdown and create file cache
- Render markdown with glow