diff --git a/ansible/ansible/.travis.yml b/ansible/ansible/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/ansible/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/ansible/README.md b/ansible/ansible/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/ansible/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/ansible/defaults/main.yml b/ansible/ansible/defaults/main.yml new file mode 100644 index 0000000..4f813f5 --- /dev/null +++ b/ansible/ansible/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for ansible diff --git a/ansible/ansible/handlers/main.yml b/ansible/ansible/handlers/main.yml new file mode 100644 index 0000000..d1f2ec5 --- /dev/null +++ b/ansible/ansible/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for ansible diff --git a/ansible/ansible/meta/main.yml b/ansible/ansible/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/ansible/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/ansible/tasks/main.yml b/ansible/ansible/tasks/main.yml new file mode 100644 index 0000000..c9b7ea6 --- /dev/null +++ b/ansible/ansible/tasks/main.yml @@ -0,0 +1,5 @@ +--- +- name: Install ansible + pip: + name: ansible + extra_args: --user diff --git a/ansible/ansible/tests/inventory b/ansible/ansible/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/ansible/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/ansible/tests/test.yml b/ansible/ansible/tests/test.yml new file mode 100644 index 0000000..2aefb77 --- /dev/null +++ b/ansible/ansible/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - ansible diff --git a/ansible/ansible/vars/main.yml b/ansible/ansible/vars/main.yml new file mode 100644 index 0000000..ea51ae3 --- /dev/null +++ b/ansible/ansible/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for ansible diff --git a/ansible/arch_appimage/.travis.yml b/ansible/arch_appimage/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_appimage/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_appimage/README.md b/ansible/arch_appimage/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_appimage/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_appimage/defaults/main.yml b/ansible/arch_appimage/defaults/main.yml new file mode 100644 index 0000000..3b5fcf9 --- /dev/null +++ b/ansible/arch_appimage/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_appimage diff --git a/ansible/arch_appimage/handlers/main.yml b/ansible/arch_appimage/handlers/main.yml new file mode 100644 index 0000000..2917e27 --- /dev/null +++ b/ansible/arch_appimage/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_appimage diff --git a/ansible/arch_appimage/meta/main.yml b/ansible/arch_appimage/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_appimage/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_appimage/tasks/main.yml b/ansible/arch_appimage/tasks/main.yml new file mode 100644 index 0000000..7b47170 --- /dev/null +++ b/ansible/arch_appimage/tasks/main.yml @@ -0,0 +1,11 @@ +--- +# AppImage Launcher +- name: Ensure appimagelauncher installed + community.general.pacman: + name: appimagelauncher + state: present + become: yes +- name: Ensure Applications directory + file: + path: ~/Applications + state: directory diff --git a/ansible/arch_appimage/tests/inventory b/ansible/arch_appimage/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_appimage/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_appimage/tests/test.yml b/ansible/arch_appimage/tests/test.yml new file mode 100644 index 0000000..b4b37e3 --- /dev/null +++ b/ansible/arch_appimage/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_appimage diff --git a/ansible/arch_appimage/vars/main.yml b/ansible/arch_appimage/vars/main.yml new file mode 100644 index 0000000..650baef --- /dev/null +++ b/ansible/arch_appimage/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_appimage diff --git a/ansible/arch_backup/.travis.yml b/ansible/arch_backup/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_backup/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_backup/README.md b/ansible/arch_backup/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_backup/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_backup/defaults/main.yml b/ansible/arch_backup/defaults/main.yml new file mode 100644 index 0000000..da87360 --- /dev/null +++ b/ansible/arch_backup/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_backup diff --git a/ansible/arch_backup/handlers/main.yml b/ansible/arch_backup/handlers/main.yml new file mode 100644 index 0000000..b89163a --- /dev/null +++ b/ansible/arch_backup/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_backup diff --git a/ansible/arch_backup/meta/main.yml b/ansible/arch_backup/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_backup/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_backup/tasks/main.yml b/ansible/arch_backup/tasks/main.yml new file mode 100644 index 0000000..3403257 --- /dev/null +++ b/ansible/arch_backup/tasks/main.yml @@ -0,0 +1,64 @@ +--- +# Backup +- name: Create backup mount directory + file: + state: directory + path: '/mnt/backup0' + become: yes + tags: backup +- name: Ensure backup0 device exists in crypttab + community.general.crypttab: + name: backup0 + backing_device: UUID=1d7ce570-e695-47a0-9dda-5f14b5b20e21 + password: /home/ducoterra/.lukskeys/backup0 + opts: luks + state: present + become: yes + no_log: true + tags: backup +- name: Ensure backup0 mount exists in fstab + ansible.posix.mount: + path: /mnt/backup0 + src: /dev/mapper/backup0 + fstype: btrfs + opts: defaults,noatime,compress=zstd + state: present + become: yes + tags: backup +- name: Ensure /usr/local/scripts exists + file: + state: directory + path: '/usr/local/scripts' + become: yes + tags: backup +- name: Copy btrfs_backup.sh + ansible.builtin.copy: + src: scripts/btrfs_backup.sh + dest: /usr/local/scripts/btrfs_backup.sh + owner: root + group: root + mode: '0760' + become: yes + tags: backup +- name: Ensure hourly backups of / + ansible.builtin.cron: + name: "hourly backup of /" + minute: "0" + job: "export SOURCE_DIR=/; /usr/local/scripts/btrfs_backup.sh" + become: yes + tags: backup +- name: Ensure hourly backups of /home + ansible.builtin.cron: + name: "hourly backup of /home" + minute: "0" + job: "export SOURCE_DIR=/home; /usr/local/scripts/btrfs_backup.sh" + become: yes + tags: backup +- name: Ensure cronie service started + ansible.builtin.systemd: + name: cronie + state: restarted + daemon_reload: yes + enabled: yes + become: yes + tags: backup diff --git a/ansible/arch_backup/tests/inventory b/ansible/arch_backup/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_backup/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_backup/tests/test.yml b/ansible/arch_backup/tests/test.yml new file mode 100644 index 0000000..4c223b7 --- /dev/null +++ b/ansible/arch_backup/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_backup diff --git a/ansible/arch_backup/vars/main.yml b/ansible/arch_backup/vars/main.yml new file mode 100644 index 0000000..aa938e1 --- /dev/null +++ b/ansible/arch_backup/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_backup diff --git a/ansible/arch_bluetooth/.travis.yml b/ansible/arch_bluetooth/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_bluetooth/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_bluetooth/README.md b/ansible/arch_bluetooth/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_bluetooth/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_bluetooth/defaults/main.yml b/ansible/arch_bluetooth/defaults/main.yml new file mode 100644 index 0000000..f04a7c7 --- /dev/null +++ b/ansible/arch_bluetooth/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_bluetooth diff --git a/ansible/arch_bluetooth/handlers/main.yml b/ansible/arch_bluetooth/handlers/main.yml new file mode 100644 index 0000000..80c7347 --- /dev/null +++ b/ansible/arch_bluetooth/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_bluetooth diff --git a/ansible/arch_bluetooth/meta/main.yml b/ansible/arch_bluetooth/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_bluetooth/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_bluetooth/tasks/main.yml b/ansible/arch_bluetooth/tasks/main.yml new file mode 100644 index 0000000..eccb63c --- /dev/null +++ b/ansible/arch_bluetooth/tasks/main.yml @@ -0,0 +1,15 @@ +--- +# Bluetooth +- name: Ensure bluetooth installed and configured + community.general.pacman: + name: + - bluez + - bluez-utils + state: present + become: yes +- name: Ensure bluetooth service started + ansible.builtin.systemd: + name: bluetooth + state: started + enabled: yes + become: yes diff --git a/ansible/arch_bluetooth/tests/inventory b/ansible/arch_bluetooth/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_bluetooth/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_bluetooth/tests/test.yml b/ansible/arch_bluetooth/tests/test.yml new file mode 100644 index 0000000..aea901e --- /dev/null +++ b/ansible/arch_bluetooth/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_bluetooth diff --git a/ansible/arch_bluetooth/vars/main.yml b/ansible/arch_bluetooth/vars/main.yml new file mode 100644 index 0000000..6ca40f2 --- /dev/null +++ b/ansible/arch_bluetooth/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_bluetooth diff --git a/ansible/arch_citrix/.travis.yml b/ansible/arch_citrix/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_citrix/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_citrix/README.md b/ansible/arch_citrix/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_citrix/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_citrix/defaults/main.yml b/ansible/arch_citrix/defaults/main.yml new file mode 100644 index 0000000..0a903af --- /dev/null +++ b/ansible/arch_citrix/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_citrix diff --git a/ansible/arch_citrix/handlers/main.yml b/ansible/arch_citrix/handlers/main.yml new file mode 100644 index 0000000..ca6fc3f --- /dev/null +++ b/ansible/arch_citrix/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_citrix diff --git a/ansible/arch_citrix/meta/main.yml b/ansible/arch_citrix/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_citrix/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_citrix/tasks/main.yml b/ansible/arch_citrix/tasks/main.yml new file mode 100644 index 0000000..f500a48 --- /dev/null +++ b/ansible/arch_citrix/tasks/main.yml @@ -0,0 +1,24 @@ +--- +# Citrix ICA Client (Citrix Receiver) +- name: Clone citrix-receiver repo + ansible.builtin.git: + repo: 'https://aur.archlinux.org/icaclient.git' + dest: '{{ executable_temp_dir }}/citrix-receiver' +- name: Install citrix-receiver with makepkg + command: makepkg -si --noconfirm + args: + chdir: '{{ executable_temp_dir }}/citrix-receiver' +- name: Create INI client dir for citrix receiver + file: + state: directory + path: '~/.ICAClient/cache' +- name: Copy INI Files to ICAClient so citrix receiver works + ansible.builtin.copy: + src: '/opt/Citrix/ICAClient/config/{{ item }}.ini' + dest: '~/.ICAClient/{{ item }}.ini' + loop: + - All_Regions + - Trusted_Region + - Unknown_Region + - canonicalization + - regions diff --git a/ansible/arch_citrix/tests/inventory b/ansible/arch_citrix/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_citrix/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_citrix/tests/test.yml b/ansible/arch_citrix/tests/test.yml new file mode 100644 index 0000000..1df3b74 --- /dev/null +++ b/ansible/arch_citrix/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_citrix diff --git a/ansible/arch_citrix/vars/main.yml b/ansible/arch_citrix/vars/main.yml new file mode 100644 index 0000000..25fc97b --- /dev/null +++ b/ansible/arch_citrix/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_citrix diff --git a/ansible/arch_dnet_ca/.travis.yml b/ansible/arch_dnet_ca/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_dnet_ca/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_dnet_ca/README.md b/ansible/arch_dnet_ca/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_dnet_ca/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_dnet_ca/defaults/main.yml b/ansible/arch_dnet_ca/defaults/main.yml new file mode 100644 index 0000000..54baae3 --- /dev/null +++ b/ansible/arch_dnet_ca/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_dnet_ca diff --git a/ansible/arch_dnet_ca/handlers/main.yml b/ansible/arch_dnet_ca/handlers/main.yml new file mode 100644 index 0000000..2f46296 --- /dev/null +++ b/ansible/arch_dnet_ca/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_dnet_ca diff --git a/ansible/arch_dnet_ca/meta/main.yml b/ansible/arch_dnet_ca/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_dnet_ca/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_dnet_ca/tasks/main.yml b/ansible/arch_dnet_ca/tasks/main.yml new file mode 100644 index 0000000..d08197d --- /dev/null +++ b/ansible/arch_dnet_ca/tasks/main.yml @@ -0,0 +1,11 @@ +--- +# Install DNET CA +- name: Download DNET CA + get_url: + url: https://vault.ducoterra.net/v1/dnet/ca + dest: /etc/ca-certificates/trust-source/anchors/dnet_ca.crt + mode: '0660' + become: yes +- name: Update trust store + command: trust extract-compat + become: yes diff --git a/ansible/arch_dnet_ca/tests/inventory b/ansible/arch_dnet_ca/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_dnet_ca/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_dnet_ca/tests/test.yml b/ansible/arch_dnet_ca/tests/test.yml new file mode 100644 index 0000000..7232aef --- /dev/null +++ b/ansible/arch_dnet_ca/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_dnet_ca diff --git a/ansible/arch_dnet_ca/vars/main.yml b/ansible/arch_dnet_ca/vars/main.yml new file mode 100644 index 0000000..20742a3 --- /dev/null +++ b/ansible/arch_dnet_ca/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_dnet_ca diff --git a/ansible/arch_docker/.travis.yml b/ansible/arch_docker/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_docker/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_docker/README.md b/ansible/arch_docker/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_docker/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_docker/defaults/main.yml b/ansible/arch_docker/defaults/main.yml new file mode 100644 index 0000000..bf2f046 --- /dev/null +++ b/ansible/arch_docker/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_docker diff --git a/ansible/arch_docker/handlers/main.yml b/ansible/arch_docker/handlers/main.yml new file mode 100644 index 0000000..143f245 --- /dev/null +++ b/ansible/arch_docker/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_docker diff --git a/ansible/arch_docker/meta/main.yml b/ansible/arch_docker/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_docker/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_docker/tasks/main.yml b/ansible/arch_docker/tasks/main.yml new file mode 100644 index 0000000..525ce71 --- /dev/null +++ b/ansible/arch_docker/tasks/main.yml @@ -0,0 +1,15 @@ +--- +# Docker +- name: Ensure docker installed + community.general.pacman: + name: + - docker + - docker-compose + state: present + become: yes +- name: Ensure ducoterra in the "docker" group + ansible.builtin.user: + name: ducoterra + groups: docker + append: yes + become: yes diff --git a/ansible/arch_docker/tests/inventory b/ansible/arch_docker/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_docker/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_docker/tests/test.yml b/ansible/arch_docker/tests/test.yml new file mode 100644 index 0000000..647a0cb --- /dev/null +++ b/ansible/arch_docker/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_docker diff --git a/ansible/arch_docker/vars/main.yml b/ansible/arch_docker/vars/main.yml new file mode 100644 index 0000000..2802c2c --- /dev/null +++ b/ansible/arch_docker/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_docker diff --git a/ansible/arch_minecraft/.travis.yml b/ansible/arch_minecraft/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_minecraft/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_minecraft/README.md b/ansible/arch_minecraft/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_minecraft/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_minecraft/defaults/main.yml b/ansible/arch_minecraft/defaults/main.yml new file mode 100644 index 0000000..6951973 --- /dev/null +++ b/ansible/arch_minecraft/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_minecraft diff --git a/ansible/arch_minecraft/handlers/main.yml b/ansible/arch_minecraft/handlers/main.yml new file mode 100644 index 0000000..90f2565 --- /dev/null +++ b/ansible/arch_minecraft/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_minecraft diff --git a/ansible/arch_minecraft/meta/main.yml b/ansible/arch_minecraft/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_minecraft/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_minecraft/tasks/main.yml b/ansible/arch_minecraft/tasks/main.yml new file mode 100644 index 0000000..235d292 --- /dev/null +++ b/ansible/arch_minecraft/tasks/main.yml @@ -0,0 +1,10 @@ +--- + # Minecraft +- name: Clone minecraft-launcher repo + ansible.builtin.git: + repo: 'https://aur.archlinux.org/minecraft-launcher.git' + dest: '{{ executable_temp_dir }}/minecraft-launcher' +- name: Install minecraft-launcher with makepkg + command: makepkg -si --noconfirm + args: + chdir: '{{ executable_temp_dir }}/minecraft-launcher' diff --git a/ansible/arch_minecraft/tests/inventory b/ansible/arch_minecraft/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_minecraft/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_minecraft/tests/test.yml b/ansible/arch_minecraft/tests/test.yml new file mode 100644 index 0000000..438c176 --- /dev/null +++ b/ansible/arch_minecraft/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_minecraft diff --git a/ansible/arch_minecraft/vars/main.yml b/ansible/arch_minecraft/vars/main.yml new file mode 100644 index 0000000..55b1c46 --- /dev/null +++ b/ansible/arch_minecraft/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_minecraft diff --git a/ansible/arch_openssh/.travis.yml b/ansible/arch_openssh/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_openssh/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_openssh/README.md b/ansible/arch_openssh/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_openssh/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_openssh/defaults/main.yml b/ansible/arch_openssh/defaults/main.yml new file mode 100644 index 0000000..49f7fb3 --- /dev/null +++ b/ansible/arch_openssh/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_openssh diff --git a/ansible/arch_openssh/handlers/main.yml b/ansible/arch_openssh/handlers/main.yml new file mode 100644 index 0000000..1c76ca4 --- /dev/null +++ b/ansible/arch_openssh/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_openssh diff --git a/ansible/arch_openssh/meta/main.yml b/ansible/arch_openssh/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_openssh/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_openssh/tasks/main.yml b/ansible/arch_openssh/tasks/main.yml new file mode 100644 index 0000000..8fc7611 --- /dev/null +++ b/ansible/arch_openssh/tasks/main.yml @@ -0,0 +1,32 @@ +--- +# SSH +- name: Ensure openssh installed + community.general.pacman: + name: openssh + state: present + become: yes +- name: Curl SSH trusted CA + get_url: + url: https://vault.ducoterra.net/v1/ssh-client-signer/public_key + dest: /etc/ssh/trusted-user-ca-keys.pem + mode: '0660' + become: yes +- name: Create sshd_config file + copy: + dest: "/etc/ssh/sshd_config" + content: | + AuthorizedKeysFile .ssh/authorized_keys + PasswordAuthentication no + KbdInteractiveAuthentication no + UsePAM yes + PrintMotd no # pam does that + Subsystem sftp /usr/lib/ssh/sftp-server + TrustedUserCAKeys /etc/ssh/trusted-user-ca-keys.pem + become: yes +- name: Ensure ssh service started + ansible.builtin.systemd: + name: sshd + state: restarted + daemon_reload: yes + enabled: yes + become: yes diff --git a/ansible/arch_openssh/tests/inventory b/ansible/arch_openssh/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_openssh/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_openssh/tests/test.yml b/ansible/arch_openssh/tests/test.yml new file mode 100644 index 0000000..c152b1c --- /dev/null +++ b/ansible/arch_openssh/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_openssh diff --git a/ansible/arch_openssh/vars/main.yml b/ansible/arch_openssh/vars/main.yml new file mode 100644 index 0000000..c84800d --- /dev/null +++ b/ansible/arch_openssh/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_openssh diff --git a/ansible/arch_qmk/.travis.yml b/ansible/arch_qmk/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_qmk/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_qmk/README.md b/ansible/arch_qmk/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_qmk/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_qmk/defaults/main.yml b/ansible/arch_qmk/defaults/main.yml new file mode 100644 index 0000000..8b63341 --- /dev/null +++ b/ansible/arch_qmk/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_qmk diff --git a/ansible/arch_qmk/handlers/main.yml b/ansible/arch_qmk/handlers/main.yml new file mode 100644 index 0000000..60ce419 --- /dev/null +++ b/ansible/arch_qmk/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_qmk diff --git a/ansible/arch_qmk/meta/main.yml b/ansible/arch_qmk/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_qmk/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_qmk/tasks/main.yml b/ansible/arch_qmk/tasks/main.yml new file mode 100644 index 0000000..de3df9c --- /dev/null +++ b/ansible/arch_qmk/tasks/main.yml @@ -0,0 +1,18 @@ +--- +# QMK +- name: Ensure qmk installed + community.general.pacman: + name: qmk + state: present + become: yes +- name: Run qmk setup + ansible.builtin.command: qmk setup -y + become: yes +- name: Copy qmk udev rules + ansible.builtin.copy: + src: ~/qmk_firmware/util/udev/50-qmk.rules + dest: /etc/udev/rules.d/50-qmk.rules + owner: ducoterra + group: root + mode: '0755' + become: yes diff --git a/ansible/arch_qmk/tests/inventory b/ansible/arch_qmk/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_qmk/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_qmk/tests/test.yml b/ansible/arch_qmk/tests/test.yml new file mode 100644 index 0000000..e20b423 --- /dev/null +++ b/ansible/arch_qmk/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_qmk diff --git a/ansible/arch_qmk/vars/main.yml b/ansible/arch_qmk/vars/main.yml new file mode 100644 index 0000000..9a8ce65 --- /dev/null +++ b/ansible/arch_qmk/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_qmk diff --git a/ansible/arch_snap/.travis.yml b/ansible/arch_snap/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_snap/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_snap/README.md b/ansible/arch_snap/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_snap/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_snap/defaults/main.yml b/ansible/arch_snap/defaults/main.yml new file mode 100644 index 0000000..bbd7f99 --- /dev/null +++ b/ansible/arch_snap/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_snap diff --git a/ansible/arch_snap/handlers/main.yml b/ansible/arch_snap/handlers/main.yml new file mode 100644 index 0000000..26eda95 --- /dev/null +++ b/ansible/arch_snap/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_snap diff --git a/ansible/arch_snap/meta/main.yml b/ansible/arch_snap/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_snap/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_snap/tasks/main.yml b/ansible/arch_snap/tasks/main.yml new file mode 100644 index 0000000..5fcf358 --- /dev/null +++ b/ansible/arch_snap/tasks/main.yml @@ -0,0 +1,39 @@ +--- +# Snap Installs +- name: Ensure snap installed + community.general.pacman: + name: snapd + state: present + become: yes +- name: Ensure snapd service running + ansible.builtin.systemd: + name: snapd.socket + state: started + enabled: yes + become: yes +- name: Link /var/lib/snapd/snap /snap + ansible.builtin.file: + src: /var/lib/snapd/snap + dest: /snap + owner: root + group: root + state: link + become: yes +- name: Install snap-store + community.general.snap: + name: snap-store + state: present + become: yes + retries: 6 + delay: 10 +- name: Install vscode + community.general.snap: + name: code + state: present + classic: yes + become: yes +- name: Install spotify + community.general.snap: + name: spotify + state: present + become: yes diff --git a/ansible/arch_snap/tests/inventory b/ansible/arch_snap/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_snap/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_snap/tests/test.yml b/ansible/arch_snap/tests/test.yml new file mode 100644 index 0000000..933e652 --- /dev/null +++ b/ansible/arch_snap/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_snap diff --git a/ansible/arch_snap/vars/main.yml b/ansible/arch_snap/vars/main.yml new file mode 100644 index 0000000..6bf7e3d --- /dev/null +++ b/ansible/arch_snap/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_snap diff --git a/ansible/arch_swap/.travis.yml b/ansible/arch_swap/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_swap/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_swap/README.md b/ansible/arch_swap/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_swap/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_swap/defaults/main.yml b/ansible/arch_swap/defaults/main.yml new file mode 100644 index 0000000..a8bb9ff --- /dev/null +++ b/ansible/arch_swap/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_swap diff --git a/ansible/arch_swap/handlers/main.yml b/ansible/arch_swap/handlers/main.yml new file mode 100644 index 0000000..ae3f459 --- /dev/null +++ b/ansible/arch_swap/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_swap diff --git a/ansible/arch_swap/meta/main.yml b/ansible/arch_swap/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_swap/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_swap/tasks/main.yml b/ansible/arch_swap/tasks/main.yml new file mode 100644 index 0000000..e54b1ce --- /dev/null +++ b/ansible/arch_swap/tasks/main.yml @@ -0,0 +1,54 @@ +--- +# Create swap +- name: Turn off swap + command: "swapoff --all" + become: yes +- name: Remove old swap file + file: + state: absent + path: "{{ swap_file_path }}" + become: yes +- name: Create swap file + command: truncate -s 0 "{{ swap_file_path }}" + creates="{{ swap_file_path }}" + become: yes +- name: Set swap compression + command: chattr +C "{{ swap_file_path }}" + become: yes +- name: Allocate swap space + command: fallocate -l "{{ swap_file_size_mb }}M" "{{ swap_file_path }}" + become: yes +- name: Change swap file permissions + file: path="{{ swap_file_path }}" + owner=root + group=root + mode=0600 + become: yes +- name: "Check swap file type" + command: file {{ swap_file_path }} + register: swapfile + become: yes +- name: Make swap file + command: "mkswap {{ swap_file_path }}" + become: yes +- name: Write swap entry in fstab + mount: name=none + src={{ swap_file_path }} + fstype=swap + opts=sw + passno=0 + dump=0 + state=present + become: yes +- name: Mount swap + command: "swapon {{ swap_file_path }}" + become: yes +- name: Set swappiness + command: sysctl -w vm.swappiness=1 + become: yes +- name: Make swappiness permanent + copy: + dest: "/etc/sysctl.d/99-swappiness.conf" + content: | + vm.swappiness=1 + become: yes diff --git a/ansible/arch_swap/tests/inventory b/ansible/arch_swap/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_swap/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_swap/tests/test.yml b/ansible/arch_swap/tests/test.yml new file mode 100644 index 0000000..d22c60b --- /dev/null +++ b/ansible/arch_swap/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_swap diff --git a/ansible/arch_swap/vars/main.yml b/ansible/arch_swap/vars/main.yml new file mode 100644 index 0000000..e4368c9 --- /dev/null +++ b/ansible/arch_swap/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_swap diff --git a/ansible/arch_ufw/.travis.yml b/ansible/arch_ufw/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/arch_ufw/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/arch_ufw/README.md b/ansible/arch_ufw/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/arch_ufw/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/arch_ufw/defaults/main.yml b/ansible/arch_ufw/defaults/main.yml new file mode 100644 index 0000000..84aeb23 --- /dev/null +++ b/ansible/arch_ufw/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_ufw diff --git a/ansible/arch_ufw/handlers/main.yml b/ansible/arch_ufw/handlers/main.yml new file mode 100644 index 0000000..d99f258 --- /dev/null +++ b/ansible/arch_ufw/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_ufw diff --git a/ansible/arch_ufw/meta/main.yml b/ansible/arch_ufw/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/arch_ufw/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/arch_ufw/tasks/main.yml b/ansible/arch_ufw/tasks/main.yml new file mode 100644 index 0000000..476fbed --- /dev/null +++ b/ansible/arch_ufw/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# UFW +- name: Ensure UFW installed + community.general.pacman: + name: ufw + state: present + become: yes +- name: Enable UFW + community.general.ufw: + state: enabled + become: yes +- name: Allow SSH + community.general.ufw: + rule: allow + name: ssh + become: yes diff --git a/ansible/arch_ufw/tests/inventory b/ansible/arch_ufw/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/arch_ufw/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/arch_ufw/tests/test.yml b/ansible/arch_ufw/tests/test.yml new file mode 100644 index 0000000..15a0256 --- /dev/null +++ b/ansible/arch_ufw/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_ufw diff --git a/ansible/arch_ufw/vars/main.yml b/ansible/arch_ufw/vars/main.yml new file mode 100644 index 0000000..1a164a7 --- /dev/null +++ b/ansible/arch_ufw/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_ufw diff --git a/ansible/aws_cli/.travis.yml b/ansible/aws_cli/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/aws_cli/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/aws_cli/README.md b/ansible/aws_cli/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/aws_cli/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/aws_cli/defaults/main.yml b/ansible/aws_cli/defaults/main.yml new file mode 100644 index 0000000..8cc745e --- /dev/null +++ b/ansible/aws_cli/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for aws_cli diff --git a/ansible/aws_cli/handlers/main.yml b/ansible/aws_cli/handlers/main.yml new file mode 100644 index 0000000..b5f09bb --- /dev/null +++ b/ansible/aws_cli/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for aws_cli diff --git a/ansible/aws_cli/meta/main.yml b/ansible/aws_cli/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/aws_cli/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/aws_cli/tasks/main.yml b/ansible/aws_cli/tasks/main.yml new file mode 100644 index 0000000..2e53da9 --- /dev/null +++ b/ansible/aws_cli/tasks/main.yml @@ -0,0 +1,27 @@ +--- +# AWS CLI +- name: Download awscli v2 installer - latest version + unarchive: + src: https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip + dest: '{{ executable_temp_dir }}' + remote_src: true + creates: '{{ executable_temp_dir }}/aws' + mode: 0755 + when: awscli_version is not defined + tags: ["awscli", "awscliv2"] +- name: Download awscli v2 installer - specific version {{ awscli_version }} + unarchive: + src: 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64-{{ awscli_version }}.zip' + dest: "{{ executable_temp_dir }}" + remote_src: true + creates: '{{ executable_temp_dir }}/aws' + mode: 0755 + when: awscli_version is defined + tags: ["awscli", "awscliv2"] +- name: Run the installer for awscli v2 + command: + args: + cmd: '{{ executable_temp_dir }}/aws/install -i {{ awscli_install_dir }} -b /usr/local/bin' + creates: /usr/local/bin/aws + become: yes + tags: ["awscli", "awscliv2"] diff --git a/ansible/aws_cli/tests/inventory b/ansible/aws_cli/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/aws_cli/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/aws_cli/tests/test.yml b/ansible/aws_cli/tests/test.yml new file mode 100644 index 0000000..9095750 --- /dev/null +++ b/ansible/aws_cli/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - aws_cli diff --git a/ansible/aws_cli/vars/main.yml b/ansible/aws_cli/vars/main.yml new file mode 100644 index 0000000..d02874c --- /dev/null +++ b/ansible/aws_cli/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for aws_cli diff --git a/ansible/dconf/.travis.yml b/ansible/dconf/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/dconf/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/dconf/README.md b/ansible/dconf/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/dconf/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/dconf/defaults/main.yml b/ansible/dconf/defaults/main.yml new file mode 100644 index 0000000..f4327ca --- /dev/null +++ b/ansible/dconf/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dconf diff --git a/ansible/dconf/handlers/main.yml b/ansible/dconf/handlers/main.yml new file mode 100644 index 0000000..0b2e5a4 --- /dev/null +++ b/ansible/dconf/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dconf diff --git a/ansible/dconf/meta/main.yml b/ansible/dconf/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/dconf/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/dconf/tasks/main.yml b/ansible/dconf/tasks/main.yml new file mode 100644 index 0000000..255209c --- /dev/null +++ b/ansible/dconf/tasks/main.yml @@ -0,0 +1,8 @@ +--- +# dconf settings +- name: Turn off palm rejection + command: dconf write /org/gnome/desktop/peripherals/touchpad/disable-while-typing false +- name: Set flat mouse acceleration profile + command: dconf write /org/gnome/desktop/peripherals/mouse/accel-profile "'flat'" +- name: Center new windows + command: dconf write /org/gnome/mutter/center-new-windows true diff --git a/ansible/dconf/tests/inventory b/ansible/dconf/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/dconf/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/dconf/tests/test.yml b/ansible/dconf/tests/test.yml new file mode 100644 index 0000000..4ed0eb0 --- /dev/null +++ b/ansible/dconf/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - dconf diff --git a/ansible/dconf/vars/main.yml b/ansible/dconf/vars/main.yml new file mode 100644 index 0000000..3b09694 --- /dev/null +++ b/ansible/dconf/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dconf diff --git a/ansible/gnome_extensions/.travis.yml b/ansible/gnome_extensions/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/gnome_extensions/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/gnome_extensions/README.md b/ansible/gnome_extensions/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/gnome_extensions/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/gnome_extensions/defaults/main.yml b/ansible/gnome_extensions/defaults/main.yml new file mode 100644 index 0000000..c512eb5 --- /dev/null +++ b/ansible/gnome_extensions/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for gnome_extensions diff --git a/ansible/gnome_extensions/handlers/main.yml b/ansible/gnome_extensions/handlers/main.yml new file mode 100644 index 0000000..d811574 --- /dev/null +++ b/ansible/gnome_extensions/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for gnome_extensions diff --git a/ansible/gnome_extensions/meta/main.yml b/ansible/gnome_extensions/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/gnome_extensions/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/gnome_extensions/tasks/main.yml b/ansible/gnome_extensions/tasks/main.yml new file mode 100644 index 0000000..b4f9ba4 --- /dev/null +++ b/ansible/gnome_extensions/tasks/main.yml @@ -0,0 +1,10 @@ +--- +# Gnome extensions +- name: Enable gnome extensions + command: 'gnome-extensions enable {{ item }}' + loop: + - bluetooth-quick-connect@bjarosze.gmail.com + - clipboard-indicator@tudmotu.com + - freon@UshakovVasilii_Github.yahoo.com + - sound-output-device-chooser@kgshank.net + - tactile@lundal.io diff --git a/ansible/gnome_extensions/tests/inventory b/ansible/gnome_extensions/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/gnome_extensions/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/gnome_extensions/tests/test.yml b/ansible/gnome_extensions/tests/test.yml new file mode 100644 index 0000000..ad438ca --- /dev/null +++ b/ansible/gnome_extensions/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - gnome_extensions diff --git a/ansible/gnome_extensions/vars/main.yml b/ansible/gnome_extensions/vars/main.yml new file mode 100644 index 0000000..27498a5 --- /dev/null +++ b/ansible/gnome_extensions/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for gnome_extensions diff --git a/ansible/pacman_daily_drivers/.travis.yml b/ansible/pacman_daily_drivers/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/pacman_daily_drivers/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/pacman_daily_drivers/README.md b/ansible/pacman_daily_drivers/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/pacman_daily_drivers/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/pacman_daily_drivers/defaults/main.yml b/ansible/pacman_daily_drivers/defaults/main.yml new file mode 100644 index 0000000..c76e9bc --- /dev/null +++ b/ansible/pacman_daily_drivers/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for pacman_daily_drivers diff --git a/ansible/pacman_daily_drivers/handlers/main.yml b/ansible/pacman_daily_drivers/handlers/main.yml new file mode 100644 index 0000000..531051b --- /dev/null +++ b/ansible/pacman_daily_drivers/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for pacman_daily_drivers diff --git a/ansible/pacman_daily_drivers/meta/main.yml b/ansible/pacman_daily_drivers/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/pacman_daily_drivers/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/pacman_daily_drivers/tasks/main.yml b/ansible/pacman_daily_drivers/tasks/main.yml new file mode 100644 index 0000000..a0ee7c6 --- /dev/null +++ b/ansible/pacman_daily_drivers/tasks/main.yml @@ -0,0 +1,26 @@ +--- +# Daily Driver Tools +- name: Ensure daily-driver (development, work, gaming) installed + community.general.pacman: + name: + - vim + - chromium + - steam-manjaro + - discord + - geary + - wine + - winetricks + - wine-mono + - wine_gecko + - wireguard-tools + - iputils + - dnsutils + - iperf3 + - remmina + - freerdp + - kubectl + - helm + - python + - python-pip + state: present + become: yes diff --git a/ansible/pacman_daily_drivers/tests/inventory b/ansible/pacman_daily_drivers/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/pacman_daily_drivers/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/pacman_daily_drivers/tests/test.yml b/ansible/pacman_daily_drivers/tests/test.yml new file mode 100644 index 0000000..cbdfbb7 --- /dev/null +++ b/ansible/pacman_daily_drivers/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - pacman_daily_drivers diff --git a/ansible/pacman_daily_drivers/vars/main.yml b/ansible/pacman_daily_drivers/vars/main.yml new file mode 100644 index 0000000..3dda52c --- /dev/null +++ b/ansible/pacman_daily_drivers/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for pacman_daily_drivers diff --git a/ansible/pacman_system_tools/.travis.yml b/ansible/pacman_system_tools/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/pacman_system_tools/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/pacman_system_tools/README.md b/ansible/pacman_system_tools/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/pacman_system_tools/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/pacman_system_tools/defaults/main.yml b/ansible/pacman_system_tools/defaults/main.yml new file mode 100644 index 0000000..43fc38d --- /dev/null +++ b/ansible/pacman_system_tools/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for pacman_system_tools diff --git a/ansible/pacman_system_tools/handlers/main.yml b/ansible/pacman_system_tools/handlers/main.yml new file mode 100644 index 0000000..37e4ac1 --- /dev/null +++ b/ansible/pacman_system_tools/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for pacman_system_tools diff --git a/ansible/pacman_system_tools/meta/main.yml b/ansible/pacman_system_tools/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/pacman_system_tools/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/pacman_system_tools/tasks/main.yml b/ansible/pacman_system_tools/tasks/main.yml new file mode 100644 index 0000000..a1e1a22 --- /dev/null +++ b/ansible/pacman_system_tools/tasks/main.yml @@ -0,0 +1,15 @@ +--- +# System Tools +- name: Ensure system-level tools (device management stuff) installed + community.general.pacman: + name: + - grub + - glances + - htop + - curl + - wget + - dconf-editor + - yay + - unzip + state: present + become: yes diff --git a/ansible/pacman_system_tools/tests/inventory b/ansible/pacman_system_tools/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/pacman_system_tools/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/pacman_system_tools/tests/test.yml b/ansible/pacman_system_tools/tests/test.yml new file mode 100644 index 0000000..434aad2 --- /dev/null +++ b/ansible/pacman_system_tools/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - pacman_system_tools diff --git a/ansible/pacman_system_tools/vars/main.yml b/ansible/pacman_system_tools/vars/main.yml new file mode 100644 index 0000000..3300ac0 --- /dev/null +++ b/ansible/pacman_system_tools/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for pacman_system_tools diff --git a/ansible/pacman_update/.travis.yml b/ansible/pacman_update/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/pacman_update/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/pacman_update/README.md b/ansible/pacman_update/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/pacman_update/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/pacman_update/defaults/main.yml b/ansible/pacman_update/defaults/main.yml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/ansible/pacman_update/defaults/main.yml @@ -0,0 +1 @@ +--- diff --git a/ansible/pacman_update/handlers/main.yml b/ansible/pacman_update/handlers/main.yml new file mode 100644 index 0000000..3991016 --- /dev/null +++ b/ansible/pacman_update/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for pacman-update diff --git a/ansible/pacman_update/meta/main.yml b/ansible/pacman_update/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/pacman_update/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/pacman_update/tasks/main.yml b/ansible/pacman_update/tasks/main.yml new file mode 100644 index 0000000..25bd6c6 --- /dev/null +++ b/ansible/pacman_update/tasks/main.yml @@ -0,0 +1,8 @@ +--- +# Sync and update Pacman +- name: Sync and update Pacman + community.general.pacman: + update_cache: yes + upgrade: yes + become: yes + tags: update diff --git a/ansible/pacman_update/tests/inventory b/ansible/pacman_update/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/pacman_update/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/pacman_update/tests/test.yml b/ansible/pacman_update/tests/test.yml new file mode 100644 index 0000000..8b95331 --- /dev/null +++ b/ansible/pacman_update/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - pacman_update diff --git a/ansible/pacman_update/vars/main.yml b/ansible/pacman_update/vars/main.yml new file mode 100644 index 0000000..d4b27e0 --- /dev/null +++ b/ansible/pacman_update/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for pacman-update diff --git a/ansible/scripts/btrfs_backup.sh b/ansible/scripts/btrfs_backup.sh new file mode 100755 index 0000000..428c15c --- /dev/null +++ b/ansible/scripts/btrfs_backup.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +export SOURCE_DIR=${SOURCE_DIR:=root} +# Fix basename / showing up as "/" -> change to "root" +if [ $(basename $SOURCE_DIR) = / ]; then + export SNAPSHOT_PREFIX=${SNAPSHOT_PREFIX:=root} +else + export SNAPSHOT_PREFIX=${SNAPSHOT_PREFIX:=$(basename $SOURCE_DIR)} +fi +# Set snapshot prefix based on basename +export SNAPSHOT_TIME=$(date +"%y_%m_%d-%H.%M") +export SNAPSHOT_NAME=$SNAPSHOT_PREFIX-$SNAPSHOT_TIME +export SNAPSHOT_DIR=${SNAPSHOT_DIR:=/.snapshots} +export LATEST=$SNAPSHOT_PREFIX-latest +export BACKUP_DRIVE_MNT=${BACKUP_DRIVE_MNT:=/mnt/backup0} +export BACKUP_DIR=${BACKUP_DIR:=/mnt/backup0/DucoBacktop} + +# Show snapshot settings +echo "SOURCE_DIR: $SOURCE_DIR" +echo "SNAPSHOT_PREFIX: $SNAPSHOT_PREFIX" +echo "SNAPSHOT_TIME: $SNAPSHOT_TIME" +echo "SNAPSHOT_NAME: $SNAPSHOT_NAME" +echo "SNAPSHOT_DIR: $SNAPSHOT_DIR" +echo "LATEST: $LATEST" +echo "BACKUP_DRIVE_MNT: $BACKUP_DRIVE_MNT" +echo "BACKUP_DIR: $BACKUP_DIR" + +# Create readonly snapshot +btrfs subvolume snapshot -r $SOURCE_DIR $SNAPSHOT_DIR/$SNAPSHOT_NAME + +# Check if backup disk is mounted +mount $BACKUP_DRIVE_MNT +mountpoint $BACKUP_DRIVE_MNT + +if [ $? = 0 ]; then + if [ -d $BACKUP_DIR/$LATEST ]; then + btrfs send -p $SNAPSHOT_DIR/$LATEST $SNAPSHOT_DIR/$SNAPSHOT_NAME | btrfs receive $BACKUP_DIR + else + btrfs send $SNAPSHOT_DIR/$SNAPSHOT_NAME | btrfs receive $BACKUP_DIR + fi + + # Update latest in snapshot dir + rm -f $SNAPSHOT_DIR/$LATEST + ln -s $SNAPSHOT_DIR/$SNAPSHOT_NAME $SNAPSHOT_DIR/$LATEST + + # Update latest in backup dir + rm -f $BACKUP_DIR/$LATEST + ln -s $BACKUP_DIR/$SNAPSHOT_NAME $BACKUP_DIR/$LATEST +else + echo "Backup location $BACKUP_DRIVE_MNT not mounted. Snapshot $SNAPSHOT_NAME not synced" +fi diff --git a/ansible/scripts/mkkeys.sh b/ansible/scripts/mkkeys.sh new file mode 100644 index 0000000..f2cb1e6 --- /dev/null +++ b/ansible/scripts/mkkeys.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright (c) 2015 by Roderick W. Smith +# Licensed under the terms of the GPL v3 + +echo -n "Enter a Common Name to embed in the keys: " +read NAME + +openssl req -new -x509 -newkey rsa:2048 -subj "/CN=$NAME PK/" -keyout PK.key \ + -out PK.crt -days 3650 -nodes -sha256 +openssl req -new -x509 -newkey rsa:2048 -subj "/CN=$NAME KEK/" -keyout KEK.key \ + -out KEK.crt -days 3650 -nodes -sha256 +openssl req -new -x509 -newkey rsa:2048 -subj "/CN=$NAME DB/" -keyout DB.key \ + -out DB.crt -days 3650 -nodes -sha256 +openssl x509 -in PK.crt -out PK.cer -outform DER +openssl x509 -in KEK.crt -out KEK.cer -outform DER +openssl x509 -in DB.crt -out DB.cer -outform DER + +GUID=`python3 -c 'import uuid; print(str(uuid.uuid1()))'` +echo $GUID > myGUID.txt + +cert-to-efi-sig-list -g $GUID PK.crt PK.esl +cert-to-efi-sig-list -g $GUID KEK.crt KEK.esl +cert-to-efi-sig-list -g $GUID DB.crt DB.esl +rm -f noPK.esl +touch noPK.esl + +sign-efi-sig-list -t "$(date --date='1 second' +'%Y-%m-%d %H:%M:%S')" \ + -k PK.key -c PK.crt PK PK.esl PK.auth +sign-efi-sig-list -t "$(date --date='1 second' +'%Y-%m-%d %H:%M:%S')" \ + -k PK.key -c PK.crt PK noPK.esl noPK.auth +sign-efi-sig-list -t "$(date --date='1 second' +'%Y-%m-%d %H:%M:%S')" \ + -k PK.key -c PK.crt KEK KEK.esl KEK.auth +sign-efi-sig-list -t "$(date --date='1 second' +'%Y-%m-%d %H:%M:%S')" \ + -k KEK.key -c KEK.crt db DB.esl DB.auth + +chmod 0600 *.key + +echo "" +echo "" +echo "For use with KeyTool, copy the *.auth and *.esl files to a FAT USB" +echo "flash drive or to your EFI System Partition (ESP)." +echo "For use with most UEFIs' built-in key managers, copy the *.cer files;" +echo "but some UEFIs require the *.auth files." +echo "" diff --git a/ansible/setup-full.yml b/ansible/setup-full.yml new file mode 100644 index 0000000..1dac21c --- /dev/null +++ b/ansible/setup-full.yml @@ -0,0 +1,73 @@ +--- +# Run through all tasks to setup machines + +- hosts: localhost + gather_facts: true + order: inventory + vars: + executable_temp_dir: /tmp + awscli_install_dir: /opt/aws-cli/ + vault_version: 1.9.3 + swap_file_path: /swap/swapfile + swap_file_size_mb: 4096 + + roles: + - role: pacman_update + tags: ["pacman"] + + - role: pacman_system_tools + tags: ["pacman"] + + - role: pacman_daily_drivers + tags: ["pacman"] + + - role: arch_openssh + tags: ["ssh"] + + - role: arch_ufw + tags: ["ufw"] + + - role: arch_bluetooth + tags: ["bluetooth"] + + - role: arch_dnet_ca + tags: ["dnet"] + + - role: dconf + tags: ["dconf"] + + - role: gnome_extensions + tags: ["gnome"] + + - role: arch_appimage + tags: ["appimage"] + + - role: arch_docker + tags: ["docker"] + + - role: ansible + tags: ["ansble"] + + - role: arch_qmk + tags: ["qmk"] + + - role: aws_cli + tags: ["aws"] + + - role: vault_cli + tags: ["vault"] + + - role: arch_snap + tags: ["snap"] + + - role: arch_swap + tags: ["swap"] + + - role: arch_minecraft + tags: ["minecraft"] + + - role: arch_citrix + tags: ["citrix"] + + - role: arch_backup + tags: ["backup"] diff --git a/ansible/vault_cli/.travis.yml b/ansible/vault_cli/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/ansible/vault_cli/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/ansible/vault_cli/README.md b/ansible/vault_cli/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/ansible/vault_cli/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/vault_cli/defaults/main.yml b/ansible/vault_cli/defaults/main.yml new file mode 100644 index 0000000..c124169 --- /dev/null +++ b/ansible/vault_cli/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for vault_cli diff --git a/ansible/vault_cli/handlers/main.yml b/ansible/vault_cli/handlers/main.yml new file mode 100644 index 0000000..34a6494 --- /dev/null +++ b/ansible/vault_cli/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for vault_cli diff --git a/ansible/vault_cli/meta/main.yml b/ansible/vault_cli/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/ansible/vault_cli/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/vault_cli/tasks/main.yml b/ansible/vault_cli/tasks/main.yml new file mode 100644 index 0000000..24a4223 --- /dev/null +++ b/ansible/vault_cli/tasks/main.yml @@ -0,0 +1,17 @@ +--- +# Vault CLI +- name: Download vault binary + unarchive: + src: https://releases.hashicorp.com/vault/{{vault_version}}/vault_{{vault_version}}_linux_amd64.zip + dest: '{{ executable_temp_dir }}' + remote_src: true + creates: '{{ executable_temp_dir }}/vault' + mode: 0755 +- name: Move vault binary to /usr/local/bin + ansible.builtin.copy: + src: '{{ executable_temp_dir }}/vault' + dest: /usr/local/bin/vault + owner: root + group: root + mode: '0755' + become: yes diff --git a/ansible/vault_cli/tests/inventory b/ansible/vault_cli/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/ansible/vault_cli/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/vault_cli/tests/test.yml b/ansible/vault_cli/tests/test.yml new file mode 100644 index 0000000..7394ab4 --- /dev/null +++ b/ansible/vault_cli/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - vault_cli diff --git a/ansible/vault_cli/vars/main.yml b/ansible/vault_cli/vars/main.yml new file mode 100644 index 0000000..3765804 --- /dev/null +++ b/ansible/vault_cli/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for vault_cli