feat(actions): Adds actions & lint (#1)
All checks were successful
Master branch: build & lint / build (push) Successful in 1m0s
All checks were successful
Master branch: build & lint / build (push) Successful in 1m0s
Adds an action to perform some linting actions on ansible and the yaml files, both on push onto master and on pull requests Reviewed-on: #1
This commit is contained in:
parent
9dc88072d5
commit
93bb0b0742
18 changed files with 306 additions and 39 deletions
|
@ -13,7 +13,7 @@
|
|||
# the packages you want to install just as you would pass them
|
||||
# to `apt install`.
|
||||
- name: "Install wanted packages"
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- apt-transport-https
|
||||
- arptables
|
||||
|
@ -70,7 +70,7 @@
|
|||
- zip
|
||||
# state: latest will update the package everytime the
|
||||
# role is ran against a host
|
||||
state: latest
|
||||
state: present
|
||||
# Update the cache before trying to update ?
|
||||
# You generally want this because it's not updating itself
|
||||
update_cache: true
|
||||
|
@ -82,7 +82,7 @@
|
|||
until: apt_res is success
|
||||
# Same as above, except you *remove* packages instead of installing them
|
||||
- name: "Remove unanted packages"
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- ntpdate
|
||||
# note the value of `state` here
|
||||
|
@ -91,7 +91,7 @@
|
|||
# that is golbally available. It will map to the hostname you
|
||||
# assigned your host in the `inventory` file
|
||||
- name: "Hard set hostname"
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: hostname.j2
|
||||
dest: /etc/hostname
|
||||
owner: root
|
||||
|
@ -101,14 +101,14 @@
|
|||
# more info https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html#parameter-mode
|
||||
mode: "0644"
|
||||
- name: "Setup motd"
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: motd.j2
|
||||
dest: /etc/motd
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
- name: "Setup hosts"
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: hosts.j2
|
||||
dest: /etc/hosts
|
||||
owner: root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue