Skip to content

Commit

Permalink
project: use uppercase on first letter of the name of a task
Browse files Browse the repository at this point in the history
This was mainly scripted using
`find -name '*.yml' | grep -E "tasks|handlers" | xargs  sed -i -e 's/- name: \b\(.\)/- name: \u\1/g'`

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
  • Loading branch information
MrFreezeex committed Apr 24, 2023
1 parent 1d4f4f2 commit 5846714
Show file tree
Hide file tree
Showing 87 changed files with 402 additions and 402 deletions.
4 changes: 2 additions & 2 deletions contrib/dind/roles/dind-cluster/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: set_fact distro_setup
- name: Set_fact distro_setup
set_fact:
distro_setup: "{{ distro_settings[node_distro] }}"

- name: set_fact other distro settings
- name: Set_fact other distro settings
set_fact:
distro_user: "{{ distro_setup['user'] }}"
distro_ssh_service: "{{ distro_setup['ssh_service'] }}"
Expand Down
4 changes: 2 additions & 2 deletions contrib/dind/roles/dind-host/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: set_fact distro_setup
- name: Set_fact distro_setup
set_fact:
distro_setup: "{{ distro_settings[node_distro] }}"

- name: set_fact other distro settings
- name: Set_fact other distro settings
set_fact:
distro_image: "{{ distro_setup['image'] }}"
distro_init: "{{ distro_setup['init'] }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
include_vars: "{{ ansible_os_family }}.yml"

# Install xfs package
- name: install xfs Debian
- name: Install xfs Debian
apt: name=xfsprogs state=present
when: ansible_os_family == "Debian"

- name: install xfs RedHat
- name: Install xfs RedHat
package: name=xfsprogs state=present
when: ansible_os_family == "RedHat"

Expand All @@ -17,7 +17,7 @@
filesystem: "fstype=xfs dev={{ disk_volume_device_1 }}"

# Mount external volumes
- name: mounting new xfs filesystem
- name: Mounting new xfs filesystem
mount: "name={{ gluster_volume_node_mount_dir }} src={{ disk_volume_device_1 }} fstype=xfs state=mounted"

# Setup/install tasks.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
- name: "stop port forwarding"
- name: "Stop port forwarding"
command: "killall "
10 changes: 5 additions & 5 deletions playbooks/legacy_groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
gather_facts: false
tags: always
tasks:
- name: add nodes to kube_control_plane group
- name: Add nodes to kube_control_plane group
group_by:
key: 'kube_control_plane'

Expand All @@ -15,7 +15,7 @@
gather_facts: false
tags: always
tasks:
- name: add nodes to kube_node group
- name: Add nodes to kube_node group
group_by:
key: 'kube_node'

Expand All @@ -24,7 +24,7 @@
gather_facts: false
tags: always
tasks:
- name: add nodes to k8s_cluster group
- name: Add nodes to k8s_cluster group
group_by:
key: 'k8s_cluster'

Expand All @@ -33,7 +33,7 @@
gather_facts: false
tags: always
tasks:
- name: add nodes to calico_rr group
- name: Add nodes to calico_rr group
group_by:
key: 'calico_rr'

Expand All @@ -42,6 +42,6 @@
gather_facts: false
tags: always
tasks:
- name: add nodes to no-floating group
- name: Add nodes to no-floating group
group_by:
key: 'no_floating'
2 changes: 1 addition & 1 deletion playbooks/reset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
private: no

pre_tasks:
- name: check confirmation
- name: Check confirmation
fail:
msg: "Reset confirmation failed"
when: reset_confirmation != "yes"
Expand Down
2 changes: 1 addition & 1 deletion playbooks/scale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
environment: "{{ proxy_disable_env }}"
register: kubeadm_upload_cert
changed_when: false
- name: set fact 'kubeadm_certificate_key' for later use
- name: Set fact 'kubeadm_certificate_key' for later use
set_fact:
kubeadm_certificate_key: "{{ kubeadm_upload_cert.stdout_lines[-1] | trim }}"
when: kubeadm_certificate_key is not defined
Expand Down
4 changes: 2 additions & 2 deletions roles/bastion-ssh-config/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: set bastion host IP and port
- name: Set bastion host IP and port
set_fact:
bastion_ip: "{{ hostvars[groups['bastion'][0]]['ansible_host'] | d(hostvars[groups['bastion'][0]]['ansible_ssh_host']) }}"
bastion_port: "{{ hostvars[groups['bastion'][0]]['ansible_port'] | d(hostvars[groups['bastion'][0]]['ansible_ssh_port']) | d(22) }}"
Expand All @@ -12,7 +12,7 @@
set_fact:
real_user: "{{ ansible_user }}"

