From cfcd468b64b3aa1e38d0adf947fcf5a0eea08e2a Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Mon, 10 Jun 2019 12:52:19 +0200 Subject: [PATCH] ansible-playbooks/general#85 Linting --- .yamllint | 8 +- README.md | 2 +- playbooks/apt-pin.yml | 45 ++++---- playbooks/aptcacheflush.yml | 10 +- playbooks/composer-apps.yml | 4 +- playbooks/etckeeper.yml | 22 ++-- playbooks/farm.yml | 44 ++++---- playbooks/firewall.yml | 13 +-- playbooks/firstuser.yml | 36 +++---- playbooks/hosts.yml | 37 +++---- playbooks/includes/dig.yml | 2 +- playbooks/init-python.yml | 34 +++--- playbooks/inithost.yml | 22 ++-- playbooks/list.yml | 14 +-- playbooks/moveip.yml | 8 +- playbooks/mysqlcopy.yml | 14 +-- playbooks/mysqlslave.yml | 22 ++-- playbooks/rebootproxies.yml | 16 +-- playbooks/removehost.yml | 4 +- playbooks/role.yml | 2 +- playbooks/sanity.yml | 168 +++++++++++++++--------------- playbooks/setup-local.yml | 62 ++++++----- playbooks/setup/apt.yml | 44 ++++---- playbooks/setup/homebrew.yml | 2 +- playbooks/setup/macports.yml | 2 +- playbooks/setup/metainventory.yml | 28 ++--- playbooks/spideroak.yml | 12 +-- playbooks/swap2ram.yml | 6 +- playbooks/user.yml | 2 +- playbooks/userlock.yml | 14 +-- playbooks/userpwd.yml | 4 +- playbooks/userunlock.yml | 10 +- playbooks/validate.yml | 44 ++++---- playbooks/xdebug.yml | 10 +- plugins/serverdensity | 2 +- roles/alerta | 2 +- roles/apache | 2 +- roles/aptproxy | 2 +- roles/cloud | 2 +- roles/common | 2 +- roles/commonauth | 2 +- roles/commonconnect | 2 +- roles/commonkeys | 2 +- roles/compass | 2 +- roles/composer | 2 +- roles/discourse | 2 +- roles/docker | 2 +- roles/drupal | 2 +- roles/drupal-cli | 2 +- roles/drupalconsole | 2 +- roles/drush | 2 +- roles/elastalert | 2 +- roles/elasticsearch | 2 +- roles/fail2ban | 2 +- roles/fluentd | 2 +- roles/fluentd-client | 2 +- roles/gcloud | 2 +- roles/gitlab | 2 +- roles/gitlab-client | 2 +- roles/gitlab-runner | 2 +- roles/golang | 2 +- roles/haproxy | 2 +- roles/heartbeat | 2 +- roles/jailkit | 2 +- roles/java | 2 +- roles/kibana | 2 +- roles/letsencrypt | 2 +- roles/mailhog | 2 +- roles/matomo | 2 +- roles/matterbridge | 2 +- roles/memcache | 2 +- roles/mongodb | 2 +- roles/mysql | 2 +- roles/mysql-client | 2 +- roles/netdata | 2 +- roles/nextcloud | 2 +- roles/nginx | 2 +- roles/nodejs | 2 +- roles/openphoto | 2 +- roles/oracle | 2 +- roles/owncloud | 2 +- roles/php | 2 +- roles/redis | 2 +- roles/s3 | 2 +- roles/satis | 2 +- roles/serverdensity | 2 +- roles/sftp | 2 +- roles/spideroak | 2 +- roles/svnserver | 2 +- roles/tomcat | 2 +- roles/uptime | 2 +- roles/user-management | 2 +- roles/varnish | 2 +- roles/virtualbox | 2 +- roles/vpn | 2 +- roles/wkhtmltopdf | 2 +- roles/youtrack | 2 +- roles/zabbix_agent | 2 +- roles/zammad | 2 +- scripts/apache-config.yml | 38 +++---- scripts/apt-pin.yml | 32 +++--- scripts/bigfiles.yml | 20 ++-- scripts/composer-app-update.yml | 18 ++-- scripts/composer-update.yml | 20 ++-- scripts/connectivity.yml | 12 +-- scripts/cronjobs.yml | 8 +- scripts/custom.yml | 6 +- scripts/drupal-config.yml | 48 ++++----- scripts/drupal-deploy.yml | 40 +++---- scripts/drupal-dump-db.yml | 52 ++++----- scripts/drupal-launch.yml | 46 ++++---- scripts/drush-aliases.yml | 32 +++--- scripts/elastalert-rules.yml | 18 ++-- scripts/elastalert.yml | 14 +-- scripts/fail2ban-config.yml | 14 +-- scripts/fail2ban.yml | 10 +- scripts/farm.yml | 4 +- scripts/firewall-config.yml | 20 ++-- scripts/firewall-unprotect.yml | 18 ++-- scripts/fluentd-client.yml | 10 +- scripts/fluentd.yml | 10 +- scripts/haproxy-blacklists.yml | 26 ++--- scripts/haproxy-certs.yml | 22 ++-- scripts/haproxy-config.yml | 22 ++-- scripts/hosts.yml | 6 +- scripts/inithost.yml | 152 +++++++++++++-------------- scripts/initpi.yml | 66 ++++++------ scripts/jailkit-update.yml | 26 ++--- scripts/jailkit-upgrade.yml | 20 ++-- scripts/jailkit-user.yml | 22 ++-- scripts/lists.yml | 14 +-- scripts/localhost.yml | 24 ++--- scripts/logrotate.yml | 8 +- scripts/matomo.yml | 50 ++++----- scripts/mysql-slave-skipone.yml | 10 +- scripts/netdata.yml | 22 ++-- scripts/network.yml | 18 ++-- scripts/nextcloud-install.yml | 38 +++---- scripts/nextcloud-plugins.yml | 44 ++++---- scripts/nextcloud.yml | 44 ++++---- scripts/playbook.yml | 4 +- scripts/rebootproxies.yml | 16 +-- scripts/removehost.yml | 28 ++--- scripts/role.yml | 14 +-- scripts/sanity.yml | 40 +++---- scripts/setup-local.yml | 46 ++++---- scripts/sftp.yml | 20 ++-- scripts/shells.yml | 28 ++--- scripts/spideroak-reinstall.yml | 14 +-- scripts/ssh.yml | 18 ++-- scripts/uptime.yml | 16 +-- scripts/useraccounts.yml | 12 +-- scripts/userfiles.yml | 18 ++-- scripts/userkeys.yml | 20 ++-- scripts/userlock.yml | 14 +-- scripts/userpwd.yml | 18 ++-- scripts/users.yml | 22 ++-- scripts/userunlock.yml | 14 +-- scripts/varnish-config.yml | 16 +-- scripts/youtrack.yml | 24 ++--- wiki | 2 +- 161 files changed, 1222 insertions(+), 1203 deletions(-) diff --git a/.yamllint b/.yamllint index 9cdc5545..21589238 100644 --- a/.yamllint +++ b/.yamllint @@ -1,10 +1,10 @@ --- -extends: 'default' +extends: default rules: truthy: - level: 'error' + level: error allowed-values: - - 'yes' - - 'no' + - yes + - no diff --git a/README.md b/README.md index d752d01a..e552ff56 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ because otherwise someone else could get access to your whole server farm. your home directory. 3. Create your vault Use the command ```ansible-vault create ~/.ansible/secrets``` and include - one line ```ansible_sudo_pass: 'YOURSUDOPASS'```. This is using your default + one line ```ansible_sudo_pass: YOURSUDOPASS```. This is using your default editor for the console but you can configure that like ```export $EDITOR=nano``` to use the nano editor as an example. When saving the file, ansible-vault will encrypt that file with your vault password contained in the vault.pwd file. diff --git a/playbooks/apt-pin.yml b/playbooks/apt-pin.yml index 30f13230..88e1de48 100644 --- a/playbooks/apt-pin.yml +++ b/playbooks/apt-pin.yml @@ -5,46 +5,49 @@ --- # file: apt-pin.yml -- name: "Status" +- name: Status hosts: all:!norootserver become: yes - tags: 'status' + tags: + - status tasks: - - name: "Get Apt Cache" + - name: Get Apt Cache shell: apt-cache show {{ package }} register: apt_cache - - name: "Get Installed Package" + - name: Get Installed Package shell: dpkg -s {{ package }} register: installed_package - - name: "Get Pin State" + - name: Get Pin State stat: path='/etc/apt/preferences.d/{{ package }}' register: pin_state - - name: "Show Apt Cache" + - name: Show Apt Cache debug: var=apt_cache.stdout - - name: "Show Installed Package" + - name: Show Installed Package debug: var=installed_package.stdout - - name: "Show Pin State" + - name: Show Pin State debug: msg="Pin state is {{ pin_state.stat.exists }}" -- name: "Pin" +- name: Pin hosts: all:!norootserver become: yes - tags: 'pin' + tags: + - pin tasks: - - name: "Pin Package" + - name: Pin Package template: - src: 'apt-pin' - dest: '/etc/apt/preferences.d/{{ package }}' - owner: 'root' - group: 'root' - mode: '644' + src: apt-pin + dest: /etc/apt/preferences.d/{{ package }} + owner: root + group: root + mode: 644 -- name: "Unpin" +- name: Unpin hosts: all:!norootserver become: yes - tags: 'unpin' + tags: + - unpin tasks: - - name: "Unpin Package" + - name: Unpin Package file: - path: '/etc/apt/preferences.d/{{ package }}' - state: 'absent' + path: /etc/apt/preferences.d/{{ package }} + state: absent diff --git a/playbooks/aptcacheflush.yml b/playbooks/aptcacheflush.yml index 219e4d6e..d9910773 100644 --- a/playbooks/aptcacheflush.yml +++ b/playbooks/aptcacheflush.yml @@ -7,23 +7,23 @@ - import_playbook: "validate.yml" -- name: "Flush Apt Cache" +- name: Flush Apt Cache hosts: apt-proxy gather_facts: false become: yes tasks: - - name: "Stop service" + - name: Stop service service: name='apt-cacher-ng' state=stopped - - name: "Delete cache" + - name: Delete cache file: path=/var/cache/apt-cacher-ng state=absent - - name: "Create empty cache" + - name: Create empty cache file: path=/var/cache/apt-cacher-ng state=directory owner=apt-cacher-ng group=apt-cacher-ng mode='755' - - name: "Start service" + - name: Start service service: name='apt-cacher-ng' state=started diff --git a/playbooks/composer-apps.yml b/playbooks/composer-apps.yml index 5b803adb..bd3ae2e2 100644 --- a/playbooks/composer-apps.yml +++ b/playbooks/composer-apps.yml @@ -5,8 +5,8 @@ --- # file: composer-app.yml -- name: "Common" +- name: Common hosts: "all:!norootserver" become: yes roles: - - 'drupal-cli' + - drupal-cli diff --git a/playbooks/etckeeper.yml b/playbooks/etckeeper.yml index a8f56dc6..3cb35191 100644 --- a/playbooks/etckeeper.yml +++ b/playbooks/etckeeper.yml @@ -5,33 +5,33 @@ # file: etckeeper.yml -- name: "Etckeeper repository" +- name: Etckeeper repository hosts: "{{ host|default('all') }}" gather_facts: false become: yes vars: gitlab: - host: 'gitlab.lakedrops.com' - hostkey: 'ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBL6B/gcLUzV1W3FtqTedAPdCB9nJIi6Q/ZiMdqBpu8P8lNz4jsDjiSbUi4Cr6j7vn3OwA3Z3NFGlaLvLXZdRaIY=' + host: gitlab.lakedrops.com + hostkey: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBL6B/gcLUzV1W3FtqTedAPdCB9nJIi6Q/ZiMdqBpu8P8lNz4jsDjiSbUi4Cr6j7vn3OwA3Z3NFGlaLvLXZdRaIY= tasks: - - name: "Ensure SSH directory" + - name: Ensure SSH directory file: - path: '/root/.ssh' - state: 'directory' - - name: "Add repo server host key to known hosts" + path: /root/.ssh + state: directory + - name: Add repo server host key to known hosts known_hosts: name: '{{ gitlab.host }}' key: "{{ gitlab.host }} {{ gitlab.hostkey }}" hash_host: yes ignore_errors: yes - - name: "Ensure Python Components" + - name: Ensure Python Components pip: name: '{{ packages }}' - state: 'present' + state: present vars: packages: - - 'python-gitlab' - - name: "Create and configure repository" + - python-gitlab + - name: Create and configure repository gitlab_host: server_url: '{{ gitlab_issue.url }}' validate_certs: true diff --git a/playbooks/farm.yml b/playbooks/farm.yml index ccd404f5..73a19109 100644 --- a/playbooks/farm.yml +++ b/playbooks/farm.yml @@ -7,13 +7,13 @@ - import_playbook: "validate.yml" -- name: "Common" +- name: Common hosts: "all:!norootserver" become: yes roles: - common -- name: "Webserver" +- name: Webserver hosts: "webserver" become: yes roles: @@ -22,7 +22,7 @@ - memcache - redis -- name: "Log servers" +- name: Log servers hosts: "logserver" become: yes roles: @@ -30,7 +30,7 @@ - kibana - elastalert -- name: "General stuff" +- name: General stuff hosts: "all:!norootserver" become: yes roles: @@ -41,26 +41,26 @@ - fail2ban - gitlab-client -- name: "Oracle servers" +- name: Oracle servers hosts: "dbserver_oracle" become: yes roles: - oracle -- name: "MySQL servers" +- name: MySQL servers hosts: "dbserver_mysql" become: yes roles: - mysql - mysql-client -- name: "MongoDB servers" +- name: MongoDB servers hosts: "dbserver-mongodb" become: yes roles: - mongodb -- name: "Drupal servers" +- name: Drupal servers hosts: "webserver_drupal" become: yes roles: @@ -71,87 +71,87 @@ - drush - drupalconsole -- name: "NextCloud servers" +- name: NextCloud servers hosts: "webserver_nextcloud" become: yes roles: - nextcloud - mysql-client -- name: "Varnish servers" +- name: Varnish servers hosts: "varnishserver" become: yes roles: - varnish -- name: "Matomo servers" +- name: Matomo servers hosts: "matomoserver:piwikserver" become: yes roles: - matomo -- name: "Proxy servers" +- name: Proxy servers hosts: "proxyserver" become: yes roles: - haproxy -- name: "GitLab servers" +- name: GitLab servers hosts: "gitlabserver" become: yes roles: - gitlab -- name: "Compass instances" +- name: Compass instances hosts: "compassinstance" become: yes roles: - compass -- name: "nodeJS servers" +- name: nodeJS servers hosts: "nodejsserver" become: yes roles: - nodejs -- name: "SVN servers" +- name: SVN servers hosts: "svnserver" become: yes roles: - svnserver -- name: "APT proxies" +- name: APT proxies hosts: "apt-proxy" become: yes roles: - aptproxy -- name: "OpenPhoto servers" +- name: OpenPhoto servers hosts: "openphotoserver" become: yes roles: - openphoto -- name: "SFTP servers" +- name: SFTP servers hosts: "sftpserver:webserver" become: yes roles: - sftp -- name: "S3 clients" +- name: S3 clients hosts: "s3client" become: yes roles: - s3 -- name: "Uptime Monitoring Servers" +- name: Uptime Monitoring Servers hosts: "uptime" become: yes roles: - uptime - matterbridge -- name: "More general stuff" +- name: More general stuff hosts: "all:!norootserver" become: yes roles: diff --git a/playbooks/firewall.yml b/playbooks/firewall.yml index 5cf53645..482c9e4f 100644 --- a/playbooks/firewall.yml +++ b/playbooks/firewall.yml @@ -7,23 +7,24 @@ - import_playbook: "validate.yml" -- name: "Unprotect Firewall for a period of time" +- name: Unprotect Firewall for a period of time hosts: all gather_facts: false become: yes - tags: 'unprotect' + tags: + - unprotect tasks: - - name: "Set flag for unprotected mode" + - name: Set flag for unprotected mode file: path='/tmp/ANSIBLE_UNPROTECT_FIREWALL' state='touch' - - name: "Restart Firewall" + - name: Restart Firewall service: name='firewall' state=restarted - - name: "Remove flag for unprotected mode" + - name: Remove flag for unprotected mode file: path='/tmp/ANSIBLE_UNPROTECT_FIREWALL' state='absent' - - name: "Queue Restart Firewall" + - name: Queue Restart Firewall shell: echo 'service firewall restart' | at now +{{ unprotect_period|default(30) }}min diff --git a/playbooks/firstuser.yml b/playbooks/firstuser.yml index 1a0ee27e..e4ca04bd 100644 --- a/playbooks/firstuser.yml +++ b/playbooks/firstuser.yml @@ -5,49 +5,49 @@ # file: firstuser.yml -- name: "Setup first user" +- name: Setup first user hosts: "{{ host|default('all') }}" gather_facts: false user: "{{ inituser|default(lookup('env','USER')) }}" become: yes vars: first_user: - - name: "{{ firstuser|default(lookup('env','USER')) }}" + - name: '{{ firstuser|default(lookup('env','USER')) }}' password: "{{ ansible_sudo_pass|default('My First Password')|password_hash('sha512') }}" - - name: "gitlab-runner" + - name: gitlab-runner password: "{{ gitlab_runner_sudo_pass|default('My First Password')|password_hash('sha512') }}" first_groups: - - name: 'sambashare' - - name: 'docker' - - name: 'www-docker' + - name: sambashare + - name: docker + - name: www-docker gid: 82 tasks: - - name: "Ensure first groups" + - name: Ensure first groups group: name: '{{ item.name }}' gid: '{{ item.gid|default(omit) }}' - state: 'present' + state: present with_items: '{{ first_groups }}' - - name: "InitHost | Create first user" + - name: InitHost | Create first user user: name: '{{ item.name }}' password: '{{ item.password }}' - group: 'root' + group: root groups: "{{ users[item.name].groups|default('root,sudo,www-data') }}" - home: '/home/{{ item.name }}' - generate_ssh_key: 'yes' + home: /home/{{ item.name }} + generate_ssh_key: yes ssh_key_bits: 2048 with_items: '{{ first_user }}' - - name: "InitHost | install user's public key for desktop-to-server communication" + - name: InitHost | install user's public key for desktop-to-server communication authorized_key: user: '{{ item.name }}' key: "{{ lookup('file', inventory_dir + '/files/keys/' + item.name + '.d2s.pub') }}" with_items: '{{ first_user }}' - - name: "Allow first user admins to have passwordless sudo" + - name: Allow first user admins to have passwordless sudo lineinfile: - dest: '/etc/sudoers' - state: 'present' - regexp: '^{{ item.name }}' + dest: /etc/sudoers + state: present + regexp: ^{{ item.name }} line: '{{ item.name }} ALL=(ALL) NOPASSWD: ALL' - validate: 'visudo -cf %s' + validate: visudo -cf %s with_items: '{{ first_user }}' diff --git a/playbooks/hosts.yml b/playbooks/hosts.yml index 735b53b2..0a2a4990 100644 --- a/playbooks/hosts.yml +++ b/playbooks/hosts.yml @@ -6,7 +6,7 @@ - import_playbook: "validate.yml" -- name: "Update local host" +- name: Update local host hosts: "all" connection: local gather_facts: false @@ -14,20 +14,20 @@ tasks: - - name: "Ensure host in /etc/hosts" + - name: Ensure host in /etc/hosts lineinfile: - dest: '/etc/hosts' + dest: /etc/hosts regexp: "^{{ hostvars[inventory_hostname]['static_ipv4'] }} " line: "{{ hostvars[inventory_hostname]['static_ipv4'] }} {{ inventory_hostname }}" delegate_to: localhost - - name: "Check if gSTM for tunnel configurations is present" + - name: Check if gSTM for tunnel configurations is present stat: path=/home/{{ lookup('env','USER') }}/.gSTM register: gstm_directory delegate_to: localhost become: false - - name: "Update gSTM tunnel configurations" + - name: Update gSTM tunnel configurations template: src=gstm dest=/home/{{ lookup('env','USER') }}/.gSTM/{{inventory_hostname}}.gstm @@ -37,10 +37,10 @@ become: false when: gstm_directory.stat.exists - - name: "Update checks for Uptime" + - name: Update checks for Uptime action: uptime - - name: "Check if local netdata installation exists" + - name: Check if local netdata installation exists local_action: stat path='/usr/share/netdata/web/index.html' delegate_to: localhost @@ -48,7 +48,7 @@ register: netdata_local_available changed_when: false - - name: "Install local dashboard" + - name: Install local dashboard template: src=tv-company.html dest=/usr/share/netdata/web/{{ lookup('env','ANSIBLE_COMPANY') }}.html @@ -59,26 +59,27 @@ run_once: true when: netdata_local_available.stat.exists - - name: "Create ssh_config file for JuiceSSH client" + - name: Create ssh_config file for JuiceSSH client template: - src: 'ssh_config.jinja2' + src: ssh_config.jinja2 dest: '{{ lookup("env","HOME") }}/.ssh/ssh_config_{{ lookup("env","ANSIBLE_COMPANY") }}' - mode: '0644' + mode: 0644 delegate_to: localhost run_once: true - - name: "Concatenate ssh_config files for JuiceSSH client" - shell: 'cat {{ lookup("env","HOME") }}/.ssh/ssh_config_* >{{ lookup("env","HOME") }}/.ssh/juice_ssh_config' + - name: Concatenate ssh_config files for JuiceSSH client + shell: cat {{ lookup("env","HOME") }}/.ssh/ssh_config_* >{{ lookup("env","HOME") }}/.ssh/juice_ssh_config delegate_to: localhost run_once: true - - name: "Update Heartbeat configurations" + - name: Update Heartbeat configurations template: - src: 'heartbeat.yml.jinja2' - dest: '/var/dev/Tools/ansible/inventory/paragon/files/heartbeat/{{ lookup("env","ANSIBLE_COMPANY") }}.yml' + src: heartbeat.yml.jinja2 + dest: /var/dev/Tools/ansible/inventory/paragon/files/heartbeat/{{ lookup("env","ANSIBLE_COMPANY") }}.yml owner: "{{ lookup('env','USER') }}" - mode: '644' + mode: 644 delegate_to: localhost run_once: true become: false - tags: "heartbeat" + tags: + - heartbeat diff --git a/playbooks/includes/dig.yml b/playbooks/includes/dig.yml index dadd8367..56efc8a9 100644 --- a/playbooks/includes/dig.yml +++ b/playbooks/includes/dig.yml @@ -8,6 +8,6 @@ that: - "'{{ main.ip }}' == '{{ lookup('dig', domain, 'qtype=A', '@8.8.8.8') }}'" - "'' == '{{ lookup('dig', domain, 'qtype=AAAA', '@8.8.8.8') }}'" - msg: 'Domain {{ domain }} has an ERROR' + msg: Domain {{ domain }} has an ERROR when: domain != 'localhost' ignore_errors: true diff --git a/playbooks/init-python.yml b/playbooks/init-python.yml index 509d130e..0e31ec19 100644 --- a/playbooks/init-python.yml +++ b/playbooks/init-python.yml @@ -5,15 +5,15 @@ # file: init-python.yml -- name: "Python cleanup" +- name: Python cleanup hosts: "{{ host|default('all') }}" gather_facts: false become: yes tasks: - - name: "Remove system components" + - name: Remove system components file: - path: '/usr/lib/python{{ item.0 }}/dist-packages/{{ item.1 }}' - state: 'absent' + path: /usr/lib/python{{ item.0 }}/dist-packages/{{ item.1 }} + state: absent with_nested: - ['2.7', '3'] - [ @@ -29,30 +29,30 @@ 'simplejson', 'simplejson-3.8.1.egg-info', ] - - name: "Remove Python Setuptools" + - name: Remove Python Setuptools apt: pkg: '{{ packages }}' state: absent vars: packages: - - 'python-setuptools' - - 'python3-setuptools' - - name: "Install Python Setuptools" + - python-setuptools + - python3-setuptools + - name: Install Python Setuptools apt: pkg: '{{ packages }}' state: latest vars: packages: - - 'python-setuptools' - - 'python3-setuptools' - - name: "Install Python Components" + - python-setuptools + - python3-setuptools + - name: Install Python Components pip: name: '{{ packages }}' - state: 'present' + state: present vars: packages: - - 'pycurl' - - 'pygobject' - - 'pyicu' - - 'pyyaml' - - 'simplejson' + - pycurl + - pygobject + - pyicu + - pyyaml + - simplejson diff --git a/playbooks/inithost.yml b/playbooks/inithost.yml index d414e73f..6d56fee3 100644 --- a/playbooks/inithost.yml +++ b/playbooks/inithost.yml @@ -4,7 +4,7 @@ --- # file: inithost.yml -- name: "Prepare cloud" +- name: Prepare cloud hosts: "localhost" connection: local gather_facts: false @@ -12,36 +12,36 @@ roles: - { role: cloud, mode: inithost } -- name: "Prepare 1" +- name: Prepare 1 hosts: "{{ host }}" connection: local gather_facts: false become: no tasks: - - name: "InitHost | Remove previous entries from known_hosts" + - name: InitHost | Remove previous entries from known_hosts known_hosts: name="{{ item }}" state="absent" with_items: - - '{{ inithostip|default(static_ipv4) }}' - - '{{ host }}' - - name: "InitHost | Copy root id to new host" + - {{ inithostip|default(static_ipv4) }} + - {{ host }} + - name: InitHost | Copy root id to new host shell: "ssh-copy-id -i {{ inituser }}@{{ inithostip|default(static_ipv4) }} -o ControlMaster=no -o PasswordAuthentication=yes -o PubkeyAuthentication=no -o IdentitiesOnly=yes" register: inithost_ssh_copy_id changed_when: "inithost_ssh_copy_id.rc != 0" failed_when: false - - name: "InitHost | Update APT" + - name: InitHost | Update APT shell: "ssh -o ControlMaster=no {{ initauth }} -o IdentitiesOnly=yes {{ inituser }}@{{ inithostip|default(static_ipv4) }} 'sudo apt-get -y update'" - - name: "InitHost | Prepare remote Python" + - name: InitHost | Prepare remote Python shell: "ssh -o ControlMaster=no {{ initauth }} -o IdentitiesOnly=yes {{ inituser }}@{{ inithostip|default(static_ipv4) }} 'sudo apt-get -y install python2.7 python-simplejson'" -- name: "Prepare 2" +- name: Prepare 2 hosts: "{{ host }}" connection: local gather_facts: false become: yes tasks: - - name: "InitHost | Include new host into /etc/hosts" + - name: InitHost | Include new host into /etc/hosts lineinfile: dest=/etc/hosts regexp="^{{ inithostip|default(static_ipv4) }} " @@ -49,7 +49,7 @@ - import_playbook: "firstuser.yml" -- name: "Security setup" +- name: Security setup hosts: "{{ host }}" gather_facts: true become: yes diff --git a/playbooks/list.yml b/playbooks/list.yml index 77f349ac..f5a2d0e8 100644 --- a/playbooks/list.yml +++ b/playbooks/list.yml @@ -7,21 +7,21 @@ - import_playbook: "validate.yml" -- name: "List Details" +- name: List Details hosts: all:!offline tasks: - - name: "Default IP (Static IP)" + - name: Default IP (Static IP) debug: msg='{{ static_ipv4 }}' -- name: "Validate DNS Records" +- name: Validate DNS Records hosts: proxyserver:!offline tasks: - - include_tasks: 'includes/dig.yml' + - include_tasks: includes/dig.yml with_items: '{{ proxy_certificates|default([]) }}' when: ip is not defined or item.ip == ip - - include_tasks: 'includes/dig.yml' + - include_tasks: includes/dig.yml with_subelements: - - '{{ proxy_certificates }}' - - 'aliases' + - {{ proxy_certificates }} + - aliases - skip_missing: 1 when: ip is not defined or item.0.ip == ip diff --git a/playbooks/moveip.yml b/playbooks/moveip.yml index 952efc34..f0a9cd01 100644 --- a/playbooks/moveip.yml +++ b/playbooks/moveip.yml @@ -7,17 +7,17 @@ - import_playbook: "validate.yml" -- name: "Move floating IP to non-active host" +- name: Move floating IP to non-active host hosts: proxyserver gather_facts: false become: yes tasks: - - name: "Move IP" + - name: Move IP jiffybox: - action: 'moveip' + action: moveip group: '{{ groups.proxyserver }}' - - name: "Wait for a grace time" + - name: Wait for a grace time pause: seconds: 30 diff --git a/playbooks/mysqlcopy.yml b/playbooks/mysqlcopy.yml index 482b7618..10ec5176 100644 --- a/playbooks/mysqlcopy.yml +++ b/playbooks/mysqlcopy.yml @@ -7,34 +7,34 @@ - import_playbook: "validate.yml" -- name: "Prepare Source" +- name: Prepare Source hosts: "{{ sourcehost }}" become: no tasks: - - name: "Dump Database" + - name: Dump Database mysql_db: login_host=127.0.0.1 name={{ dbname }} state=dump target=/tmp/{{ dbname }}.sql -- name: "Prepare Target" +- name: Prepare Target hosts: "{{ targethost }}" become: no tasks: - - name: "Copy Database to Target" + - name: Copy Database to Target shell: scp {{ sourcehost }}:/tmp/{{ dbname }}.sql /tmp/{{ dbname }}.sql - - name: "Remove Database" + - name: Remove Database mysql_db: login_host=127.0.0.1 name={{ dbname }} state=absent - - name: "Create Database" + - name: Create Database mysql_db: login_host=127.0.0.1 name={{ dbname }} state=present - - name: "Import Database" + - name: Import Database mysql_db: login_host=127.0.0.1 name={{ dbname }} diff --git a/playbooks/mysqlslave.yml b/playbooks/mysqlslave.yml index 76496266..6e59c331 100644 --- a/playbooks/mysqlslave.yml +++ b/playbooks/mysqlslave.yml @@ -16,31 +16,33 @@ - import_playbook: "validate.yml" -- name: "Skip 1 Replication Item" +- name: Skip 1 Replication Item hosts: "dbserver_mysql-slave" become: no - tags: 'skipbyone' + tags: + - skipbyone tasks: - - name: "Stop slave" + - name: Stop slave mysql_replication: mode='stopslave' - - name: "Set Skip Counter" + - name: Set Skip Counter mysql_variables: variable='sql_slave_skip_counter' value='1' - - name: "Start slave" + - name: Start slave mysql_replication: mode='startslave' -- name: "MySQL Replication" +- name: MySQL Replication hosts: "dbserver_mysql-slave" become: no - tags: 'changemaster' + tags: + - changemaster tasks: - - name: "Stop Replication" + - name: Stop Replication mysql_replication: mode='stopslave' - - name: "Change Master" + - name: Change Master mysql_replication: mode='changemaster' login_host='127.0.0.1' @@ -52,6 +54,6 @@ master_password='repl' master_log_file='{{ binlog }}' master_log_pos='{{ binpos }}' - - name: "Start Replication" + - name: Start Replication mysql_replication: mode='startslave' diff --git a/playbooks/rebootproxies.yml b/playbooks/rebootproxies.yml index b20a349b..81ab782e 100644 --- a/playbooks/rebootproxies.yml +++ b/playbooks/rebootproxies.yml @@ -7,7 +7,7 @@ - import_playbook: "validate.yml" -- name: "Reboot set of redundant proxies" +- name: Reboot set of redundant proxies hosts: proxyserver gather_facts: false become: yes @@ -15,13 +15,13 @@ - block: - - name: "Reboot hosts" - shell: 'sleep 3; reboot now' + - name: Reboot hosts + shell: sleep 3; reboot now async: 1 poll: 0 ignore_errors: true - - name: "Wait for hosts to go down" + - name: Wait for hosts to go down become: false local_action: wait_for host='{{ static_ipv4 }}' @@ -29,7 +29,7 @@ timeout=240 state='stopped' - - name: "Wait for hosts to come back" + - name: Wait for hosts to come back become: false local_action: wait_for host='{{ static_ipv4 }}' @@ -38,11 +38,11 @@ timeout=600 state='present' - - name: "Start extra services" + - name: Start extra services service: name: '{{ item }}' - state: 'started' + state: started with_items: '{{ reboot_services|default([]) }}' ignore_errors: True - when: 'proxy_active is defined and not proxy_active' + when: proxy_active is defined and not proxy_active diff --git a/playbooks/removehost.yml b/playbooks/removehost.yml index 11f0e8c0..db22936e 100644 --- a/playbooks/removehost.yml +++ b/playbooks/removehost.yml @@ -6,13 +6,13 @@ - import_playbook: "validate.yml" -- name: "Prepare cloud" +- name: Prepare cloud hosts: "{{ host }}" connection: local gather_facts: false become: no vars_prompt: - - name: "are_you_sure" + - name: are_you_sure prompt: "Really?" roles: - { role: cloud, mode: removehost } diff --git a/playbooks/role.yml b/playbooks/role.yml index 64fc6c89..82f89c2e 100644 --- a/playbooks/role.yml +++ b/playbooks/role.yml @@ -7,7 +7,7 @@ - import_playbook: "validate.yml" -- name: "Execute Role {{ role }}" +- name: Execute Role {{ role }} hosts: "{{ hostslimit|default('all') }}:!norootserver" become: yes roles: diff --git a/playbooks/sanity.yml b/playbooks/sanity.yml index a5cb6fd5..12ff25f4 100644 --- a/playbooks/sanity.yml +++ b/playbooks/sanity.yml @@ -7,25 +7,26 @@ - import_playbook: "validate.yml" -- name: "Update" +- name: Update hosts: all:!norootserver:!nosanityserver become: yes force_handlers: yes - tags: 'upgrade' + tags: + - upgrade handlers: - - name: "Update SystemCtl Deamon" + - name: Update SystemCtl Deamon # Just make sure the deamon reloads the settings systemd: daemon_reload: yes - name: 'cron' + name: cron when: ansible_distribution_major_version == '16' - - name: "Re-start extra services" + - name: Re-start extra services service: name: '{{ item }}' - state: 'restarted' + state: restarted with_items: '{{ reboot_services|default([]) }}' ignore_errors: True - - name: "Update GitLab Issue" + - name: Update GitLab Issue local_action: gitlab_issue server_url='{{ gitlab_issue.url }}' validate_certs=True @@ -41,12 +42,12 @@ update=True close='{{ executed_os_updates.failed|default(False)|ternary("False", "True") and executed_pip2_updates.failed|default(False)|ternary("False", "True") and executed_composer_updates.failed|default(False)|ternary("False", "True") and executed_node_updates.failed|default(False)|ternary("False", "True") }}' ignore_errors: True - - name: "Cleanup" - command: 'apt-get -y autoremove' + - name: Cleanup + command: apt-get -y autoremove args: warn: false tasks: - - name: "Upgrade packages" + - name: Upgrade packages apt: autoremove: yes upgrade: yes @@ -58,71 +59,72 @@ - "Re-start extra services" - "Update GitLab Issue" - "Cleanup" - - name: "Upgrade PIP2 packages" + - name: Upgrade PIP2 packages pip_update: - mode: 'upgrade' - executable: 'pip2' + mode: upgrade + executable: pip2 lsb_release: '{{ ansible_distribution_major_version }}' register: executed_pip2_updates ignore_errors: True notify: - "Update GitLab Issue" - - name: "Upgrade PIP3 packages" + - name: Upgrade PIP3 packages pip_update: - mode: 'upgrade' - executable: 'pip3' + mode: upgrade + executable: pip3 lsb_release: '{{ ansible_distribution_major_version }}' register: executed_pip3_updates ignore_errors: True notify: - "Update GitLab Issue" - - name: "Upgrade Composer packages" + - name: Upgrade Composer packages composer_update: - mode: 'upgrade' + mode: upgrade register: executed_composer_updates ignore_errors: True notify: - "Update GitLab Issue" - - name: "Upgrade Node packages" + - name: Upgrade Node packages node_update: - mode: 'upgrade' + mode: upgrade register: executed_node_updates ignore_errors: True notify: - "Update GitLab Issue" -- name: "Reboot" +- name: Reboot hosts: all:!norootserver:!nosanityserver:!{{ lookup('file', '/etc/hostname') }} become: yes - tags: 'reboot' + tags: + - reboot gather_facts: false vars: reboot_required: stat: exists: false handlers: - - name: "Cleanup Jails" - command: 'rm -rf {{ jailroot|default("/jails") }}/{{ item.jail.name }}/tmp/*' + - name: Cleanup Jails + command: rm -rf {{ jailroot|default("/jails") }}/{{ item.jail.name }}/tmp/* with_items: '{{ drupal_settings|default([]) }}' when: item.jail is defined - - name: "Reboot hosts" - shell: 'sleep 3; reboot now' + - name: Reboot hosts + shell: sleep 3; reboot now async: 1 poll: 0 ignore_errors: true tasks: - - name: "Read local facts" + - name: Read local facts setup: filter: ansible_local - block: - - name: "Force reboot even without reason" + - name: Force reboot even without reason file: - path: '/var/run/reboot-required' - state: 'touch' + path: /var/run/reboot-required + state: touch when: withoutreason|default(false) - - name: "Check for reboot" + - name: Check for reboot stat: - path: '/var/run/reboot-required' + path: /var/run/reboot-required register: reboot_required changed_when: reboot_required.stat.exists when: force|default(false) or groups.proxyserver is not defined or inventory_hostname not in groups.proxyserver @@ -131,12 +133,12 @@ - "Reboot hosts" when: ansible_local is not defined or ansible_local.reboot is not defined or not ansible_local.reboot.paused|default(false) post_tasks: - - name: "Remove reschedule reminder" + - name: Remove reschedule reminder local_action: file path='~/.ansible/hostvars/reboot/{{ inventory_hostname }}' state='absent' - block: - - name: "Update GitLab Issue" + - name: Update GitLab Issue local_action: gitlab_issue server_url='{{ gitlab_issue.url }}' validate_certs=True @@ -152,7 +154,7 @@ update=True close=False ignore_errors: True - - name: "Wait for hosts to go down" + - name: Wait for hosts to go down become: false local_action: wait_for host='{{ static_ipv4 }}' @@ -161,7 +163,7 @@ state='stopped' notify: - "Update GitLab Issue" - - name: "Wait for hosts to come back" + - name: Wait for hosts to come back become: false local_action: wait_for host='{{ static_ipv4 }}' @@ -171,13 +173,13 @@ state='present' notify: - "Close GitLab Issue" - - name: "Start extra services" + - name: Start extra services service: name: '{{ item }}' - state: 'started' + state: started with_items: '{{ reboot_services|default([]) }}' ignore_errors: True - - name: "Wait for services to become responsive" + - name: Wait for services to become responsive become: false uri: url: '{{ item.url }}' @@ -187,13 +189,13 @@ retries: '{{ item.retries|default(10) }}' delay: '{{ item.delay|default(10) }}' with_items: '{{ reboot_services_wait_for|default([]) }}' - - name: "Launch processes if they do not run yet" - shell: 'export TEST=$(pidof {{ item.validate }}) && [ -z "$TEST" ] && {{ item.shell }} || echo "{{ item.shell }} is already running"' + - name: Launch processes if they do not run yet + shell: export TEST=$(pidof {{ item.validate }}) && [ -z "$TEST" ] && {{ item.shell }} || echo "{{ item.shell }} is already running" with_items: '{{ reboot_conditional_processes|default([]) }}' register: process_output changed_when: process_output.stdout != '{{ item.shell }} is already running' ignore_errors: True - - name: "Close GitLab Issue" + - name: Close GitLab Issue local_action: gitlab_issue server_url='{{ gitlab_issue.url }}' validate_certs=True @@ -210,66 +212,66 @@ close=True when: reboot_required.stat.exists -- name: "Check APT" +- name: Check APT hosts: all:!norootserver:!nosanityserver become: yes tags: - - 'check' - - 'upgrade' + - check + - upgrade tasks: - - name: "Update apt cache" + - name: Update apt cache apt: update_cache: yes ignore_errors: true -- name: "Re-schedule Reboots" +- name: Re-schedule Reboots hosts: all gather_facts: false tags: - - 'reschedule' + - reschedule tasks: - - name: "Ensure directory for reboot schedules" + - name: Ensure directory for reboot schedules file: - path: '~/.ansible/hostvars/reboot' - state: 'directory' + path: ~/.ansible/hostvars/reboot + state: directory run_once: true delegate_to: localhost - - name: "Start atd service" + - name: Start atd service service: - name: 'atd' - state: 'started' + name: atd + state: started enabled: yes run_once: true delegate_to: localhost - - name: "Schedule Reboot" + - name: Schedule Reboot local_action: shell echo "/usr/local/bin/ascr sanity reboot --company={{ lookup('env','ANSIBLE_COMPANY') }} --limit={{ item|basename }} --force --log-path=/var/log/ansible >>/dev/null 2>&1" | at {{ lookup('file', item) }} run_once: true when: host_is_scheduler is defined and host_is_scheduler with_fileglob: - - '~/.ansible/hostvars/reboot/*' + - ~/.ansible/hostvars/reboot/* -- name: "Check Reboot" +- name: Check Reboot hosts: all:!norootserver:!nosanityserver become: yes tags: - - 'upgrade' - - 'reboot' + - upgrade + - reboot handlers: - - name: "Remember reboot schedule" + - name: Remember reboot schedule copy: content: '{{ reboot_schedule }}' - dest: '~/.ansible/hostvars/reboot/{{ inventory_hostname }}' + dest: ~/.ansible/hostvars/reboot/{{ inventory_hostname }} delegate_to: localhost when: host_is_scheduler is defined and reboot_schedule is defined and host_is_scheduler - - name: "Schedule Reboot" + - name: Schedule Reboot local_action: shell echo "/usr/local/bin/ascr sanity reboot --company={{ lookup('env','ANSIBLE_COMPANY') }} --limit={{ inventory_hostname }} --force --log-path=/var/log/ansible >>/dev/null 2>&1" | at {{ reboot_schedule }} become: no when: host_is_scheduler is defined and reboot_schedule is defined and host_is_scheduler - - name: "Get the reboot reason" + - name: Get the reboot reason shell: cat /var/run/reboot-required.pkgs register: reboot_reason ignore_errors: True - - name: "Send reboot schedule to GitLab" + - name: Send reboot schedule to GitLab local_action: gitlab_issue server_url='{{ gitlab_issue.url }}' validate_certs=True @@ -285,12 +287,12 @@ ignore_errors: True when: reboot_schedule is defined tasks: - - name: "Read local facts" + - name: Read local facts setup: filter: ansible_local - - name: "Check for reboot" + - name: Check for reboot stat: - path: '/var/run/reboot-required' + path: /var/run/reboot-required register: reboot_required changed_when: reboot_required.stat.exists when: ansible_local is not defined or ansible_local.reboot is not defined or ansible_local.reboot.check|default(true) @@ -300,17 +302,17 @@ - "Get the reboot reason" - "Send reboot schedule to GitLab" -- name: "Report" +- name: Report hosts: all:!norootserver:!nosanityserver become: yes tags: - - 'check' - - 'upgrade' + - check + - upgrade handlers: - - name: "List available updates" + - name: List available updates shell: '{{ apt_check_list|default("apt --upgradable list") }}' register: available_os_updates - - name: "Send available updates to GitLab" + - name: Send available updates to GitLab local_action: gitlab_issue server_url='{{ gitlab_issue.url }}' validate_certs=True @@ -325,7 +327,7 @@ labels='{{ gitlab_issue_label|default(omit) }}' ignore_errors: True tasks: - - name: "Check for available OS updates" + - name: Check for available OS updates shell: apt-get -s dist-upgrade args: warn: false @@ -334,34 +336,34 @@ notify: - "List available updates" - "Send available updates to GitLab" - - name: "Check for available PIP2 updates" + - name: Check for available PIP2 updates pip_update: - mode: 'check' - executable: 'pip2' + mode: check + executable: pip2 lsb_release: '{{ ansible_distribution_major_version }}' register: available_pip2_updates notify: - "List available updates" - "Send available updates to GitLab" - - name: "Check for available PIP3 updates" + - name: Check for available PIP3 updates pip_update: - mode: 'check' - executable: 'pip3' + mode: check + executable: pip3 lsb_release: '{{ ansible_distribution_major_version }}' register: available_pip3_updates notify: - "List available updates" - "Send available updates to GitLab" - - name: "Check for available Composer updates" + - name: Check for available Composer updates composer_update: - mode: 'check' + mode: check register: available_composer_updates notify: - "List available updates" - "Send available updates to GitLab" - - name: "Check for available Node updates" + - name: Check for available Node updates node_update: - mode: 'check' + mode: check register: available_node_updates notify: - "List available updates" diff --git a/playbooks/setup-local.yml b/playbooks/setup-local.yml index 0df4d1ff..a1d3f3e5 100644 --- a/playbooks/setup-local.yml +++ b/playbooks/setup-local.yml @@ -7,32 +7,35 @@ - import_playbook: "validate.yml" -- name: "Initial setup" +- name: Initial setup hosts: all gather_facts: false become: no vars: repo: "git@gitlab.lakedrops.com" tasks: - - include_tasks: 'setup/metainventory.yml' + - include_tasks: setup/metainventory.yml with_items: '{{ metainventories|default([]) }}' loop_control: loop_var: inventory - tags: 'metainventories' - - name: "Read Package Manager" + tags: + - metainventories + - name: Read Package Manager setup: filter='ansible_pkg_mgr' - tags: 'always' + tags: + - always - block: - - include_tasks: 'setup/{{ ansible_pkg_mgr }}.yml' + - include_tasks: setup/{{ ansible_pkg_mgr }}.yml ignore_errors: true - tags: 'always' - - name: "Uninstall Python Components" + tags: + - always + - name: Uninstall Python Components become: yes pip: name={{ packages }} state=absent vars: packages: - pyapi-gitlab - - name: "Install Python Components" + - name: Install Python Components become: yes pip: name={{ packages }} state=present vars: @@ -47,18 +50,19 @@ - pyuserinput - tabulate - fluent-logger - tags: 'setup' + tags: + - setup when: install_os_components - - name: "Get other repositories" + - name: Get other repositories git: accept_hostkey: yes repo: '{{ item.repo }}' dest: '{{ item.dest }}' force: '{{ item.force|default("yes") }}' track_submodules: yes - remote: 'origin' + remote: origin recursive: yes - version: 'master' + version: master with_items: - repo: "{{ repo }}:ansible-playbooks/general.git" dest: "{{ path }}" @@ -67,13 +71,14 @@ become: '{{ repo_become|default(omit) }}' become_user: '{{ repo_become_user|default(omit) }}' tags: - - 'setup' - - 'update' - - name: "Check if vault exists" + - setup + - update + - name: Check if vault exists stat: path="~/.ansible/vault.pwd" register: vault - tags: 'always' - - name: "Configure ansible" + tags: + - always + - name: Configure ansible ini_file: dest: "~/.ansible.cfg" create: yes @@ -126,15 +131,16 @@ value: "True" - option: "forks" value: "99" - tags: 'always' - - name: "Add vault to ansible configuration" + tags: + - always + - name: Add vault to ansible configuration ini_file: dest: "~/.ansible.cfg" section: "defaults" option: "vault_password_file" value: "~/.ansible/vault.pwd" when: vault.stat.exists is defined and vault.stat.exists - - name: "Shortcuts for Ansible" + - name: Shortcuts for Ansible become: yes file: src="{{ path }}{{ item.script }}" @@ -148,18 +154,18 @@ - short: "ascr" script: "ansible-script.py" tags: - - 'setup' - - 'update' - - name: "Update Script" + - setup + - update + - name: Update Script template: src='{{ item }}.sh' dest='{{ path }}{{ item }}.sh' mode='755' with_items: - - 'update' - - 'config' + - update + - config become: '{{ repo_become|default(omit) }}' become_user: '{{ repo_become_user|default(omit) }}' tags: - - 'setup' - - 'update' + - setup + - update diff --git a/playbooks/setup/apt.yml b/playbooks/setup/apt.yml index 66442777..634081d3 100644 --- a/playbooks/setup/apt.yml +++ b/playbooks/setup/apt.yml @@ -1,41 +1,41 @@ --- # file: setup/apt.yml -- name: "Install OS components" +- name: Install OS components apt: name: '{{ packages }}' - state: 'present' + state: present update_cache: yes become: yes vars: packages: - - 'idle' - - 'libcurl4-openssl-dev' - - 'libffi-dev' - - 'librsync-dev' - - 'libssl-dev' - - 'nmap' - - 'php7.0' - - 'python-dev' - - 'python-imaging' - - 'python-pmw' - - 'python-setuptools' - - 'python-tk' - - 'python3-dev' - - 'python3-setuptools' + - idle + - libcurl4-openssl-dev + - libffi-dev + - librsync-dev + - libssl-dev + - nmap + - php7.0 + - python-dev + - python-imaging + - python-pmw + - python-setuptools + - python-tk + - python3-dev + - python3-setuptools -- name: "Install PIP" +- name: Install PIP become: yes easy_install: name: '{{ item }}' with_items: - - 'pip' - - 'netifaces' + - pip + - netifaces -- name: "Install PIP3" +- name: Install PIP3 become: yes easy_install: - executable: 'easy_install3' + executable: easy_install3 name: '{{ item }}' with_items: - - 'pip' + - pip diff --git a/playbooks/setup/homebrew.yml b/playbooks/setup/homebrew.yml index 3ec470fa..5057ee6c 100644 --- a/playbooks/setup/homebrew.yml +++ b/playbooks/setup/homebrew.yml @@ -1,7 +1,7 @@ --- # file: setup/homebrew.yml -- name: "Install OS components" +- name: Install OS components homebrew: name='{{ item }}' state='present' diff --git a/playbooks/setup/macports.yml b/playbooks/setup/macports.yml index 34cd91b5..b6c7cce5 100644 --- a/playbooks/setup/macports.yml +++ b/playbooks/setup/macports.yml @@ -1,7 +1,7 @@ --- # file: setup/macports.yml -- name: "Install OS components" +- name: Install OS components macports: name='{{ item }}' state='present' diff --git a/playbooks/setup/metainventory.yml b/playbooks/setup/metainventory.yml index 399e8c74..c01a8133 100644 --- a/playbooks/setup/metainventory.yml +++ b/playbooks/setup/metainventory.yml @@ -1,37 +1,37 @@ --- # file: metainventory.yml -- name: "Prepare" +- name: Prepare file: - path: '/tmp/ansible/{{ inventory }}' + path: /tmp/ansible/{{ inventory }} state: '{{ item }}' become: '{{ repo_become|default(omit) }}' become_user: '{{ repo_become_user|default(omit) }}' with_items: - - 'absent' - - 'directory' + - absent + - directory -- name: "Clone" +- name: Clone git: accept_hostkey: yes repo: '{{ repo }}:ansible-inventories/{{ inventory }}.git' - dest: '/tmp/ansible/{{ inventory }}' - force: 'yes' + dest: /tmp/ansible/{{ inventory }} + force: yes track_submodules: yes - remote: 'origin' + remote: origin recursive: yes - version: 'master' + version: master become: '{{ repo_become|default(omit) }}' become_user: '{{ repo_become_user|default(omit) }}' -- name: "Cleanup" +- name: Cleanup shell: '{{ item }}' args: - chdir: '/tmp/ansible/{{ inventory }}' + chdir: /tmp/ansible/{{ inventory }} become: '{{ repo_become|default(omit) }}' become_user: '{{ repo_become_user|default(omit) }}' with_items: - - 'git submodule update --remote' - - 'git commit -am "Update inventory index"' - - 'git push' + - git submodule update --remote + - git commit -am "Update inventory index" + - git push ignore_errors: yes diff --git a/playbooks/spideroak.yml b/playbooks/spideroak.yml index 78d65ce2..784c223e 100644 --- a/playbooks/spideroak.yml +++ b/playbooks/spideroak.yml @@ -7,29 +7,29 @@ - import_playbook: "validate.yml" -- name: "Update" +- name: Update hosts: all:!norootserver become: yes tasks: - block: - - name: "Stop SpiderOak" + - name: Stop SpiderOak service: name='spideroak' state='stopped' pattern='SpiderOakONE' - - name: "Wait" + - name: Wait shell: sleep 5 - - name: "Show Selection" + - name: Show Selection shell: SpiderOakONE --selection register: output - - name: "Display Output" + - name: Display Output debug: var=output.stdout_lines - - name: "Start SpiderOak" + - name: Start SpiderOak service: name='spideroak' state='started' diff --git a/playbooks/swap2ram.yml b/playbooks/swap2ram.yml index e3e74bc7..1d828df6 100644 --- a/playbooks/swap2ram.yml +++ b/playbooks/swap2ram.yml @@ -7,15 +7,15 @@ - import_playbook: "validate.yml" -- name: "Swap to RAM" +- name: Swap to RAM hosts: all:!norootserver gather_facts: false become: yes tasks: - meta: clear_facts - setup: filter='*' - - name: "Swap usage" + - name: Swap usage debug: msg="Swap/Free/Cached {{ ansible_memory_mb.swap.used }} / {{ ansible_memory_mb.real.free }} / {{ ansible_memory_mb.nocache.free }}" - - name: "Switch swap off and on" + - name: Switch swap off and on shell: swapoff -a && swapon -a when: ansible_memory_mb.swap.used|int > 50 and ansible_memory_mb.real.free|int + ansible_memory_mb.nocache.free|int > ansible_memory_mb.swap.used|int diff --git a/playbooks/user.yml b/playbooks/user.yml index 92656faf..28cdfb58 100644 --- a/playbooks/user.yml +++ b/playbooks/user.yml @@ -7,7 +7,7 @@ - import_playbook: "validate.yml" -- name: "Setup all users" +- name: Setup all users hosts: all:!norootserver become: yes roles: diff --git a/playbooks/userlock.yml b/playbooks/userlock.yml index d7babe0c..5236ae8c 100644 --- a/playbooks/userlock.yml +++ b/playbooks/userlock.yml @@ -9,18 +9,18 @@ - import_playbook: "validate.yml" -- name: "Lock user on all hosts" +- name: Lock user on all hosts hosts: all:!norootserver become: yes tasks: - - name: "Lock account" - shell: 'usermod -L {{ lockuser_username }}' - - name: "Remove Key" + - name: Lock account + shell: usermod -L {{ lockuser_username }} + - name: Remove Key authorized_key: user: '{{ lockuser_username }}' key: "{{ lookup('file', inventory_dir + '/files/keys/' + lockuser_username + '.d2s.pub') }}" - state: 'absent' + state: absent exclusive: yes - - name: "IMPORTANT NOTE" + - name: IMPORTANT NOTE debug: - msg: 'If the user should be locked permanently, you have to remove them from the Ansible admin list as well.' + msg: If the user should be locked permanently, you have to remove them from the Ansible admin list as well. diff --git a/playbooks/userpwd.yml b/playbooks/userpwd.yml index 3732c5b0..f24a7e86 100644 --- a/playbooks/userpwd.yml +++ b/playbooks/userpwd.yml @@ -7,11 +7,11 @@ - import_playbook: "validate.yml" -- name: "Set Password for {{ username }}" +- name: Set Password for {{ username }} hosts: all:!norootserver become: yes tasks: - - name: "Set Password" + - name: Set Password user: name='{{ username }}' password='{{ password|password_hash("sha512") }}' diff --git a/playbooks/userunlock.yml b/playbooks/userunlock.yml index c0e8ceba..0cdc2b32 100644 --- a/playbooks/userunlock.yml +++ b/playbooks/userunlock.yml @@ -6,15 +6,15 @@ - import_playbook: "validate.yml" -- name: "Unlock user on all hosts" +- name: Unlock user on all hosts hosts: all:!norootserver become: yes tasks: - - name: "Unlock account" - shell: 'usermod -U {{ lockuser_username }}' - - name: "Add Key" + - name: Unlock account + shell: usermod -U {{ lockuser_username }} + - name: Add Key authorized_key: user: '{{ lockuser_username }}' key: "{{ lookup('file', inventory_dir + '/files/keys/' + lockuser_username + '.d2s.pub') }}" - state: 'present' + state: present exclusive: yes diff --git a/playbooks/validate.yml b/playbooks/validate.yml index bd77d128..b6fa2b43 100644 --- a/playbooks/validate.yml +++ b/playbooks/validate.yml @@ -5,51 +5,55 @@ --- # file: validate.yml -- name: "Validate" +- name: Validate hosts: all:!offline gather_facts: false - tags: 'always' + tags: + - always tasks: - - name: "Check Ansible version" + - name: Check Ansible version run_once: true delegate_to: localhost debug: msg="You need at least version 2.5.0, currently using version {{ ansible_version.full }}" failed_when: ansible_version.full is version_compare('2.5.0', operator='lt', strict=False) - - name: "Read current date and time" + - name: Read current date and time setup: filter='ansible_date_time' gather_subset=!all,min - - name: "Read IP Address" + - name: Read IP Address setup: filter='ansible_default_ipv4' gather_subset=network when: static_ipv4 is not defined or static_ipv4 == '' or ansible_default_ipv4 is not defined - - name: "Set IP Address" - set_fact: static_ipv4={{ ansible_default_ipv4.address }} + - name: Set IP Address + set_fact: + static_ipv4: '{{ ansible_default_ipv4.address }}' when: (static_ipv4 is not defined or static_ipv4 == '') and ansible_default_ipv4 is defined - block: - - name: "Set Proxy as active by default" - set_fact: proxy_active=true - - name: "Check if Proxy is active" - set_fact: proxy_active=false + - name: Set Proxy as active by default + set_fact: + proxy_active: yes + - name: Check if Proxy is active + set_fact: + proxy_active: no when: proxy_force_inactive|default(false) or (jiffybox_ips is defined and proxy_address is defined and proxy_address not in jiffybox_ips.public) when: groups.proxyserver is defined and inventory_hostname in groups.proxyserver - block: - - name: "Store Variables to Temp" + - name: Store Variables to Temp copy: content: '{{ hostvars|to_json }}' - dest: '/tmp/{{ lookup("env","ANSIBLE_COMPANY") }}.json' - mode: '664' + dest: /tmp/{{ lookup("env","ANSIBLE_COMPANY") }}.json + mode: 664 run_once: true delegate_to: localhost changed_when: false - - name: "Store Variables to Ansible" + - name: Store Variables to Ansible template: - src: '/tmp/{{ lookup("env","ANSIBLE_COMPANY") }}.json' - dest: '~/.ansible/hostvars/{{ lookup("env","ANSIBLE_COMPANY") }}.json' + src: /tmp/{{ lookup("env","ANSIBLE_COMPANY") }}.json + dest: ~/.ansible/hostvars/{{ lookup("env","ANSIBLE_COMPANY") }}.json run_once: true delegate_to: localhost changed_when: false - - name: "Remove Temp Variable Store" + - name: Remove Temp Variable Store file: - path: '/tmp/{{ lookup("env","ANSIBLE_COMPANY") }}.json' - state: 'absent' + path: /tmp/{{ lookup("env","ANSIBLE_COMPANY") }}.json + state: absent run_once: true delegate_to: localhost changed_when: false diff --git a/playbooks/xdebug.yml b/playbooks/xdebug.yml index df48d6f2..560ca6b9 100644 --- a/playbooks/xdebug.yml +++ b/playbooks/xdebug.yml @@ -43,24 +43,24 @@ - import_playbook: "validate.yml" -- name: "Configure XDebug" +- name: Configure XDebug hosts: webserver gather_facts: false become: yes handlers: - - name: "Restart Apache" + - name: Restart Apache service: name=apache2 state=restarted tasks: - - name: "Turn on/off xdebug" + - name: Turn on/off xdebug lineinfile: dest="/etc/{{ php_base_dir|default('php5') }}/{{ php_conf_dir|default('conf.d') }}/xdebug.ini" regexp="^xdebug.{{ item.name }}=" line="xdebug.{{ item.name }}={{ item.value }}" with_items: - - name: "remote_enable" + - name: remote_enable value: "{{ enable|default(0) }}" - - name: "remote_port" + - name: remote_port value: "{{ port|default(9000) }}" notify: "Restart Apache" diff --git a/plugins/serverdensity b/plugins/serverdensity index 56dfe552..e8d25f55 160000 --- a/plugins/serverdensity +++ b/plugins/serverdensity @@ -1 +1 @@ -Subproject commit 56dfe552e934160533f292518e6541de536c3e69 +Subproject commit e8d25f550eae5fdbfeffadea097dfd367769460d diff --git a/roles/alerta b/roles/alerta index b13621a4..b46f8c23 160000 --- a/roles/alerta +++ b/roles/alerta @@ -1 +1 @@ -Subproject commit b13621a4b2e89654f7f8569ce9208256dbb38547 +Subproject commit b46f8c23c5429a576a647c83c71251d9caf893c0 diff --git a/roles/apache b/roles/apache index 73d0461f..42d55cd1 160000 --- a/roles/apache +++ b/roles/apache @@ -1 +1 @@ -Subproject commit 73d0461f3ca30139487ada3a1a8adb031cf545ba +Subproject commit 42d55cd1d33f96598d8f663ca75a84d8ec28b639 diff --git a/roles/aptproxy b/roles/aptproxy index a43f205c..d36f534e 160000 --- a/roles/aptproxy +++ b/roles/aptproxy @@ -1 +1 @@ -Subproject commit a43f205cc52d1b25086fce024d7df2e932b453fb +Subproject commit d36f534e91c7c4c9d4d172bb6367d0d8ceba7026 diff --git a/roles/cloud b/roles/cloud index ae4afc57..fe244ad2 160000 --- a/roles/cloud +++ b/roles/cloud @@ -1 +1 @@ -Subproject commit ae4afc5780b8c73b9ed488d0abe2317adf3e7a7b +Subproject commit fe244ad281dc36f26f065f2d40f2ec3f4d24cc35 diff --git a/roles/common b/roles/common index 13c6d304..f59264d6 160000 --- a/roles/common +++ b/roles/common @@ -1 +1 @@ -Subproject commit 13c6d3048f5e133e5d74c2753c93a7065c0b62ac +Subproject commit f59264d6a81e38a3c598faf00bc8c9b01ebad1a0 diff --git a/roles/commonauth b/roles/commonauth index 8f0d766a..06909679 160000 --- a/roles/commonauth +++ b/roles/commonauth @@ -1 +1 @@ -Subproject commit 8f0d766a5807c7b0329a95ccb52022ddf6687970 +Subproject commit 06909679f390e1bcbff3fdd1670a344e73213d0c diff --git a/roles/commonconnect b/roles/commonconnect index 3fe101ad..5d24c9c9 160000 --- a/roles/commonconnect +++ b/roles/commonconnect @@ -1 +1 @@ -Subproject commit 3fe101adc00a84626520639bb939adcba1ca4b8a +Subproject commit 5d24c9c9b2038d96ffbda627f655db451013dbed diff --git a/roles/commonkeys b/roles/commonkeys index 30afcd00..8347b105 160000 --- a/roles/commonkeys +++ b/roles/commonkeys @@ -1 +1 @@ -Subproject commit 30afcd007db8b5356244f3b54de55d6694a95014 +Subproject commit 8347b105d4438d5f1af4d8c156ebb5ac1308bc48 diff --git a/roles/compass b/roles/compass index 13a1d619..7450e42d 160000 --- a/roles/compass +++ b/roles/compass @@ -1 +1 @@ -Subproject commit 13a1d6195002faa380cf205c4816c1e868564c7e +Subproject commit 7450e42d661fdf81b82fa405e2a97e71a8d8ab69 diff --git a/roles/composer b/roles/composer index 8a64916d..e61be347 160000 --- a/roles/composer +++ b/roles/composer @@ -1 +1 @@ -Subproject commit 8a64916d61ad3be3de979b9144f1f9ffb301d091 +Subproject commit e61be347a42dec8ccfcf11e70b8d8073087e8882 diff --git a/roles/discourse b/roles/discourse index 32a015b8..ff0699ec 160000 --- a/roles/discourse +++ b/roles/discourse @@ -1 +1 @@ -Subproject commit 32a015b817adaa66c91a3583537ad00164674618 +Subproject commit ff0699ec5c320fa7aa33478a791ebadffd127731 diff --git a/roles/docker b/roles/docker index 7432fe26..fa4edd45 160000 --- a/roles/docker +++ b/roles/docker @@ -1 +1 @@ -Subproject commit 7432fe265fdce7a29b870abfca838d02f5835bcd +Subproject commit fa4edd45b3aefd810e3954335fefc32011bb639c diff --git a/roles/drupal b/roles/drupal index 4020622a..002d0490 160000 --- a/roles/drupal +++ b/roles/drupal @@ -1 +1 @@ -Subproject commit 4020622aac629e98793141f47310b994f5599b0d +Subproject commit 002d0490a248bc663fac08b5f5c6accca80d1bcb diff --git a/roles/drupal-cli b/roles/drupal-cli index d62f0855..bd99fda4 160000 --- a/roles/drupal-cli +++ b/roles/drupal-cli @@ -1 +1 @@ -Subproject commit d62f08552345926b833633eaad1292686b1435d2 +Subproject commit bd99fda4c235f83665dc0e9b13e453f264754d9a diff --git a/roles/drupalconsole b/roles/drupalconsole index 48f1c870..14d81e18 160000 --- a/roles/drupalconsole +++ b/roles/drupalconsole @@ -1 +1 @@ -Subproject commit 48f1c870449f131ffbb2c12f1d1ffa6e74417fd7 +Subproject commit 14d81e18ea8d1020fc03ce66d77baa676b5d5a67 diff --git a/roles/drush b/roles/drush index e26e0f86..4ddc0c81 160000 --- a/roles/drush +++ b/roles/drush @@ -1 +1 @@ -Subproject commit e26e0f86df6360387890d2d14355cdb8acf65f83 +Subproject commit 4ddc0c812cabd8fca4dab0b7523e764c8b70bb0b diff --git a/roles/elastalert b/roles/elastalert index 9891d043..b0b2d823 160000 --- a/roles/elastalert +++ b/roles/elastalert @@ -1 +1 @@ -Subproject commit 9891d043726ff79629dd05d84456ffe0c844b8ac +Subproject commit b0b2d823fe78f91b5130657a4c81066771ce35c4 diff --git a/roles/elasticsearch b/roles/elasticsearch index 811fe4a0..2b9a251b 160000 --- a/roles/elasticsearch +++ b/roles/elasticsearch @@ -1 +1 @@ -Subproject commit 811fe4a04a1baa2d19a45de339f365ee13ad7488 +Subproject commit 2b9a251bb086948aea1e56df202c2367c0209822 diff --git a/roles/fail2ban b/roles/fail2ban index 1a483f0f..c1cfffe1 160000 --- a/roles/fail2ban +++ b/roles/fail2ban @@ -1 +1 @@ -Subproject commit 1a483f0f7a8d6956f01d9490dd94114ed6ecee26 +Subproject commit c1cfffe15b2c6c84f0dfd271f764666c03785c5c diff --git a/roles/fluentd b/roles/fluentd index b7697c40..330300cc 160000 --- a/roles/fluentd +++ b/roles/fluentd @@ -1 +1 @@ -Subproject commit b7697c402fdaaf8f25fe7bedc1edd9eeef177236 +Subproject commit 330300cc8569ffc15db64f594cd03d96b3ece2fc diff --git a/roles/fluentd-client b/roles/fluentd-client index 613e1d30..22a7fb52 160000 --- a/roles/fluentd-client +++ b/roles/fluentd-client @@ -1 +1 @@ -Subproject commit 613e1d300b0ed11dad6d6b8009eaab7489e1e85a +Subproject commit 22a7fb5238f4d7baa38889b4d6fc0cd9baf81f26 diff --git a/roles/gcloud b/roles/gcloud index cf56dba6..a5f9f4e6 160000 --- a/roles/gcloud +++ b/roles/gcloud @@ -1 +1 @@ -Subproject commit cf56dba605d3dbb3a423ff19b9198df5f9ccc99d +Subproject commit a5f9f4e6b464bb4c9f38221fd51f45f62da4e753 diff --git a/roles/gitlab b/roles/gitlab index 01d2dc77..72f8afb0 160000 --- a/roles/gitlab +++ b/roles/gitlab @@ -1 +1 @@ -Subproject commit 01d2dc77784e492c7c9c79a7e095d39a9e6b9659 +Subproject commit 72f8afb0e9b8fb983ecad718cabae012981a9eb8 diff --git a/roles/gitlab-client b/roles/gitlab-client index 1a44893b..ed829996 160000 --- a/roles/gitlab-client +++ b/roles/gitlab-client @@ -1 +1 @@ -Subproject commit 1a44893ba473783d52dae599c7aabee1d5350340 +Subproject commit ed8299967e04a9c2c5406bbb4d527df22d01085e diff --git a/roles/gitlab-runner b/roles/gitlab-runner index 57a8da20..8901cf42 160000 --- a/roles/gitlab-runner +++ b/roles/gitlab-runner @@ -1 +1 @@ -Subproject commit 57a8da20fbd2b57748c582ca25a0575bb20528e7 +Subproject commit 8901cf42c5862db86772c1e4527c2fb5311dd2f5 diff --git a/roles/golang b/roles/golang index e0f9c1ea..c3dd6a82 160000 --- a/roles/golang +++ b/roles/golang @@ -1 +1 @@ -Subproject commit e0f9c1eaf5c14b546701fa0b56c9d791e806522e +Subproject commit c3dd6a82720d19c7a96312a125aa0490bdc78ceb diff --git a/roles/haproxy b/roles/haproxy index 45764672..82a938ed 160000 --- a/roles/haproxy +++ b/roles/haproxy @@ -1 +1 @@ -Subproject commit 45764672063f92dba2040bf4e74424352888b06d +Subproject commit 82a938edf8ef84d0a2b4e1182d8efe85e1c02bb8 diff --git a/roles/heartbeat b/roles/heartbeat index 689480e7..adaf4c6a 160000 --- a/roles/heartbeat +++ b/roles/heartbeat @@ -1 +1 @@ -Subproject commit 689480e702c63ae8c26925e6629d958e98ada75c +Subproject commit adaf4c6abbdd7d04be6e2b9eadb97d1165172142 diff --git a/roles/jailkit b/roles/jailkit index 06010f4b..f1c0bf1f 160000 --- a/roles/jailkit +++ b/roles/jailkit @@ -1 +1 @@ -Subproject commit 06010f4bd521eae66cf5e6fa26bfaa3415400b7a +Subproject commit f1c0bf1f1293be65ddcb5a3c2278b346d3dc9915 diff --git a/roles/java b/roles/java index 335e50b6..24aa8fed 160000 --- a/roles/java +++ b/roles/java @@ -1 +1 @@ -Subproject commit 335e50b617242e843c592402d07d9bdd0a27c9da +Subproject commit 24aa8fed759f419dd558f9b8182bfe9e67e6995d diff --git a/roles/kibana b/roles/kibana index f0a08e83..bfa984d5 160000 --- a/roles/kibana +++ b/roles/kibana @@ -1 +1 @@ -Subproject commit f0a08e8398d94a0fcd56ea82bdf3ba85b266bb2d +Subproject commit bfa984d5c6f18bee474efb566ecedc7a8782d254 diff --git a/roles/letsencrypt b/roles/letsencrypt index 00251859..47acb75a 160000 --- a/roles/letsencrypt +++ b/roles/letsencrypt @@ -1 +1 @@ -Subproject commit 00251859025ebe7bab6b99777b2437c23a241dd5 +Subproject commit 47acb75ad542309acfa18df6ef5086dfcc46412b diff --git a/roles/mailhog b/roles/mailhog index 8b6025d1..2562fd52 160000 --- a/roles/mailhog +++ b/roles/mailhog @@ -1 +1 @@ -Subproject commit 8b6025d14f32f11d9ab747e27dbc6d85d0efbb35 +Subproject commit 2562fd520d3fb0c8b9aeb5fe782c15a87cfb35d6 diff --git a/roles/matomo b/roles/matomo index a6c6b1e2..8247f38b 160000 --- a/roles/matomo +++ b/roles/matomo @@ -1 +1 @@ -Subproject commit a6c6b1e26b1fadd38ffd5eff15343fe6f7298c7a +Subproject commit 8247f38bf56ff05af729e6e884605f381f45e5b8 diff --git a/roles/matterbridge b/roles/matterbridge index ae244aa6..2e633dca 160000 --- a/roles/matterbridge +++ b/roles/matterbridge @@ -1 +1 @@ -Subproject commit ae244aa6640f3f5e690c4a7b195d2cdbc9935eef +Subproject commit 2e633dcad27089819df058cfeae16e40c713d346 diff --git a/roles/memcache b/roles/memcache index 05f92fb8..1a0ace70 160000 --- a/roles/memcache +++ b/roles/memcache @@ -1 +1 @@ -Subproject commit 05f92fb85d1e9a3dd124a6a4014868c4b1660ecd +Subproject commit 1a0ace7019574d9812f59fbc8659ae98103ea3d4 diff --git a/roles/mongodb b/roles/mongodb index bbbb58de..1af80125 160000 --- a/roles/mongodb +++ b/roles/mongodb @@ -1 +1 @@ -Subproject commit bbbb58deef2b28864b640b16c8b8e9b2f0cebe24 +Subproject commit 1af80125eb293b2d7ff18a1e3d399b941138974f diff --git a/roles/mysql b/roles/mysql index 056458a6..b4f6b995 160000 --- a/roles/mysql +++ b/roles/mysql @@ -1 +1 @@ -Subproject commit 056458a6045d2704dbc3f2623d692579bb7fadd6 +Subproject commit b4f6b995361a22d6088ebb5b7356359b617de66d diff --git a/roles/mysql-client b/roles/mysql-client index 375555e1..74b34ef4 160000 --- a/roles/mysql-client +++ b/roles/mysql-client @@ -1 +1 @@ -Subproject commit 375555e16a7f9f0e4cc9f353f74366430f6566be +Subproject commit 74b34ef4b47491b9f5dab27d46681e7d89015394 diff --git a/roles/netdata b/roles/netdata index ad73aed4..88486110 160000 --- a/roles/netdata +++ b/roles/netdata @@ -1 +1 @@ -Subproject commit ad73aed47209337042d90684f01531f34737abbc +Subproject commit 884861104c594cd31939009af92dfbfb4a8a1ece diff --git a/roles/nextcloud b/roles/nextcloud index eb07fcf1..2a3e7049 160000 --- a/roles/nextcloud +++ b/roles/nextcloud @@ -1 +1 @@ -Subproject commit eb07fcf177db8c8b23f9628f914d4fb57972a7e2 +Subproject commit 2a3e7049c5b5066ee0e38c12f596fe154f310be6 diff --git a/roles/nginx b/roles/nginx index 9deee739..2c707220 160000 --- a/roles/nginx +++ b/roles/nginx @@ -1 +1 @@ -Subproject commit 9deee73993bd0edbd43453e735ba644e45dbd114 +Subproject commit 2c707220e8a50abab2dfeec54130ef2ceeed2e98 diff --git a/roles/nodejs b/roles/nodejs index fcf9bb71..8facd7c9 160000 --- a/roles/nodejs +++ b/roles/nodejs @@ -1 +1 @@ -Subproject commit fcf9bb71c1fb6bcbda3bfb78c27ab25db5161da8 +Subproject commit 8facd7c944bfdb005e256bafe96c736eb1164cfe diff --git a/roles/openphoto b/roles/openphoto index 1595aefe..5d6586fd 160000 --- a/roles/openphoto +++ b/roles/openphoto @@ -1 +1 @@ -Subproject commit 1595aefee40989d65e9bfc5a7a911e15a369a993 +Subproject commit 5d6586fdb6cda08d49903b63b0e10ced695a1aa2 diff --git a/roles/oracle b/roles/oracle index dc3438ad..952af903 160000 --- a/roles/oracle +++ b/roles/oracle @@ -1 +1 @@ -Subproject commit dc3438adc73608b20dca4669f29fbee2f2c08a19 +Subproject commit 952af903dc21275a07ac7362448d3c8da74ce827 diff --git a/roles/owncloud b/roles/owncloud index db2067be..fac5abe7 160000 --- a/roles/owncloud +++ b/roles/owncloud @@ -1 +1 @@ -Subproject commit db2067be5c0d53cf0b5869cc4fd5b2b9d60fb78c +Subproject commit fac5abe77650435362b418c01626ec1e0b6a1c12 diff --git a/roles/php b/roles/php index f0081b5b..87b3b368 160000 --- a/roles/php +++ b/roles/php @@ -1 +1 @@ -Subproject commit f0081b5b4b8fbc81922acc43fe1ede0048346262 +Subproject commit 87b3b368b1846de50aa0caaa2a316948235cbb54 diff --git a/roles/redis b/roles/redis index b5b6662a..d9018337 160000 --- a/roles/redis +++ b/roles/redis @@ -1 +1 @@ -Subproject commit b5b6662a3b7a89c73ca091661eb0e0edcbfe4dac +Subproject commit d901833735b61ae034f301127d623922b8842783 diff --git a/roles/s3 b/roles/s3 index 00d0e3b5..b661dd06 160000 --- a/roles/s3 +++ b/roles/s3 @@ -1 +1 @@ -Subproject commit 00d0e3b56f9fe69f8c591500cdd7e883bde64ddf +Subproject commit b661dd06c517241d89dab61f04d1df32ebe1bc12 diff --git a/roles/satis b/roles/satis index b354b93a..1a6ae5d5 160000 --- a/roles/satis +++ b/roles/satis @@ -1 +1 @@ -Subproject commit b354b93a0ac4101c9e0652845340b757aa6e124c +Subproject commit 1a6ae5d586754a19414f8a526c78501992782d1c diff --git a/roles/serverdensity b/roles/serverdensity index f02df753..e7fd0d22 160000 --- a/roles/serverdensity +++ b/roles/serverdensity @@ -1 +1 @@ -Subproject commit f02df753545d93f8abe0bb5b1b0f5bd865a1db0c +Subproject commit e7fd0d2241903c3a1f11cc5761e89d49f2e4fc21 diff --git a/roles/sftp b/roles/sftp index f574a02b..1cbf9fff 160000 --- a/roles/sftp +++ b/roles/sftp @@ -1 +1 @@ -Subproject commit f574a02bbfe706d37887fdd138ab7c11c131c54d +Subproject commit 1cbf9fffb18abbbe6d215b754c2db864bccb9b84 diff --git a/roles/spideroak b/roles/spideroak index cc4dba49..51aa672d 160000 --- a/roles/spideroak +++ b/roles/spideroak @@ -1 +1 @@ -Subproject commit cc4dba492a21b76568679cd3c91e35189936967d +Subproject commit 51aa672d18b6da44ba381219c42486a3f9e7ee6e diff --git a/roles/svnserver b/roles/svnserver index d0d25ec8..ce7dfb88 160000 --- a/roles/svnserver +++ b/roles/svnserver @@ -1 +1 @@ -Subproject commit d0d25ec895ce70ccd5047ffb6906321397eac45a +Subproject commit ce7dfb881f98a4ebfa51977a56d9e2b75d351081 diff --git a/roles/tomcat b/roles/tomcat index 09147cae..6f76ca19 160000 --- a/roles/tomcat +++ b/roles/tomcat @@ -1 +1 @@ -Subproject commit 09147cae0e65160d16ebd0b9e1746429241dd4f7 +Subproject commit 6f76ca193105e4ffd2f17767e0da44e5657e4a34 diff --git a/roles/uptime b/roles/uptime index 98265c7b..ee9f8612 160000 --- a/roles/uptime +++ b/roles/uptime @@ -1 +1 @@ -Subproject commit 98265c7bd9350017866adc755d496003e4a081c3 +Subproject commit ee9f8612b8d291af5a09f76afdce4b8c1c217a1b diff --git a/roles/user-management b/roles/user-management index b7c970c6..e6bd68fb 160000 --- a/roles/user-management +++ b/roles/user-management @@ -1 +1 @@ -Subproject commit b7c970c6915fe273c55dce695eb3b647781f5179 +Subproject commit e6bd68fb81353e3872e6472be707b428c7d269fc diff --git a/roles/varnish b/roles/varnish index 2dd079f9..6b7179d3 160000 --- a/roles/varnish +++ b/roles/varnish @@ -1 +1 @@ -Subproject commit 2dd079f9c846fb2cfd7bb1b15b95d2e7136db44a +Subproject commit 6b7179d354962232456ff12206042bca78cb451c diff --git a/roles/virtualbox b/roles/virtualbox index 622e0e8e..4126ae61 160000 --- a/roles/virtualbox +++ b/roles/virtualbox @@ -1 +1 @@ -Subproject commit 622e0e8eaf1084671f83d14997386e4ea6d689f2 +Subproject commit 4126ae614112d2e6c10275852b5f3d0332566469 diff --git a/roles/vpn b/roles/vpn index b40b39c9..dd431749 160000 --- a/roles/vpn +++ b/roles/vpn @@ -1 +1 @@ -Subproject commit b40b39c90e09179e18a9d0d99975a66d5de47dc2 +Subproject commit dd43174974e164aeee7ff8f430497aa3b8402165 diff --git a/roles/wkhtmltopdf b/roles/wkhtmltopdf index 0046e277..b9620023 160000 --- a/roles/wkhtmltopdf +++ b/roles/wkhtmltopdf @@ -1 +1 @@ -Subproject commit 0046e2773af8e56ace3ef3958cea533629a8278a +Subproject commit b9620023b4319ef97aba822fe7a8c37f85e61efd diff --git a/roles/youtrack b/roles/youtrack index a99286e3..1b465af6 160000 --- a/roles/youtrack +++ b/roles/youtrack @@ -1 +1 @@ -Subproject commit a99286e34e8f14f0e0359b16979bc88a94cae701 +Subproject commit 1b465af619d2c780be56e1d6c2283c7e6f35bd64 diff --git a/roles/zabbix_agent b/roles/zabbix_agent index 48ff1fee..fde5965e 160000 --- a/roles/zabbix_agent +++ b/roles/zabbix_agent @@ -1 +1 @@ -Subproject commit 48ff1fee691263de469e175c97fc0f0469cbc7c5 +Subproject commit fde5965e11a7be6e69e7bbb2bb9fad6adcf91daa diff --git a/roles/zammad b/roles/zammad index 190d839f..299baa64 160000 --- a/roles/zammad +++ b/roles/zammad @@ -1 +1 @@ -Subproject commit 190d839fc98996d4454e6fe0bdd74a3a1f8b5c9b +Subproject commit 299baa64c89d16f7c5f30597ae00cc1c2b740404 diff --git a/scripts/apache-config.yml b/scripts/apache-config.yml index b295f283..dbdd1749 100644 --- a/scripts/apache-config.yml +++ b/scripts/apache-config.yml @@ -1,29 +1,29 @@ -description: 'Quickly configure Apache' +description: Quickly configure Apache cli: options: application: - default: 'apache' - help: 'The application to configure Apache for, e.g. apache, drupal, matomo, nextcloud, kibana' + default: apache + help: The application to configure Apache for, e.g. apache, drupal, matomo, nextcloud, kibana site: default: False - help: 'The id of a site (only useful with certain applications like Drupal or Matomo)' + help: The id of a site (only useful with certain applications like Drupal or Matomo) arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' - - 'common' - - 'php' + - commonauth + - commonconnect + - common + - php command: - - name: 'tags' - value: 'ApacheConfig' - - name: 'extra-vars' - value: 'hostslimit=%s role=%s' + - name: tags + value: ApacheConfig + - name: extra-vars + value: hostslimit=%s role=%s args: - - 'limit' - - 'application' - - name: 'extra-vars' - condition: 'site' - value: 'limit_site=%s' + - limit + - application + - name: extra-vars + condition: site + value: limit_site=%s args: - - 'site' + - site diff --git a/scripts/apt-pin.yml b/scripts/apt-pin.yml index 5cc5d82a..48588b3b 100644 --- a/scripts/apt-pin.yml +++ b/scripts/apt-pin.yml @@ -1,27 +1,27 @@ -description: 'Pin, unpin or show status of packages' +description: Pin, unpin or show status of packages cli: arguments: mode: choices: - - 'status' - - 'pin' - - 'unpin' - help: 'Mode for the pinning' + - status + - pin + - unpin + help: Mode for the pinning package: - help: 'Name of the package' + help: Name of the package options: version: - default: '*' - help: 'Version for which you want to pin' + default: * + help: Version for which you want to pin arguments: - playbook: 'apt-pin' + playbook: apt-pin command: - - name: 'tags' - value: '%s' + - name: tags + value: %s args: - - 'mode' - - name: 'extra-vars' - value: 'package=%s version=%s' + - mode + - name: extra-vars + value: package=%s version=%s args: - - 'package' - - 'version' + - package + - version diff --git a/scripts/bigfiles.yml b/scripts/bigfiles.yml index 68b8886f..fc1caec4 100644 --- a/scripts/bigfiles.yml +++ b/scripts/bigfiles.yml @@ -1,17 +1,17 @@ -description: 'Find big files / directories' +description: Find big files / directories cli: options: depth: default: 5 - help: 'How many directories deep this should parse' + help: How many directories deep this should parse threshold: - default: '1G' - help: 'Only show directories bigger than this' + default: 1G + help: Only show directories bigger than this command: - - name: 'module-name' - value: 'command' - - name: 'args' - value: 'du -xchd %s --threshold=%s /' + - name: module-name + value: command + - name: args + value: du -xchd %s --threshold=%s / args: - - 'depth' - - 'threshold' + - depth + - threshold diff --git a/scripts/composer-app-update.yml b/scripts/composer-app-update.yml index 0879ca9b..b840054e 100644 --- a/scripts/composer-app-update.yml +++ b/scripts/composer-app-update.yml @@ -1,13 +1,13 @@ -description: 'Update Composer applications' +description: Update Composer applications cli: defaults: - limit: 'webserver' + limit: webserver arguments: - playbook: 'composer-apps' + playbook: composer-apps roles_exclude: - - 'commonauth' - - 'commonconnect' - - 'common' - - 'apache' - - 'php' - - 'jailkit' + - commonauth + - commonconnect + - common + - apache + - php + - jailkit diff --git a/scripts/composer-update.yml b/scripts/composer-update.yml index c89e7dfb..26c766a2 100644 --- a/scripts/composer-update.yml +++ b/scripts/composer-update.yml @@ -1,16 +1,16 @@ -description: 'Update Composer itself and global packages' +description: Update Composer itself and global packages cli: defaults: - limit: 'webserver' + limit: webserver arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=composer' + - name: extra-vars + value: hostslimit=%s role=composer args: - - 'limit' - - name: 'tags' - value: 'update' + - limit + - name: tags + value: update follower: - - 'composer-app-update' - - 'jailkit-upgrade' + - composer-app-update + - jailkit-upgrade diff --git a/scripts/connectivity.yml b/scripts/connectivity.yml index ed8d8c1a..6aa0ce9c 100644 --- a/scripts/connectivity.yml +++ b/scripts/connectivity.yml @@ -1,12 +1,12 @@ -description: 'Update hosts and ssh config' +description: Update hosts and ssh config cli: defaults: - limit: 'all' + limit: all include_local: True arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=commonconnect' + - name: extra-vars + value: hostslimit=%s role=commonconnect args: - - 'limit' + - limit diff --git a/scripts/cronjobs.yml b/scripts/cronjobs.yml index 93d7973b..92d749e2 100644 --- a/scripts/cronjobs.yml +++ b/scripts/cronjobs.yml @@ -1,6 +1,6 @@ -description: 'Update Cron Jobs' +description: Update Cron Jobs arguments: - playbook: 'farm' + playbook: farm command: - - name: 'tags' - value: 'cron' + - name: tags + value: cron diff --git a/scripts/custom.yml b/scripts/custom.yml index f4ad282f..a950238d 100644 --- a/scripts/custom.yml +++ b/scripts/custom.yml @@ -1,7 +1,7 @@ -description: 'Run a custom playbook from the inventory' +description: Run a custom playbook from the inventory cli: arguments: playbook: - help: 'Name of the playbook' + help: Name of the playbook arguments: - custom: 'True' + custom: True diff --git a/scripts/drupal-config.yml b/scripts/drupal-config.yml index 9620ff1a..ba9fa526 100644 --- a/scripts/drupal-config.yml +++ b/scripts/drupal-config.yml @@ -1,39 +1,39 @@ -description: 'Quickly configure Drupal sites' +description: Quickly configure Drupal sites cli: arguments: limit: default: False - help: 'The hostname on which to re-reploy Drupal' + help: The hostname on which to re-reploy Drupal site: default: False - help: 'The id of a site' + help: The id of a site options: quick: - action: 'store_true' + action: store_true default: False - help: 'Only Drupal itself, not the CLI or JailKit' + help: Only Drupal itself, not the CLI or JailKit arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' - - 'common' - - 'php' - - 'apache' + - commonauth + - commonconnect + - common + - php + - apache command: - - name: 'extra-vars' - value: 'hostslimit=%s role=drupal' + - name: extra-vars + value: hostslimit=%s role=drupal args: - - 'limit' - - name: 'extra-vars' - condition: 'site' - value: 'limit_site=%s' + - limit + - name: extra-vars + condition: site + value: limit_site=%s args: - - 'site' - - name: 'start-at-task' - condition: 'quick' - value: 'Drupal Role' + - site + - name: start-at-task + condition: quick + value: Drupal Role follower: - - 'jailkit-user' - - 'drush-aliases' - - 'fluentd-client' + - jailkit-user + - drush-aliases + - fluentd-client diff --git a/scripts/drupal-deploy.yml b/scripts/drupal-deploy.yml index a829e4e8..0e215bdd 100644 --- a/scripts/drupal-deploy.yml +++ b/scripts/drupal-deploy.yml @@ -1,31 +1,31 @@ -description: 'Quickly re-deploy a Drupal site' +description: Quickly re-deploy a Drupal site cli: arguments: host: default: False - help: 'The hostname on which to re-reploy Drupal' + help: The hostname on which to re-reploy Drupal site: default: False - help: 'The id of a site' + help: The id of a site arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' - - 'common' - - 'php' - - 'apache' - - 'jailkit' + - commonauth + - commonconnect + - common + - php + - apache + - jailkit command: - - name: 'tags' - value: 'deploy' - - name: 'extra-vars' - value: 'hostslimit=%s role=drupal' + - name: tags + value: deploy + - name: extra-vars + value: hostslimit=%s role=drupal args: - - 'host' - - name: 'extra-vars' - value: 'limit_site=%s' + - host + - name: extra-vars + value: limit_site=%s args: - - 'site' - - name: 'start-at-task' - value: 'Install Drupal' + - site + - name: start-at-task + value: Install Drupal diff --git a/scripts/drupal-dump-db.yml b/scripts/drupal-dump-db.yml index 2de3c891..85c6c152 100644 --- a/scripts/drupal-dump-db.yml +++ b/scripts/drupal-dump-db.yml @@ -1,40 +1,40 @@ -description: 'Dump and download Drupal database' +description: Dump and download Drupal database cli: arguments: host: default: False - help: 'The hostname of the Drupal site' + help: The hostname of the Drupal site site: default: False - help: 'The id of a site' + help: The id of a site dumpfilename: default: False - help: 'The filename of the downloaded dump file' + help: The filename of the downloaded dump file arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' - - 'common' - - 'php' - - 'apache' - - 'jailkit' + - commonauth + - commonconnect + - common + - php + - apache + - jailkit command: - - name: 'tags' - value: 'collect_db_dump' - - name: 'extra-vars' - value: 'hostslimit=%s role=drupal' + - name: tags + value: collect_db_dump + - name: extra-vars + value: hostslimit=%s role=drupal args: - - 'host' - - name: 'extra-vars' - value: 'limit_site=%s' + - host + - name: extra-vars + value: limit_site=%s args: - - 'site' - - name: 'extra-vars' - value: 'dump_file=%s' + - site + - name: extra-vars + value: dump_file=%s args: - - 'dumpfilename' - - name: 'extra-vars' - value: 'collect_db_dump=TRUE' - - name: 'start-at-task' - value: 'Drupal Role' + - dumpfilename + - name: extra-vars + value: collect_db_dump=TRUE + - name: start-at-task + value: Drupal Role diff --git a/scripts/drupal-launch.yml b/scripts/drupal-launch.yml index 2789ce2e..a10e2fcd 100644 --- a/scripts/drupal-launch.yml +++ b/scripts/drupal-launch.yml @@ -1,37 +1,37 @@ -description: 'Launch a Drupal site by creating certs, configure HaProxy, Apache and Drupal' +description: Launch a Drupal site by creating certs, configure HaProxy, Apache and Drupal cli: arguments: host: default: False - help: 'The hostname on which to launch Drupal' + help: The hostname on which to launch Drupal site: default: False - help: 'The id of a site' + help: The id of a site defaults: - limit: 'proxyserver' + limit: proxyserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' - - 'common' + - commonauth + - commonconnect + - common command: - - name: 'tags' - value: 'Certs' - - name: 'extra-vars' - value: 'hostslimit=proxyserver role=haproxy' + - name: tags + value: Certs + - name: extra-vars + value: hostslimit=proxyserver role=haproxy follower: - - 'haproxy-config' - - 'varnish-config' - - script: 'apache-config' + - haproxy-config + - varnish-config + - script: apache-config command: - - name: 'limit' - value: '%s' + - name: limit + value: %s args: - - 'host' - - name: 'application' - value: 'drupal' - - name: 'site' - value: '%s' + - host + - name: application + value: drupal + - name: site + value: %s args: - - 'site' + - site diff --git a/scripts/drush-aliases.yml b/scripts/drush-aliases.yml index b90b7151..c2d9c735 100644 --- a/scripts/drush-aliases.yml +++ b/scripts/drush-aliases.yml @@ -1,27 +1,27 @@ -description: 'Retrieve and adjust Drush aliases from remote host(s)' +description: Retrieve and adjust Drush aliases from remote host(s) cli: options: site: default: False - help: 'The id of a site if only one of the defined sites should be updated' + help: The id of a site if only one of the defined sites should be updated fetch: - action: 'store_true' + action: store_true default: False - help: 'Only fetch the latest version of the alias definitions' + help: Only fetch the latest version of the alias definitions defaults: - limit: 'webserver_drupal' + limit: webserver_drupal arguments: - playbook: 'role' + playbook: role command: - - name: 'tags' - condition: 'fetch' - value: 'DrushUpdateAliases' - - name: 'extra-vars' - value: 'hostslimit=%s role=drush' + - name: tags + condition: fetch + value: DrushUpdateAliases + - name: extra-vars + value: hostslimit=%s role=drush args: - - 'limit' - - name: 'extra-vars' - condition: 'site' - value: 'limit_site=%s' + - limit + - name: extra-vars + condition: site + value: limit_site=%s args: - - 'site' + - site diff --git a/scripts/elastalert-rules.yml b/scripts/elastalert-rules.yml index ddeff1e7..135d5ba0 100644 --- a/scripts/elastalert-rules.yml +++ b/scripts/elastalert-rules.yml @@ -1,15 +1,15 @@ -description: 'Update ElastAlert rules' +description: Update ElastAlert rules cli: defaults: - limit: 'logserver' + limit: logserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'elasticsearch' + - elasticsearch command: - - name: 'tags' - value: 'Rules' - - name: 'extra-vars' - value: 'hostslimit=%s role=elastalert' + - name: tags + value: Rules + - name: extra-vars + value: hostslimit=%s role=elastalert args: - - 'limit' + - limit diff --git a/scripts/elastalert.yml b/scripts/elastalert.yml index 3f88c5b3..16f109a5 100644 --- a/scripts/elastalert.yml +++ b/scripts/elastalert.yml @@ -1,13 +1,13 @@ -description: 'Update ElastAlert application' +description: Update ElastAlert application cli: defaults: - limit: 'logserver' + limit: logserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'elasticsearch' + - elasticsearch command: - - name: 'extra-vars' - value: 'hostslimit=%s role=elastalert' + - name: extra-vars + value: hostslimit=%s role=elastalert args: - - 'limit' + - limit diff --git a/scripts/fail2ban-config.yml b/scripts/fail2ban-config.yml index 00103cc8..a7f4bb6e 100644 --- a/scripts/fail2ban-config.yml +++ b/scripts/fail2ban-config.yml @@ -1,10 +1,10 @@ -description: 'Configure Fail2Ban' +description: Configure Fail2Ban arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=fail2ban' + - name: extra-vars + value: hostslimit=%s role=fail2ban args: - - 'limit' - - name: 'tags' - value: 'configure' + - limit + - name: tags + value: configure diff --git a/scripts/fail2ban.yml b/scripts/fail2ban.yml index 74895019..61ebd54e 100644 --- a/scripts/fail2ban.yml +++ b/scripts/fail2ban.yml @@ -1,8 +1,8 @@ -description: 'Configure Fail2Ban' +description: Configure Fail2Ban arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=fail2ban' + - name: extra-vars + value: hostslimit=%s role=fail2ban args: - - 'limit' + - limit diff --git a/scripts/farm.yml b/scripts/farm.yml index 4f6f41a9..9f633c75 100644 --- a/scripts/farm.yml +++ b/scripts/farm.yml @@ -1,3 +1,3 @@ -description: 'Run the farm playbook' +description: Run the farm playbook arguments: - playbook: 'farm' + playbook: farm diff --git a/scripts/firewall-config.yml b/scripts/firewall-config.yml index ea7860e2..7ca9c234 100644 --- a/scripts/firewall-config.yml +++ b/scripts/firewall-config.yml @@ -1,14 +1,14 @@ -description: 'Rebuild Firewall Configuration' +description: Rebuild Firewall Configuration arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' + - commonauth + - commonconnect command: - - name: 'flush-cache' - - name: 'tags' - value: 'firewall' - - name: 'extra-vars' - value: 'hostslimit=%s role=common' + - name: flush-cache + - name: tags + value: firewall + - name: extra-vars + value: hostslimit=%s role=common args: - - 'limit' + - limit diff --git a/scripts/firewall-unprotect.yml b/scripts/firewall-unprotect.yml index 55f95178..ffef02f5 100644 --- a/scripts/firewall-unprotect.yml +++ b/scripts/firewall-unprotect.yml @@ -1,16 +1,16 @@ -description: 'Switch Firewall to unprotected mode for a period of time' +description: Switch Firewall to unprotected mode for a period of time cli: options: unprotect-period: default: False - help: 'Number of minutes before the firewall goes into protected mode again' + help: Number of minutes before the firewall goes into protected mode again arguments: - playbook: 'firewall' + playbook: firewall command: - - name: 'tags' - value: 'unprotect' - - name: 'extra-vars' - condition: 'unprotect_period' - value: 'unprotect_period=%s' + - name: tags + value: unprotect + - name: extra-vars + condition: unprotect_period + value: unprotect_period=%s args: - - 'unprotect_period' + - unprotect_period diff --git a/scripts/fluentd-client.yml b/scripts/fluentd-client.yml index 3d42c785..b79851ff 100644 --- a/scripts/fluentd-client.yml +++ b/scripts/fluentd-client.yml @@ -1,8 +1,8 @@ -description: 'Configure FluentD / td-agent Client' +description: Configure FluentD / td-agent Client arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=fluentd-client' + - name: extra-vars + value: hostslimit=%s role=fluentd-client args: - - 'limit' + - limit diff --git a/scripts/fluentd.yml b/scripts/fluentd.yml index 9691e1f0..94704f97 100644 --- a/scripts/fluentd.yml +++ b/scripts/fluentd.yml @@ -1,8 +1,8 @@ -description: 'Configure FluentD / td-agent' +description: Configure FluentD / td-agent arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=fluentd' + - name: extra-vars + value: hostslimit=%s role=fluentd args: - - 'limit' + - limit diff --git a/scripts/haproxy-blacklists.yml b/scripts/haproxy-blacklists.yml index a0641ec8..78931bd8 100644 --- a/scripts/haproxy-blacklists.yml +++ b/scripts/haproxy-blacklists.yml @@ -1,19 +1,19 @@ -description: 'Quickly update blacklists for HaProxy' +description: Quickly update blacklists for HaProxy cli: defaults: - limit: 'proxyserver' + limit: proxyserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' - - 'common' - - 'letsencrypt' + - commonauth + - commonconnect + - common + - letsencrypt command: - - name: 'flush-cache' - - name: 'tags' - value: 'Blacklists' - - name: 'extra-vars' - value: 'hostslimit=%s role=haproxy' + - name: flush-cache + - name: tags + value: Blacklists + - name: extra-vars + value: hostslimit=%s role=haproxy args: - - 'limit' + - limit diff --git a/scripts/haproxy-certs.yml b/scripts/haproxy-certs.yml index 00ad230a..4021ec90 100644 --- a/scripts/haproxy-certs.yml +++ b/scripts/haproxy-certs.yml @@ -1,17 +1,17 @@ -description: 'Build SSL Certs for HaProxy' +description: Build SSL Certs for HaProxy cli: defaults: - limit: 'proxyserver' + limit: proxyserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' - - 'common' + - commonauth + - commonconnect + - common command: - - name: 'tags' - value: 'Certs' - - name: 'extra-vars' - value: 'hostslimit=%s role=haproxy' + - name: tags + value: Certs + - name: extra-vars + value: hostslimit=%s role=haproxy args: - - 'limit' + - limit diff --git a/scripts/haproxy-config.yml b/scripts/haproxy-config.yml index 4764dbb5..9b83a941 100644 --- a/scripts/haproxy-config.yml +++ b/scripts/haproxy-config.yml @@ -1,17 +1,17 @@ -description: 'Quickly configure HaProxy' +description: Quickly configure HaProxy cli: defaults: - limit: 'proxyserver' + limit: proxyserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' - - 'common' + - commonauth + - commonconnect + - common command: - - name: 'tags' - value: 'Config' - - name: 'extra-vars' - value: 'hostslimit=%s role=haproxy' + - name: tags + value: Config + - name: extra-vars + value: hostslimit=%s role=haproxy args: - - 'limit' + - limit diff --git a/scripts/hosts.yml b/scripts/hosts.yml index ac4cf7ad..d0d64bbb 100644 --- a/scripts/hosts.yml +++ b/scripts/hosts.yml @@ -1,4 +1,4 @@ -description: 'Locally update host information for all inventories' +description: Locally update host information for all inventories arguments: - playbook: 'hosts' - company: 'all' + playbook: hosts + company: all diff --git a/scripts/inithost.yml b/scripts/inithost.yml index fb2c6662..8b38141d 100644 --- a/scripts/inithost.yml +++ b/scripts/inithost.yml @@ -1,117 +1,117 @@ -description: 'Initially setup a new host' +description: Initially setup a new host cli: arguments: host: - help: 'Name of the host to be created' + help: Name of the host to be created options: user: - action: 'store' + action: store default: exec: | result = os.environ['USER'] - help: 'The username of the first created admin user' + help: The username of the first created admin user root: - action: 'store' - default: 'root' - help: 'The username to use initially' + action: store + default: root + help: The username to use initially key: - action: 'store' - help: 'File name with the private key to be used initially' + action: store + help: File name with the private key to be used initially groups: Cloud: - description: 'When installing through a cloud provider, use these options' + description: When installing through a cloud provider, use these options options: cloud: - action: 'store' + action: store choices: - - 'ec2' - - 'jiffybox' - - 'linode' - help: 'The cloud provider' + - ec2 + - jiffybox + - linode + help: The cloud provider groups: - action: 'store' - help: 'The inventory groups for the host as comma separated list' + action: store + help: The inventory groups for the host as comma separated list Non Cloud: - description: 'When installing directly, use these options' + description: When installing directly, use these options options: ip: - action: 'store' - help: 'The ip address of the host, only required if not installed in the cloud' + action: store + help: The ip address of the host, only required if not installed in the cloud arguments: - playbook: 'inithost' - no_gui: 'True' + playbook: inithost + no_gui: True command: - - name: 'extra-vars' - value: 'host=%s inituser=%s firstuser=%s' + - name: extra-vars + value: host=%s inituser=%s firstuser=%s args: - - 'host' - - 'root' - - 'user' - - name: 'extra-vars' - condition: 'cloud' - value: 'cloud=%s' + - host + - root + - user + - name: extra-vars + condition: cloud + value: cloud=%s args: - - 'cloud' - - name: 'extra-vars' - condition: 'groups' - value: 'initgroups=%s' + - cloud + - name: extra-vars + condition: groups + value: initgroups=%s args: - - 'groups' - - name: 'extra-vars' - condition: 'ip' - value: 'inithostip=%s' + - groups + - name: extra-vars + condition: ip + value: inithostip=%s args: - - 'ip' - - name: 'private-key' - condition: 'key' - value: '%s' + - ip + - name: private-key + condition: key + value: %s args: - - 'key' - - name: 'extra-vars' - condition: 'key' - value: 'initauth="-o PasswordAuthentication=no -o PubkeyAuthentication=yes -o IdentityFile=%s"' + - key + - name: extra-vars + condition: key + value: initauth="-o PasswordAuthentication=no -o PubkeyAuthentication=yes -o IdentityFile=%s" args: - - 'key' - - name: 'ask-pass' - condition: 'key' + - key + - name: ask-pass + condition: key negate: True - - name: 'extra-vars' - condition: 'key' + - name: extra-vars + condition: key negate: True - value: 'initauth="-o PasswordAuthentication=yes -o PubkeyAuthentication=no"' + value: initauth="-o PasswordAuthentication=yes -o PubkeyAuthentication=no" environment: - ANSIBLE_SSH_ARGS: '-o IdentitiesOnly=yes -o ControlMaster=no -o ControlPersist=60s' - ANSIBLE_SSH_PIPELINING: 'False' + ANSIBLE_SSH_ARGS: -o IdentitiesOnly=yes -o ControlMaster=no -o ControlPersist=60s + ANSIBLE_SSH_PIPELINING: False follower: - - script: 'sanity' + - script: sanity arguments: - - 'upgrade' + - upgrade command: - - name: 'limit' - value: '%s' + - name: limit + value: %s args: - - 'host' - - name: 'ask-pass' - - script: 'sanity' + - host + - name: ask-pass + - script: sanity arguments: - - 'reboot' + - reboot command: - - name: 'limit' - value: '%s' + - name: limit + value: %s args: - - 'host' - - name: 'ask-pass' - - name: 'extra-vars' - value: 'force=true' - - script: 'role' + - host + - name: ask-pass + - name: extra-vars + value: force=true + - script: role arguments: - - 'commonkeys' + - commonkeys command: - - name: 'limit' - value: 'all' - - script: 'farm' + - name: limit + value: all + - script: farm command: - - name: 'limit' - value: '%s' + - name: limit + value: %s args: - - 'host' + - host diff --git a/scripts/initpi.yml b/scripts/initpi.yml index bd716ee6..be024374 100644 --- a/scripts/initpi.yml +++ b/scripts/initpi.yml @@ -1,54 +1,54 @@ -description: 'Initially setup a new Raspberry Pi' +description: Initially setup a new Raspberry Pi cli: arguments: host: - help: 'Name of the Pi to be created' + help: Name of the Pi to be created options: user: - action: 'store' + action: store default: exec: | result = os.environ['USER'] - help: 'The username of the first created admin user' + help: The username of the first created admin user root: - action: 'store' - default: 'pi' - help: 'The username to use initially' + action: store + default: pi + help: The username to use initially key: - action: 'store' - help: 'File name with the private key to be used initially' + action: store + help: File name with the private key to be used initially arguments: - playbook: 'firstuser' - no_gui: 'True' + playbook: firstuser + no_gui: True command: - - name: 'extra-vars' - value: 'host=%s inituser=%s firstuser=%s' + - name: extra-vars + value: host=%s inituser=%s firstuser=%s args: - - 'host' - - 'root' - - 'user' - - name: 'ask-pass' - - name: 'extra-vars' - value: 'initauth="-o PasswordAuthentication=yes -o PubkeyAuthentication=no"' + - host + - root + - user + - name: ask-pass + - name: extra-vars + value: initauth="-o PasswordAuthentication=yes -o PubkeyAuthentication=no" environment: - ANSIBLE_SSH_ARGS: '-o IdentitiesOnly=yes -o ControlMaster=no -o ControlPersist=60s' - ANSIBLE_SSH_PIPELINING: 'False' + ANSIBLE_SSH_ARGS: -o IdentitiesOnly=yes -o ControlMaster=no -o ControlPersist=60s + ANSIBLE_SSH_PIPELINING: False follower: - - script: 'role' + - script: role arguments: - - 'common' + - common command: - - name: 'limit' - value: '%s' + - name: limit + value: %s args: - - 'host' - - name: 'tags' - value: 'etckeeper' - - script: 'playbook' + - host + - name: tags + value: etckeeper + - script: playbook arguments: - - 'etckeeper' + - etckeeper command: - - name: 'limit' - value: '%s' + - name: limit + value: %s args: - - 'host' + - host diff --git a/scripts/jailkit-update.yml b/scripts/jailkit-update.yml index 04f81f13..48798330 100644 --- a/scripts/jailkit-update.yml +++ b/scripts/jailkit-update.yml @@ -1,22 +1,22 @@ -description: 'Force updating all Jails' +description: Force updating all Jails cli: options: site: default: False - help: 'The id of a site if only one of the defined sites should be updated' + help: The id of a site if only one of the defined sites should be updated defaults: - limit: 'webserver_drupal' + limit: webserver_drupal arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=jailkit jailsite_init_force=True' + - name: extra-vars + value: hostslimit=%s role=jailkit jailsite_init_force=True args: - - 'limit' - - name: 'start-at-task' - value: 'JailKit Role' - - name: 'extra-vars' - condition: 'site' - value: 'limit_site=%s' + - limit + - name: start-at-task + value: JailKit Role + - name: extra-vars + condition: site + value: limit_site=%s args: - - 'site' + - site diff --git a/scripts/jailkit-upgrade.yml b/scripts/jailkit-upgrade.yml index 5f7e889f..b8264ebc 100644 --- a/scripts/jailkit-upgrade.yml +++ b/scripts/jailkit-upgrade.yml @@ -1,15 +1,15 @@ -description: 'Update OS components in all Jails' +description: Update OS components in all Jails cli: defaults: - limit: 'webserver_drupal' + limit: webserver_drupal arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=jailkit' + - name: extra-vars + value: hostslimit=%s role=jailkit args: - - 'limit' - - name: 'start-at-task' - value: 'JailKit Role' - - name: 'tags' - value: 'UpdateJails' + - limit + - name: start-at-task + value: JailKit Role + - name: tags + value: UpdateJails diff --git a/scripts/jailkit-user.yml b/scripts/jailkit-user.yml index fbcfdc14..ece39f41 100644 --- a/scripts/jailkit-user.yml +++ b/scripts/jailkit-user.yml @@ -1,20 +1,20 @@ -description: 'Init and update users in Jails' +description: Init and update users in Jails cli: options: site: default: False - help: 'The id of a site if only one of the defined sites should be updated' + help: The id of a site if only one of the defined sites should be updated defaults: - limit: 'webserver_drupal' + limit: webserver_drupal arguments: - playbook: 'user' + playbook: user command: - - name: 'tags' + - name: tags value: - - 'JailUserInit' - - 'SetPermissions' - - name: 'extra-vars' - condition: 'site' - value: 'limit_site=%s' + - JailUserInit + - SetPermissions + - name: extra-vars + condition: site + value: limit_site=%s args: - - 'site' + - site diff --git a/scripts/lists.yml b/scripts/lists.yml index 9dc10696..ba326475 100644 --- a/scripts/lists.yml +++ b/scripts/lists.yml @@ -1,14 +1,14 @@ -description: 'Lists hosts and IP addresses' +description: Lists hosts and IP addresses cli: options: ip: default: False - help: 'An optional IP to limit the assertion to that single IP' + help: An optional IP to limit the assertion to that single IP arguments: - playbook: 'list' + playbook: list command: - - name: 'extra-vars' - condition: 'ip' - value: 'ip=%s' + - name: extra-vars + condition: ip + value: ip=%s args: - - 'ip' + - ip diff --git a/scripts/localhost.yml b/scripts/localhost.yml index b4fab22f..aaaeb242 100644 --- a/scripts/localhost.yml +++ b/scripts/localhost.yml @@ -1,28 +1,28 @@ -description: 'Update local hosts file and SSH config, then call script hosts' +description: Update local hosts file and SSH config, then call script hosts inventory-given-by-script: True cli: options: host: - action: 'store' + action: store default: exec: | result = socket.gethostname() user: - action: 'store' + action: store default: exec: | result = os.environ['USER'] arguments: - playbook: 'role' - no_gui: 'True' - company: 'local' + playbook: role + no_gui: True + company: local command: - - name: 'extra-vars' - value: 'hostslimit=%s role=commonconnect admins=%s' + - name: extra-vars + value: hostslimit=%s role=commonconnect admins=%s args: - - 'host' - - 'user' + - host + - user environment: - ANSIBLE_LOCAL_LIMITED: 'True' + ANSIBLE_LOCAL_LIMITED: True follower: - - 'hosts' + - hosts diff --git a/scripts/logrotate.yml b/scripts/logrotate.yml index b87c8816..6c7d7007 100644 --- a/scripts/logrotate.yml +++ b/scripts/logrotate.yml @@ -1,6 +1,6 @@ -description: 'Update Logrotate Configuration' +description: Update Logrotate Configuration arguments: - playbook: 'farm' + playbook: farm command: - - name: 'tags' - value: 'logrotate' + - name: tags + value: logrotate diff --git a/scripts/matomo.yml b/scripts/matomo.yml index a15ccb11..319af2f0 100644 --- a/scripts/matomo.yml +++ b/scripts/matomo.yml @@ -1,37 +1,37 @@ -description: 'Quickly update matomo sites' +description: Quickly update matomo sites cli: options: reset: - action: 'store_true' + action: store_true default: False - help: 'If True the existing directories get deleted first' + help: If True the existing directories get deleted first site: default: False - help: 'The id of a site if matomo should be updated only for one of the defined sites ' + help: The id of a site if matomo should be updated only for one of the defined sites defaults: - limit: 'matomoserver:piwikserver' + limit: matomoserver:piwikserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'common' - - 'commonauth' - - 'commonconnect' - - 'commonkeys' - - 'apache' - - 'php' - - 'letsencrypt' + - common + - commonauth + - commonconnect + - commonkeys + - apache + - php + - letsencrypt command: - - name: 'tags' - value: 'deploy' - - name: 'extra-vars' - value: 'hostslimit=%s role=matomo' + - name: tags + value: deploy + - name: extra-vars + value: hostslimit=%s role=matomo args: - - 'limit' - - name: 'extra-vars' - condition: 'reset' - value: 'matomo_force_reset=True' - - name: 'extra-vars' - condition: 'site' - value: 'limit_site=%s' + - limit + - name: extra-vars + condition: reset + value: matomo_force_reset=True + - name: extra-vars + condition: site + value: limit_site=%s args: - - 'site' + - site diff --git a/scripts/mysql-slave-skipone.yml b/scripts/mysql-slave-skipone.yml index 8fa2cdba..37b42c26 100644 --- a/scripts/mysql-slave-skipone.yml +++ b/scripts/mysql-slave-skipone.yml @@ -1,9 +1,9 @@ -description: 'MySQL Slave: Skip counter by 1' +description: MySQL Slave: Skip counter by 1 cli: defaults: - limit: 'dbserver_mysql-slave' + limit: dbserver_mysql-slave arguments: - playbook: 'mysqlslave' + playbook: mysqlslave command: - - name: 'tags' - value: 'skipbyone' + - name: tags + value: skipbyone diff --git a/scripts/netdata.yml b/scripts/netdata.yml index 57492280..bc78d827 100644 --- a/scripts/netdata.yml +++ b/scripts/netdata.yml @@ -1,19 +1,19 @@ -description: 'Quickly update NetData' +description: Quickly update NetData cli: options: reset: - action: 'store_true' + action: store_true default: False - help: 'If True the existing directories get deleted first' + help: If True the existing directories get deleted first defaults: - limit: 'all' + limit: all arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=netdata' + - name: extra-vars + value: hostslimit=%s role=netdata args: - - 'limit' - - name: 'extra-vars' - condition: 'reset' - value: 'netdata_force_reset=True' + - limit + - name: extra-vars + condition: reset + value: netdata_force_reset=True diff --git a/scripts/network.yml b/scripts/network.yml index 015147c3..d2e958c4 100644 --- a/scripts/network.yml +++ b/scripts/network.yml @@ -1,13 +1,13 @@ -description: 'Configure Network and Firewall' +description: Configure Network and Firewall arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' + - commonauth + - commonconnect command: - - name: 'tags' - value: 'network' - - name: 'extra-vars' - value: 'hostslimit=%s role=common' + - name: tags + value: network + - name: extra-vars + value: hostslimit=%s role=common args: - - 'limit' + - limit diff --git a/scripts/nextcloud-install.yml b/scripts/nextcloud-install.yml index 2af448d5..fce28051 100644 --- a/scripts/nextcloud-install.yml +++ b/scripts/nextcloud-install.yml @@ -1,28 +1,28 @@ -description: 'Install a new NextCloud site' +description: Install a new NextCloud site cli: arguments: site: - help: 'The id of the site to install' + help: The id of the site to install defaults: - limit: 'webserver' + limit: webserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'common' - - 'commonauth' - - 'commonconnect' - - 'commonkeys' - - 'apache' - - 'php' - - 'letsencrypt' + - common + - commonauth + - commonconnect + - commonkeys + - apache + - php + - letsencrypt command: - - name: 'extra-vars' - value: 'hostslimit=%s role=nextcloud' + - name: extra-vars + value: hostslimit=%s role=nextcloud args: - - 'limit' - - name: 'extra-vars' - value: 'limit_site=%s' + - limit + - name: extra-vars + value: limit_site=%s args: - - 'site' - - name: 'start-at-task' - value: 'NextCloud Role' + - site + - name: start-at-task + value: NextCloud Role diff --git a/scripts/nextcloud-plugins.yml b/scripts/nextcloud-plugins.yml index 4aeb7b3e..3390b6f0 100644 --- a/scripts/nextcloud-plugins.yml +++ b/scripts/nextcloud-plugins.yml @@ -1,32 +1,32 @@ -description: 'Quickly update NextCloud plugins' +description: Quickly update NextCloud plugins cli: options: site: default: False - help: 'The id of a site if plugins should be updated only for one of the defined sites ' + help: The id of a site if plugins should be updated only for one of the defined sites defaults: - limit: 'webserver_nextcloud' + limit: webserver_nextcloud arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'common' - - 'commonauth' - - 'commonconnect' - - 'commonkeys' - - 'apache' - - 'php' - - 'letsencrypt' + - common + - commonauth + - commonconnect + - commonkeys + - apache + - php + - letsencrypt command: - - name: 'tags' - value: 'plugins' - - name: 'extra-vars' - value: 'hostslimit=%s role=nextcloud' + - name: tags + value: plugins + - name: extra-vars + value: hostslimit=%s role=nextcloud args: - - 'limit' - - name: 'extra-vars' - condition: 'site' - value: 'limit_site=%s' + - limit + - name: extra-vars + condition: site + value: limit_site=%s args: - - 'site' - - name: 'start-at-task' - value: 'NextCloud Role' + - site + - name: start-at-task + value: NextCloud Role diff --git a/scripts/nextcloud.yml b/scripts/nextcloud.yml index a637d691..612e2191 100644 --- a/scripts/nextcloud.yml +++ b/scripts/nextcloud.yml @@ -1,32 +1,32 @@ -description: 'Quickly update NextCloud sites' +description: Quickly update NextCloud sites cli: options: site: default: False - help: 'The id of a site if only one of the defined sites should be updated' + help: The id of a site if only one of the defined sites should be updated defaults: - limit: 'webserver' + limit: webserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'common' - - 'commonauth' - - 'commonconnect' - - 'commonkeys' - - 'apache' - - 'php' - - 'letsencrypt' + - common + - commonauth + - commonconnect + - commonkeys + - apache + - php + - letsencrypt command: - - name: 'tags' - value: 'deploy' - - name: 'extra-vars' - value: 'hostslimit=%s role=nextcloud' + - name: tags + value: deploy + - name: extra-vars + value: hostslimit=%s role=nextcloud args: - - 'limit' - - name: 'extra-vars' - condition: 'site' - value: 'limit_site=%s' + - limit + - name: extra-vars + condition: site + value: limit_site=%s args: - - 'site' - - name: 'start-at-task' - value: 'NextCloud Role' + - site + - name: start-at-task + value: NextCloud Role diff --git a/scripts/playbook.yml b/scripts/playbook.yml index df7df446..63065946 100644 --- a/scripts/playbook.yml +++ b/scripts/playbook.yml @@ -1,8 +1,8 @@ -description: 'Run a specific playbook' +description: Run a specific playbook cli: arguments: playbook: - help: 'Playbook to execute' + help: Playbook to execute options: custom: default: false diff --git a/scripts/rebootproxies.yml b/scripts/rebootproxies.yml index 2f6267af..0f305eb6 100644 --- a/scripts/rebootproxies.yml +++ b/scripts/rebootproxies.yml @@ -1,13 +1,13 @@ -description: 'Reboot a set of redundant proxies' +description: Reboot a set of redundant proxies arguments: - playbook: 'rebootproxies' - no_gui: 'True' + playbook: rebootproxies + no_gui: True environment: - ANSIBLE_INVENTORY_REFRESH: 'True' + ANSIBLE_INVENTORY_REFRESH: True follower: - - script: 'playbook' + - script: playbook arguments: - - 'moveip' - - script: 'playbook' + - moveip + - script: playbook arguments: - - 'rebootproxies' + - rebootproxies diff --git a/scripts/removehost.yml b/scripts/removehost.yml index 583c1576..38ac06a9 100644 --- a/scripts/removehost.yml +++ b/scripts/removehost.yml @@ -1,24 +1,24 @@ -description: 'Remove a host and delete the instance in the cloud' +description: Remove a host and delete the instance in the cloud cli: arguments: host: - help: 'Name of the host to be removed' + help: Name of the host to be removed options: cloud: - action: 'store' + action: store choices: - - 'ec2' - - 'jiffybox' - help: 'The cloud provider' + - ec2 + - jiffybox + help: The cloud provider arguments: - playbook: 'removehost' + playbook: removehost command: - - name: 'extra-vars' - value: 'hostslimit=%s' + - name: extra-vars + value: hostslimit=%s args: - - 'host' - - name: 'extra-vars' - condition: 'cloud' - value: 'cloud=%s' + - host + - name: extra-vars + condition: cloud + value: cloud=%s args: - - 'cloud' + - cloud diff --git a/scripts/role.yml b/scripts/role.yml index 2a65717d..898698b6 100644 --- a/scripts/role.yml +++ b/scripts/role.yml @@ -1,13 +1,13 @@ -description: 'Run a specific role only' +description: Run a specific role only cli: arguments: role: - help: 'Role to execute' + help: Role to execute arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=%s' + - name: extra-vars + value: hostslimit=%s role=%s args: - - 'limit' - - 'role' + - limit + - role diff --git a/scripts/sanity.yml b/scripts/sanity.yml index 703a2439..2ffc946f 100644 --- a/scripts/sanity.yml +++ b/scripts/sanity.yml @@ -1,32 +1,32 @@ -description: 'Check for updates, upgrade and reboot hosts' +description: Check for updates, upgrade and reboot hosts cli: arguments: mode: choices: - - 'check' - - 'upgrade' - - 'reboot' - - 'reschedule' - help: 'Mode for the sanity play' + - check + - upgrade + - reboot + - reschedule + help: Mode for the sanity play options: force: - action: 'store_true' + action: store_true default: False - help: 'Force to also reboot proxy servers' + help: Force to also reboot proxy servers withoutreason: - action: 'store_true' + action: store_true default: False - help: 'Force reboot even if not required' + help: Force reboot even if not required arguments: - playbook: 'sanity' + playbook: sanity command: - - name: 'tags' - value: '%s' + - name: tags + value: %s args: - - 'mode' - - name: 'extra-vars' - condition: 'force' - value: 'force=true' - - name: 'extra-vars' - condition: 'withoutreason' - value: 'withoutreason=true force=true' + - mode + - name: extra-vars + condition: force + value: force=true + - name: extra-vars + condition: withoutreason + value: withoutreason=true force=true diff --git a/scripts/setup-local.yml b/scripts/setup-local.yml index cc6fa1c9..b6f2cbb4 100644 --- a/scripts/setup-local.yml +++ b/scripts/setup-local.yml @@ -1,9 +1,9 @@ -description: 'Setup and update the Paragon wrapper for Ansible' +description: Setup and update the Paragon wrapper for Ansible ignore-inventory: True cli: arguments: inventory: - help: 'Name of the company in lowercase to specify the inventory' + help: Name of the company in lowercase to specify the inventory options: username: default: @@ -17,46 +17,46 @@ cli: result = config.get('defaults', 'remote_user') if not result: result = os.environ.get('USER') - help: 'Name of the remote user if different from your local username' + help: Name of the remote user if different from your local username skip-os-tasks: - action: 'store_false' + action: store_false default: True - help: 'Skip all tasks that aim to install os components in order to do that manually' + help: Skip all tasks that aim to install os components in order to do that manually arguments: - playbook: 'setup-local' - no_gui: 'True' - local: 'True' + playbook: setup-local + no_gui: True + local: True command: - - name: 'extra-vars' - value: 'company=%s path=%s username=%s install_os_components=%s' + - name: extra-vars + value: company=%s path=%s username=%s install_os_components=%s args: - exec: | commandarg = 'inventory' result = args.inventory.lower() - - 'path' - - 'username' - - 'skip_os_tasks' + - path + - username + - skip_os_tasks environment: ANSIBLE_COMPANY: None follower: - - script: 'custom' + - script: custom condition: exec: | condition = os.path.exists(args.path + 'inventory/local/setup.yml') arguments: - - 'setup' + - setup command: - - name: 'company' - value: 'local' - - name: 'limit' - value: '%s' + - name: company + value: local + - name: limit + value: %s args: - exec: | import socket commandarg = 'host' result = socket.gethostname() - - name: 'tags' - condition: 'tags' - value: '%s' + - name: tags + condition: tags + value: %s args: - - 'tags' + - tags diff --git a/scripts/sftp.yml b/scripts/sftp.yml index faa49274..d132648d 100644 --- a/scripts/sftp.yml +++ b/scripts/sftp.yml @@ -1,15 +1,15 @@ -description: 'Configure SFTP Server' +description: Configure SFTP Server arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' + - commonauth + - commonconnect command: - - name: 'extra-vars' - value: 'hostslimit=%s role=sftp' + - name: extra-vars + value: hostslimit=%s role=sftp args: - - 'limit' - - name: 'start-at-task' - value: 'SFTP Role' + - limit + - name: start-at-task + value: SFTP Role follower: - - 'ssh' + - ssh diff --git a/scripts/shells.yml b/scripts/shells.yml index 6569bd17..f5589225 100644 --- a/scripts/shells.yml +++ b/scripts/shells.yml @@ -1,17 +1,17 @@ -description: 'Configure User Shells' +description: Configure User Shells arguments: - playbook: 'farm' + playbook: farm roles_exclude: - - 'drupal' - - 'drupal-cli' - - 'drupalconsole' - - 'drush' - - 'composer' - - 'apache' - - 'php' - - 'redis' - - 'memcache' - - 'letsencrypt' + - drupal + - drupal-cli + - drupalconsole + - drush + - composer + - apache + - php + - redis + - memcache + - letsencrypt command: - - name: 'tags' - value: 'shells' + - name: tags + value: shells diff --git a/scripts/spideroak-reinstall.yml b/scripts/spideroak-reinstall.yml index 1bde6d4a..b600b054 100644 --- a/scripts/spideroak-reinstall.yml +++ b/scripts/spideroak-reinstall.yml @@ -1,10 +1,10 @@ -description: 'Re-install SpiderOak' +description: Re-install SpiderOak arguments: - playbook: 'role' + playbook: role command: - - name: 'start-at-task' - value: 'SpiderOak Role' - - name: 'extra-vars' - value: 'hostslimit=%s role=spideroak spideroak_reinstall=true' + - name: start-at-task + value: SpiderOak Role + - name: extra-vars + value: hostslimit=%s role=spideroak spideroak_reinstall=true args: - - 'limit' + - limit diff --git a/scripts/ssh.yml b/scripts/ssh.yml index 9e496ea9..7832c225 100644 --- a/scripts/ssh.yml +++ b/scripts/ssh.yml @@ -1,13 +1,13 @@ -description: 'Configure SSH Server' +description: Configure SSH Server arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' + - commonauth + - commonconnect command: - - name: 'tags' - value: 'ssh' - - name: 'extra-vars' - value: 'hostslimit=%s role=common' + - name: tags + value: ssh + - name: extra-vars + value: hostslimit=%s role=common args: - - 'limit' + - limit diff --git a/scripts/uptime.yml b/scripts/uptime.yml index bb4d3058..488a548b 100644 --- a/scripts/uptime.yml +++ b/scripts/uptime.yml @@ -1,13 +1,13 @@ -description: 'Quickly update Uptime' +description: Quickly update Uptime cli: defaults: - limit: 'uptime' + limit: uptime arguments: - playbook: 'role' + playbook: role command: - - name: 'start-at-task' - value: 'Uptime Role' - - name: 'extra-vars' - value: 'hostslimit=%s role=uptime' + - name: start-at-task + value: Uptime Role + - name: extra-vars + value: hostslimit=%s role=uptime args: - - 'limit' + - limit diff --git a/scripts/useraccounts.yml b/scripts/useraccounts.yml index 13de6d67..222622e6 100644 --- a/scripts/useraccounts.yml +++ b/scripts/useraccounts.yml @@ -1,11 +1,11 @@ -description: 'Create all users and add them to the correct groups' +description: Create all users and add them to the correct groups cli: defaults: - limit: 'all' + limit: all arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=commonauth' + - name: extra-vars + value: hostslimit=%s role=commonauth args: - - 'limit' + - limit diff --git a/scripts/userfiles.yml b/scripts/userfiles.yml index c1fedafb..220818d9 100644 --- a/scripts/userfiles.yml +++ b/scripts/userfiles.yml @@ -1,13 +1,13 @@ -description: 'Copy user specific files' +description: Copy user specific files arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'commonauth' - - 'commonconnect' + - commonauth + - commonconnect command: - - name: 'tags' - value: 'userfiles' - - name: 'extra-vars' - value: 'hostslimit=%s role=common' + - name: tags + value: userfiles + - name: extra-vars + value: hostslimit=%s role=common args: - - 'limit' + - limit diff --git a/scripts/userkeys.yml b/scripts/userkeys.yml index 2d81b45b..44b4552c 100644 --- a/scripts/userkeys.yml +++ b/scripts/userkeys.yml @@ -1,14 +1,14 @@ -description: 'Update all user keys' +description: Update all user keys arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'common' - - 'commonauth' - - 'commonconnect' + - common + - commonauth + - commonconnect command: - - name: 'tags' - value: 'Keys' - - name: 'extra-vars' - value: 'hostslimit=%s role=commonkeys' + - name: tags + value: Keys + - name: extra-vars + value: hostslimit=%s role=commonkeys args: - - 'limit' + - limit diff --git a/scripts/userlock.yml b/scripts/userlock.yml index 627cb346..fec27c1e 100644 --- a/scripts/userlock.yml +++ b/scripts/userlock.yml @@ -1,14 +1,14 @@ -description: 'Lock user on all hosts' +description: Lock user on all hosts cli: arguments: lockuser_username: - help: 'Existing username who should be locked' + help: Existing username who should be locked defaults: - limit: 'all' + limit: all arguments: - playbook: 'userlock' + playbook: userlock command: - - name: 'extra-vars' - value: 'lockuser_username=%s' + - name: extra-vars + value: lockuser_username=%s args: - - 'lockuser_username' + - lockuser_username diff --git a/scripts/userpwd.yml b/scripts/userpwd.yml index e93e4405..41432d35 100644 --- a/scripts/userpwd.yml +++ b/scripts/userpwd.yml @@ -1,17 +1,17 @@ -description: 'Set user password on all hosts' +description: Set user password on all hosts cli: arguments: username: - help: 'Existing username for whom to set a new password' + help: Existing username for whom to set a new password password: - help: 'New password for the given user' + help: New password for the given user defaults: - limit: 'all' + limit: all arguments: - playbook: 'userpwd' + playbook: userpwd command: - - name: 'extra-vars' - value: 'username=%s password=%s' + - name: extra-vars + value: username=%s password=%s args: - - 'username' - - 'password' + - username + - password diff --git a/scripts/users.yml b/scripts/users.yml index 41f2a545..80696fe5 100644 --- a/scripts/users.yml +++ b/scripts/users.yml @@ -1,17 +1,17 @@ -description: 'Create and configure all users' -note: 'This is NOT going through jails and other roles, just the users themselves' +description: Create and configure all users +note: This is NOT going through jails and other roles, just the users themselves cli: defaults: - limit: 'all' + limit: all arguments: - playbook: 'role' + playbook: role command: - - name: 'extra-vars' - value: 'hostslimit=%s role=commonauth' + - name: extra-vars + value: hostslimit=%s role=commonauth args: - - 'limit' + - limit follower: - - 'userfiles' - - 'userkeys' - - 'ssh' - - 'shells' + - userfiles + - userkeys + - ssh + - shells diff --git a/scripts/userunlock.yml b/scripts/userunlock.yml index 8691a77e..268c3632 100644 --- a/scripts/userunlock.yml +++ b/scripts/userunlock.yml @@ -1,14 +1,14 @@ -description: 'Unlock user on all hosts' +description: Unlock user on all hosts cli: arguments: lockuser_username: - help: 'Existing username who should be unlocked' + help: Existing username who should be unlocked defaults: - limit: 'all' + limit: all arguments: - playbook: 'userunlock' + playbook: userunlock command: - - name: 'extra-vars' - value: 'lockuser_username=%s' + - name: extra-vars + value: lockuser_username=%s args: - - 'lockuser_username' + - lockuser_username diff --git a/scripts/varnish-config.yml b/scripts/varnish-config.yml index 1e6f7fdb..73c6ce28 100644 --- a/scripts/varnish-config.yml +++ b/scripts/varnish-config.yml @@ -1,13 +1,13 @@ -description: 'Quickly configure Varnish' +description: Quickly configure Varnish cli: defaults: - limit: 'varnishserver' + limit: varnishserver arguments: - playbook: 'role' + playbook: role command: - - name: 'tags' - value: 'Config' - - name: 'extra-vars' - value: 'hostslimit=%s role=varnish' + - name: tags + value: Config + - name: extra-vars + value: hostslimit=%s role=varnish args: - - 'limit' + - limit diff --git a/scripts/youtrack.yml b/scripts/youtrack.yml index e1e09590..cb8ffbfe 100644 --- a/scripts/youtrack.yml +++ b/scripts/youtrack.yml @@ -1,18 +1,18 @@ -description: 'Quickly update YouTrack sites' +description: Quickly update YouTrack sites cli: defaults: - limit: 'youtrackserver' + limit: youtrackserver arguments: - playbook: 'role' + playbook: role roles_exclude: - - 'common' - - 'commonauth' - - 'commonconnect' - - 'commonkeys' - - 'apache' - - 'php' + - common + - commonauth + - commonconnect + - commonkeys + - apache + - php command: - - name: 'extra-vars' - value: 'hostslimit=%s role=outrack' + - name: extra-vars + value: hostslimit=%s role=outrack args: - - 'limit' + - limit diff --git a/wiki b/wiki index 699db296..b3f44775 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 699db296516809d5855bee133fb27c2d5461de5d +Subproject commit b3f44775b691cfefa410b4d3ab7e2cd560154864 -- GitLab