diff --git a/roles/authorized_key/meta/main.yml b/roles/authorized_key/meta/main.yml index 41398d8..514cad8 100644 --- a/roles/authorized_key/meta/main.yml +++ b/roles/authorized_key/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: Gives myself SSH authorized key access license: GPLv3 min_ansible_version: 2.4 diff --git a/roles/common/meta/main.yml b/roles/common/meta/main.yml index 4290c31..1145b42 100644 --- a/roles/common/meta/main.yml +++ b/roles/common/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: |- Fixes a few basic inconsistencies in low-level Fedora machines, such as updating the base vim package (it's had issues in the past), and disabling diff --git a/roles/copy_or_link/meta/main.yml b/roles/copy_or_link/meta/main.yml index 98b8702..312fe9c 100644 --- a/roles/copy_or_link/meta/main.yml +++ b/roles/copy_or_link/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: >- If the connection is a remote connection, this role will copy the files to the target machine. If the connection is local, then the role will diff --git a/roles/copy_or_link/molecule/default/prepare.yml b/roles/copy_or_link/molecule/default/prepare.yml index afaeb27..c5ee449 100644 --- a/roles/copy_or_link/molecule/default/prepare.yml +++ b/roles/copy_or_link/molecule/default/prepare.yml @@ -4,3 +4,4 @@ file: state: touch dest: /root/second + mode: 0600 diff --git a/roles/copy_or_link/molecule/local/prepare.yml b/roles/copy_or_link/molecule/local/prepare.yml index a915d4d..0ef355e 100644 --- a/roles/copy_or_link/molecule/local/prepare.yml +++ b/roles/copy_or_link/molecule/local/prepare.yml @@ -4,6 +4,7 @@ file: state: touch dest: /root/second + mode: 0600 - name: install ansible package: @@ -15,16 +16,19 @@ dest: /root/temp/roles state: directory recurse: true + mode: 0700 - name: create inventory file copy: content: "localhost ansible_connection=local" dest: /root/temp/inventory + mode: 0644 - name: create test files copy: src: "{{ item }}" dest: /root/temp/ + mode: 0644 loop: - "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}/../shared/first" @@ -37,6 +41,7 @@ copy: src: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}" dest: /root/temp/roles/ + mode: 0644 - name: copy action_plugin copy: @@ -44,3 +49,4 @@ {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/../../plugins/action/copy_or_link.py dest: /root/temp/roles/copy_or_link/action_plugins/ + mode: 0644 diff --git a/roles/dev/meta/main.yml b/roles/dev/meta/main.yml index a1e2ad2..8ad3a96 100644 --- a/roles/dev/meta/main.yml +++ b/roles/dev/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: >- Sets up a system as a basic development box license: GPLv3 diff --git a/roles/dhcpd/meta/main.yml b/roles/dhcpd/meta/main.yml index a65803e..5435030 100644 --- a/roles/dhcpd/meta/main.yml +++ b/roles/dhcpd/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: Configures a basic DHCP server on CentOS license: GPLv3 min_ansible_version: 2.4 diff --git a/roles/disable_deltarpm/meta/main.yml b/roles/disable_deltarpm/meta/main.yml index 5a0b411..88a6c8d 100644 --- a/roles/disable_deltarpm/meta/main.yml +++ b/roles/disable_deltarpm/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: Simply disables deltarpm settings license: GPLv3 min_ansible_version: 2.4 diff --git a/roles/dns_server/meta/main.yml b/roles/dns_server/meta/main.yml index 3d2a7b2..fef71e0 100644 --- a/roles/dns_server/meta/main.yml +++ b/roles/dns_server/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: >- Installs and configures bind/named to serve names on the local network license: GPLv3 diff --git a/roles/dotfiles/files/bash_shared b/roles/dotfiles/files/bash_shared index 95718e5..65ee1a1 100644 --- a/roles/dotfiles/files/bash_shared +++ b/roles/dotfiles/files/bash_shared @@ -13,6 +13,7 @@ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export SWORD_PATH=$HOME/.sword export ANSIBLE_COLLECTIONS_PATHS=${HOME}/src/:${HOME}/.ansible export OS_CLOUD=default +export GIT_SSL_NO_VERIFY=True #export VAGRANT_DEFAULT_PROVIDER=virtualbox color_prompt="yes" if [ "$color_prompt" = yes ]; then diff --git a/roles/dotfiles/meta/main.yml b/roles/dotfiles/meta/main.yml index e3309fc..35615cb 100644 --- a/roles/dotfiles/meta/main.yml +++ b/roles/dotfiles/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: |- Configures bashrc and other user-directory files the way I like them license: GPLv3 diff --git a/roles/flatpak/meta/main.yml b/roles/flatpak/meta/main.yml index a225d0d..caddf4e 100644 --- a/roles/flatpak/meta/main.yml +++ b/roles/flatpak/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: Ensures that flatpak is installed on the host license: GPLv3 min_ansible_version: 2.8 diff --git a/roles/flatpaks/meta/main.yml b/roles/flatpaks/meta/main.yml index 1213e39..018552f 100644 --- a/roles/flatpaks/meta/main.yml +++ b/roles/flatpaks/meta/main.yml @@ -1,7 +1,6 @@ galaxy_info: - author: Author Name - description: My Description - company: Red Hat, Inc. + author: devroles + description: Installs the flatpaks I want on my system license: GPLv3 min_ansible_version: 2.8 platforms: diff --git a/roles/jenkins/meta/main.yml b/roles/jenkins/meta/main.yml index 69095c3..599c035 100644 --- a/roles/jenkins/meta/main.yml +++ b/roles/jenkins/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: |- Installs Java and basic things needed before installing Jenkins masters or Swarm clients diff --git a/roles/jenkins_configure/meta/main.yml b/roles/jenkins_configure/meta/main.yml index 61c43a8..5c6000e 100644 --- a/roles/jenkins_configure/meta/main.yml +++ b/roles/jenkins_configure/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: |- Configures an already-running Jenkins master license: GPLv3 diff --git a/roles/jenkins_master/meta/main.yml b/roles/jenkins_master/meta/main.yml index eb6cff1..67731af 100644 --- a/roles/jenkins_master/meta/main.yml +++ b/roles/jenkins_master/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: |- Installs a Jenkins Master on a properly prepared system license: GPLv3 diff --git a/roles/mariadb/meta/main.yml b/roles/mariadb/meta/main.yml index 0fa8424..13513b8 100644 --- a/roles/mariadb/meta/main.yml +++ b/roles/mariadb/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Author Name + author: devroles description: My Description company: Red Hat, Inc. license: GPLv3 diff --git a/roles/mirror/meta/main.yml b/roles/mirror/meta/main.yml index 802dea8..da8ebc1 100644 --- a/roles/mirror/meta/main.yml +++ b/roles/mirror/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: |- Configures an rsync script to mirror down content to the local system license: GPLv3 diff --git a/roles/mounts/meta/main.yml b/roles/mounts/meta/main.yml index 5fadc3c..1a7cbb1 100644 --- a/roles/mounts/meta/main.yml +++ b/roles/mounts/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: >- Ensures that mount points exist on the system and that they are mounted and recorded in /etc/fstab diff --git a/roles/mounts/tasks/main.yml b/roles/mounts/tasks/main.yml index 159b236..79b2555 100644 --- a/roles/mounts/tasks/main.yml +++ b/roles/mounts/tasks/main.yml @@ -6,6 +6,5 @@ when: ansible_facts.pkg_mgr not in ['atomic_container'] - name: ensure mount - include: - file: mount.yml + include_tasks: mount.yml with_items: "{{ mounts }}" diff --git a/roles/mta/meta/main.yml b/roles/mta/meta/main.yml index 9fd19d0..d4de4c2 100644 --- a/roles/mta/meta/main.yml +++ b/roles/mta/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: >- Installs and configures a mail agent (MTA) on the target host license: GPLv3 diff --git a/roles/mythtv/meta/main.yml b/roles/mythtv/meta/main.yml index 6bbe041..4ba67a0 100644 --- a/roles/mythtv/meta/main.yml +++ b/roles/mythtv/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: Installs mythtv, particularly for Hauppage 950 cards license: GPLv3 min_ansible_version: 2.4 diff --git a/roles/packages/meta/main.yml b/roles/packages/meta/main.yml index 9fb4ef5..d5e9997 100644 --- a/roles/packages/meta/main.yml +++ b/roles/packages/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: >- Installs the command line utilities, programs, libraries, and services that I find useful on my systems. Also configures a large number of system repos diff --git a/roles/packages/vars/main.yml b/roles/packages/vars/main.yml index 8a06e70..a9f5cf1 100644 --- a/roles/packages/vars/main.yml +++ b/roles/packages/vars/main.yml @@ -1,5 +1,5 @@ packages_rpmfusion: - # yamllint diable rule:line-length + # yamllint disable rule:line-length - https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ ansible_facts.distribution_major_version }}.noarch.rpm - https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ ansible_facts.distribution_major_version }}.noarch.rpm packages_gpg_keys: diff --git a/roles/python_prep/meta/main.yml b/roles/python_prep/meta/main.yml index 0a1744c..16de442 100644 --- a/roles/python_prep/meta/main.yml +++ b/roles/python_prep/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: >- Sometimes the Python on a target system needs a little bit of extra massaging before it's completely ready for use on the target host. This diff --git a/roles/static_ip/meta/main.yml b/roles/static_ip/meta/main.yml index 3b60bbb..de70c68 100644 --- a/roles/static_ip/meta/main.yml +++ b/roles/static_ip/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: Sets a static IP address for NetworkManager connections license: GPLv3 min_ansible_version: 2.4 diff --git a/roles/sudoers/meta/main.yml b/roles/sudoers/meta/main.yml index 1e301e8..57e6755 100644 --- a/roles/sudoers/meta/main.yml +++ b/roles/sudoers/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: |- Make sure that sudo is installed on the system and the given list of users are provided with appropriate levels diff --git a/roles/virtualenv_ansible_python/meta/main.yml b/roles/virtualenv_ansible_python/meta/main.yml index dcd939b..dc48529 100644 --- a/roles/virtualenv_ansible_python/meta/main.yml +++ b/roles/virtualenv_ansible_python/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: |- Creates a temporary virtualenv that contains the packages specified and sets that as the ansible_python_interpreter diff --git a/roles/webserver/meta/main.yml b/roles/webserver/meta/main.yml index a703f3f..8e50e33 100644 --- a/roles/webserver/meta/main.yml +++ b/roles/webserver/meta/main.yml @@ -1,5 +1,5 @@ galaxy_info: - author: Greg Hellings + author: devroles description: |- Configures a basic webserver license: GPLv3 diff --git a/tests b/tests index 630af2a..82940e3 160000 --- a/tests +++ b/tests @@ -1 +1 @@ -Subproject commit 630af2a191a686381f670c8e5c0d9d81dd378108 +Subproject commit 82940e3103911d2f9ae5090a01e5903f489b688c diff --git a/tox.ini b/tox.ini index 127f018..2323eec 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,13 @@ requires = tox-ansible molecule_opts = -c {toxinidir}/tests/molecule.yml +ansible_lint_config = {toxinidir}/tests/ansible-lint +yamllint_config = {toxinidir}/tests/yamllint.yml + +[flake8] +exclude = + .tox, + .cache [testenv] usedevelop = false @@ -21,3 +28,17 @@ passenv = PS1 setenv = ANSIBLE_COLLECTIONS_PATHS={toxinidir}/../../../ + +[testenv:lint] +usedevelop = false +skip_install = true +setenv = + ANSIBLE_COLLECTIONS_PATHS={toxinidir}/../../../ +deps = + ansible-lint + flake8 + ansible +allowlist_externals = + bash +commands = + bash -c "ansible-lint -R -r {toxinidir}/tests/ansible_lint_rules -c {toxinidir}/tests/ansible-lint roles/*"