Loading .ansible-lint 0 → 100644 +3 −0 Original line number Diff line number Diff line --- warn_list: - yaml[line-length] .github/workflows/lint.yaml +4 −3 Original line number Diff line number Diff line Loading @@ -11,6 +11,10 @@ name: Lint - cron: "00 12 10 * *" workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: test: Loading Loading @@ -39,8 +43,5 @@ jobs: - name: Install test dependencies run: pip install -r .requirements/${{ matrix.ansible }}.txt - name: Run yamllint run: yamllint . - name: Run ansible-lint run: ansible-lint .requirements/2.16.txt +0 −1 Original line number Diff line number Diff line # Requirements for ansible stable ansible>=2.16<2.17 ansible-lint yamllint .requirements/latest.txt +0 −1 Original line number Diff line number Diff line # Requirements for ansible latest ansible ansible-lint yamllint tasks/main.yml 0 → 100644 +163 −0 Original line number Diff line number Diff line --- - name: Perform specific setup for Ubuntu & Debian when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' block: - name: Configure repositories for Ubuntu when: ansible_distribution == 'Ubuntu' block: - name: Template a file to /etc/apt/sources.list for Ubuntu {{ ansible_distribution_release }} ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }} main restricted deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-updates main restricted deb [arch=amd64] http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main restricted dest: /etc/apt/sources.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/universe.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_universe is defined - apt_repository_universe ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }} universe deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-updates universe deb [arch=amd64] http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security universe dest: /etc/apt/sources.list.d/universe.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/multiverse.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_multiverse is defined - apt_repository_multiverse ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }} multiverse deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-updates multiverse deb [arch=amd64] http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security multiverse dest: /etc/apt/sources.list.d/multiverse.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_backports is defined - apt_repository_backports ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-backports main restricted dest: /etc/apt/sources.list.d/backports.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports_universe.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_universe is defined - apt_repository_universe - apt_repository_backports is defined - apt_repository_backports ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-backports universe dest: /etc/apt/sources.list.d/backports_universe.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports_multiverse.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_multiverse is defined - apt_repository_multiverse - apt_repository_backports is defined - apt_repository_backports ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-backports multiverse dest: /etc/apt/sources.list.d/backports_multiverse.list owner: root group: root mode: "0644" force: true - name: Configure repositories for Debian when: ansible_distribution == 'Debian' block: - name: Template a file to /etc/apt/sources.list for Debian {{ ansible_distribution_release }} ansible.builtin.copy: content: | deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }} main contrib deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-updates main contrib deb [arch=amd64] http://deb.debian.org/debian-security {{ ansible_distribution_release }}-security main contrib dest: /etc/apt/sources.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/non-free.list for Debian {{ ansible_distribution_release }} when: - apt_repository_non-free is defined - apt_repository_non-free ansible.builtin.copy: content: | deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }} non-free non-free-firmware deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-updates non-free non-free-firmware deb [arch=amd64] http://security.debian.org/debian-security {{ ansible_distribution_release }}-security non-free non-free-firmware dest: /etc/apt/sources.list.d/non-free.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports.list for Debian {{ ansible_distribution_release }} when: - apt_repository_backports is defined - apt_repository_backports ansible.builtin.copy: content: | deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib dest: /etc/apt/sources.list.d/backports.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports_non-free.list for Debian {{ ansible_distribution_release }} when: - apt_repository_backports is defined - apt_repository_backports - apt_repository_non-free is defined - apt_repository_non-free ansible.builtin.copy: content: | deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-backports non-free non-free-firmware dest: /etc/apt/sources.list.d/backports_non-free.list owner: root group: root mode: "0644" force: true # APT: ansible requirements - name: Install [apt] Ansible module requirements using apt-get ansible.builtin.apt: state: present update_cache: true force_apt_get: true install_recommends: false pkg: - python3-apt Loading
.ansible-lint 0 → 100644 +3 −0 Original line number Diff line number Diff line --- warn_list: - yaml[line-length]
.github/workflows/lint.yaml +4 −3 Original line number Diff line number Diff line Loading @@ -11,6 +11,10 @@ name: Lint - cron: "00 12 10 * *" workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: test: Loading Loading @@ -39,8 +43,5 @@ jobs: - name: Install test dependencies run: pip install -r .requirements/${{ matrix.ansible }}.txt - name: Run yamllint run: yamllint . - name: Run ansible-lint run: ansible-lint
.requirements/2.16.txt +0 −1 Original line number Diff line number Diff line # Requirements for ansible stable ansible>=2.16<2.17 ansible-lint yamllint
.requirements/latest.txt +0 −1 Original line number Diff line number Diff line # Requirements for ansible latest ansible ansible-lint yamllint
tasks/main.yml 0 → 100644 +163 −0 Original line number Diff line number Diff line --- - name: Perform specific setup for Ubuntu & Debian when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' block: - name: Configure repositories for Ubuntu when: ansible_distribution == 'Ubuntu' block: - name: Template a file to /etc/apt/sources.list for Ubuntu {{ ansible_distribution_release }} ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }} main restricted deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-updates main restricted deb [arch=amd64] http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main restricted dest: /etc/apt/sources.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/universe.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_universe is defined - apt_repository_universe ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }} universe deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-updates universe deb [arch=amd64] http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security universe dest: /etc/apt/sources.list.d/universe.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/multiverse.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_multiverse is defined - apt_repository_multiverse ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }} multiverse deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-updates multiverse deb [arch=amd64] http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security multiverse dest: /etc/apt/sources.list.d/multiverse.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_backports is defined - apt_repository_backports ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-backports main restricted dest: /etc/apt/sources.list.d/backports.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports_universe.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_universe is defined - apt_repository_universe - apt_repository_backports is defined - apt_repository_backports ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-backports universe dest: /etc/apt/sources.list.d/backports_universe.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports_multiverse.list for Ubuntu {{ ansible_distribution_release }} when: - apt_repository_multiverse is defined - apt_repository_multiverse - apt_repository_backports is defined - apt_repository_backports ansible.builtin.copy: content: | deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-backports multiverse dest: /etc/apt/sources.list.d/backports_multiverse.list owner: root group: root mode: "0644" force: true - name: Configure repositories for Debian when: ansible_distribution == 'Debian' block: - name: Template a file to /etc/apt/sources.list for Debian {{ ansible_distribution_release }} ansible.builtin.copy: content: | deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }} main contrib deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-updates main contrib deb [arch=amd64] http://deb.debian.org/debian-security {{ ansible_distribution_release }}-security main contrib dest: /etc/apt/sources.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/non-free.list for Debian {{ ansible_distribution_release }} when: - apt_repository_non-free is defined - apt_repository_non-free ansible.builtin.copy: content: | deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }} non-free non-free-firmware deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-updates non-free non-free-firmware deb [arch=amd64] http://security.debian.org/debian-security {{ ansible_distribution_release }}-security non-free non-free-firmware dest: /etc/apt/sources.list.d/non-free.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports.list for Debian {{ ansible_distribution_release }} when: - apt_repository_backports is defined - apt_repository_backports ansible.builtin.copy: content: | deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib dest: /etc/apt/sources.list.d/backports.list owner: root group: root mode: "0644" force: true - name: Template a file to /etc/apt/sources.list.d/backports_non-free.list for Debian {{ ansible_distribution_release }} when: - apt_repository_backports is defined - apt_repository_backports - apt_repository_non-free is defined - apt_repository_non-free ansible.builtin.copy: content: | deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-backports non-free non-free-firmware dest: /etc/apt/sources.list.d/backports_non-free.list owner: root group: root mode: "0644" force: true # APT: ansible requirements - name: Install [apt] Ansible module requirements using apt-get ansible.builtin.apt: state: present update_cache: true force_apt_get: true install_recommends: false pkg: - python3-apt