- name: create ssh bastion conf
- name: Create ssh bastion conf
become: false
delegate_to: localhost
connection: local
Expand Down
6 changes: 3 additions & 3 deletions roles/container-engine/containerd-common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
- name: containerd-common | check if fedora coreos
- name: Containerd-common | check if fedora coreos
stat:
path: /run/ostree-booted
get_attributes: no
get_checksum: no
get_mime: no
register: ostree

- name: containerd-common | set is_ostree
- name: Containerd-common | set is_ostree
set_fact:
is_ostree: "{{ ostree.stat.exists }}"

- name: containerd-common | gather os specific variables
- name: Containerd-common | gather os specific variables
include_vars: "{{ item }}"
with_first_found:
- files:
Expand Down
2 changes: 1 addition & 1 deletion roles/container-engine/containerd/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: restart containerd
- name: Restart containerd
command: /bin/true
notify:
- Containerd | restart containerd
Expand Down
34 changes: 17 additions & 17 deletions roles/container-engine/containerd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@
when:
- not (allow_unsupported_distribution_setup | default(false)) and (ansible_distribution not in containerd_supported_distributions)

- name: containerd | Remove any package manager controlled containerd package
- name: Containerd | Remove any package manager controlled containerd package
package:
name: "{{ containerd_package }}"
state: absent
when:
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))

- name: containerd | Remove containerd repository
- name: Containerd | Remove containerd repository
file:
path: "{{ yum_repo_dir }}/containerd.repo"
state: absent
when:
- ansible_os_family in ['RedHat']

- name: containerd | Remove containerd repository
- name: Containerd | Remove containerd repository
apt_repository:
repo: "{{ item }}"
state: absent
with_items: "{{ containerd_repo_info.repos }}"
when: ansible_pkg_mgr == 'apt'

- name: containerd | Download containerd
- name: Containerd | Download containerd
include_tasks: "../../../download/tasks/download_file.yml"
vars:
download: "{{ download_defaults | combine(downloads.containerd) }}"

- name: containerd | Unpack containerd archive
- name: Containerd | Unpack containerd archive
unarchive:
src: "{{ downloads.containerd.dest }}"
dest: "{{ containerd_bin_dir }}"
Expand All @@ -41,7 +41,7 @@
- --strip-components=1
notify: restart containerd

- name: containerd | Remove orphaned binary
- name: Containerd | Remove orphaned binary
file:
path: "/usr/bin/{{ item }}"
state: absent
Expand All @@ -56,14 +56,14 @@
- containerd-shim-runc-v2
- ctr

- name: containerd | Generate systemd service for containerd
- name: Containerd | Generate systemd service for containerd
template:
src: containerd.service.j2
dest: /etc/systemd/system/containerd.service
mode: 0644
notify: restart containerd

- name: containerd | Ensure containerd directories exist
- name: Containerd | Ensure containerd directories exist
file:
dest: "{{ item }}"
state: directory
Expand All @@ -76,25 +76,25 @@
- "{{ containerd_storage_dir }}"
- "{{ containerd_state_dir }}"

- name: containerd | Write containerd proxy drop-in
- name: Containerd | Write containerd proxy drop-in
template:
src: http-proxy.conf.j2
dest: "{{ containerd_systemd_dir }}/http-proxy.conf"
mode: 0644
notify: restart containerd
when: http_proxy is defined or https_proxy is defined

- name: containerd | Generate default base_runtime_spec
- name: Containerd | Generate default base_runtime_spec
register: ctr_oci_spec
command: "{{ containerd_bin_dir }}/ctr oci spec"
check_mode: false
changed_when: false

- name: containerd | Store generated default base_runtime_spec
- name: Containerd | Store generated default base_runtime_spec
set_fact:
containerd_default_base_runtime_spec: "{{ ctr_oci_spec.stdout | from_json }}"

- name: containerd | Write base_runtime_specs
- name: Containerd | Write base_runtime_specs
copy:
content: "{{ item.value }}"
dest: "{{ containerd_cfg_dir }}/{{ item.key }}"
Expand All @@ -103,7 +103,7 @@
with_dict: "{{ containerd_base_runtime_specs | default({}) }}"
notify: restart containerd

- name: containerd | Copy containerd config file
- name: Containerd | Copy containerd config file
template:
src: config.toml.j2
dest: "{{ containerd_cfg_dir }}/config.toml"
Expand All @@ -112,14 +112,14 @@
notify: restart containerd

- block:
- name: containerd | Create registry directories
- name: Containerd | Create registry directories
file:
path: "{{ containerd_cfg_dir }}/certs.d/{{ item.key }}"
state: directory
mode: 0755
recurse: true
with_dict: "{{ containerd_insecure_registries }}"
- name: containerd | Write hosts.toml file
- name: Containerd | Write hosts.toml file
blockinfile:
path: "{{ containerd_cfg_dir }}/certs.d/{{ item.key }}/hosts.toml"
mode: 0640
Expand All @@ -134,10 +134,10 @@

# you can sometimes end up in a state where everything is installed
# but containerd was not started / enabled
- name: containerd | Flush handlers
- name: Containerd | Flush handlers
meta: flush_handlers

- name: containerd | Ensure containerd is started and enabled
- name: Containerd | Ensure containerd is started and enabled
systemd:
name: containerd
daemon_reload: yes
Expand Down
8 changes: 4 additions & 4 deletions roles/container-engine/containerd/tasks/reset.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: containerd | Remove containerd repository for RedHat os family
- name: Containerd | Remove containerd repository for RedHat os family
file:
path: "{{ yum_repo_dir }}/containerd.repo"
state: absent
Expand All @@ -8,7 +8,7 @@
tags:
- reset_containerd

- name: containerd | Remove containerd repository for Debian os family
- name: Containerd | Remove containerd repository for Debian os family
apt_repository:
repo: "{{ item }}"
state: absent
Expand All @@ -17,7 +17,7 @@
tags:
- reset_containerd

- name: containerd | Stop containerd service
- name: Containerd | Stop containerd service
service:
name: containerd
daemon_reload: true
Expand All @@ -27,7 +27,7 @@
tags:
- reset_containerd

- name: containerd | Remove configuration files
- name: Containerd | Remove configuration files
file:
path: "{{ item }}"
state: absent
Expand Down
12 changes: 6 additions & 6 deletions roles/container-engine/cri-dockerd/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: restart and enable cri-dockerd
- name: Restart and enable cri-dockerd
command: /bin/true
notify:
- cri-dockerd | reload systemd
Expand All @@ -8,28 +8,28 @@
- cri-dockerd | reload cri-dockerd.service
- cri-dockerd | enable cri-dockerd service

- name: cri-dockerd | reload systemd
- name: Cri-dockerd | reload systemd
systemd:
name: cri-dockerd
daemon_reload: true
masked: no

- name: cri-dockerd | restart docker.service
- name: Cri-dockerd | restart docker.service
service:
name: docker.service
state: restarted

- name: cri-dockerd | reload cri-dockerd.socket
- name: Cri-dockerd | reload cri-dockerd.socket
service:
name: cri-dockerd.socket
state: restarted

- name: cri-dockerd | reload cri-dockerd.service
- name: Cri-dockerd | reload cri-dockerd.service
service:
name: cri-dockerd.service
state: restarted

- name: cri-dockerd | enable cri-dockerd service
- name: Cri-dockerd | enable cri-dockerd service
service:
name: cri-dockerd.service
enabled: yes
2 changes: 1 addition & 1 deletion roles/container-engine/cri-dockerd/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: runc | Download cri-dockerd binary
- name: Runc | Download cri-dockerd binary
include_tasks: "../../../download/tasks/download_file.yml"
vars:
download: "{{ download_defaults | combine(downloads.cri_dockerd) }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/container-engine/cri-o/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: restart crio
- name: Restart crio
command: /bin/true
notify:
- CRI-O | reload systemd
Expand Down
2 changes: 1 addition & 1 deletion roles/container-engine/crictl/tasks/crictl.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: crictl | Download crictl
- name: Crictl | Download crictl
include_tasks: "../../../download/tasks/download_file.yml"
vars:
download: "{{ download_defaults | combine(downloads.crictl) }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/container-engine/crictl/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
- name: install crictl
- name: Install crictl
include_tasks: crictl.yml
2 changes: 1 addition & 1 deletion roles/container-engine/crun/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: crun | Download crun binary
- name: Crun | Download crun binary
include_tasks: "../../../download/tasks/download_file.yml"
vars:
download: "{{ download_defaults | combine(downloads.crun) }}"
Expand Down
Loading

0 comments on commit 5846714

Please sign in to comment.