diff --git a/.yamllint b/.yamllint index 9cdc5545ac5cb1fc147f53e497e031378dfbe6e9..215892382f40bff1a20b5c18f5e55f91bd0b154c 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 d752d01a56db1144e4057b75499469b0c237530d..e552ff567ddad8c7f25991c0880df8236531e197 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 30f13230cf77e90540e5c593c5a6d5fbe6d4c230..88e1de48938a71a67b927a6b388086805c2f7d5e 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 219e4d6e8ece4f8fa66c489e3fcfdb436f800ecc..d9910773f63319fbbe440bab6e4b464145a37d20 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 5b803adbca94a2479cd5ffc5f46a43e23bdfb57f..bd3ae2e22c967ee1bc1d8b6c6f741404ea442bcb 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 a8f56dc667baddee812058669e3970db188abffa..3cb35191569beaa0ffd95d5967e58e3f1ef2fbbe 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 ccd404f5b8269e8fb7028c86f50b9c3762855c5b..73a19109dff75d46740a7dc13891ea49e4d1f4c7 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 5cf536457f4dded59d7205b6890da49ff326d207..482c9e4fb65c82da605fe760aa2ef8b78f30f2cf 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 1a0ee27e6cfc323ab5dee341b83e27e3c3a43e91..e4ca04bd9349c586f14bcb6d8c9b45d29fd8437d 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 735b53b2e7d46921523a5aa4780cb4844e0da0d4..0a2a49909f3200821c3da8c976cb9b7a4ea2ac38 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 dadd83671c46f78b27e09a4d6f8d354a11bfe576..56efc8a9843eb0d542ca57107bb94d4b9090e0e3 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 509d130e677d80192bf67387db74bb37e996c0e8..0e31ec19c6a4b0ccec210c2456610e1b65bd8843 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 d414e73f5ff52076cb1ceeee72bc93e1955e0964..6d56fee38d07447bde4537d81a1cf764f5476d57 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 77f349ace8fd28e5673d3834d89b64c84a8acdb6..f5a2d0e8ad7f9d2b4c4c8ea7c687ec544378bdbb 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 952efc34c991e6689ea4f3534f7e8d012df3bbdb..f0a9cd018fd8d92f5b67b9ce50fca919beff47eb 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 482b76185474e52abae095bf779c5a67362a7bac..10ec51761c433b30e5c845337c1c89cddeb455ef 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 76496266e6727223c02fc4f6aaa4f32803095a38..6e59c331e3a679269a1b0afebd9676b34d0150ec 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 b20a349bcd8d3bb7600234f86628c65f3b8862e0..81ab782e431cbd9cb31c9f58ae349e45159d7d8b 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 11f0e8c0e2fca3487dd3b22bac7f303d4940c371..db22936ee7d79c8a1fec8c109ff53bdf293c72ad 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 64fc6c892521ca72982ae14d297d85355d5ff278..82f89c2e677bbf9f70229ffacedb2cec3c5b844c 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 a5cb6fd5f8c01e98247adfcf33d0918e3f434469..12ff25f4b99f62242d257f392da1baec0e8073ff 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 0df4d1ff604c8c332b74357e6777482cea10c175..a1d3f3e5af2832b8d8e3eea86e5aded3999e29ed 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 664427773af9ede125c8de99767a0f9fdeff28b8..634081d3c51c408b1ed60d6200a459ff1b621930 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 3ec470faf98273c2b8820f3544e3af9e3ec90a45..5057ee6c0993aa3757046a00cfd8a0c4c4781b04 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 34cd91b510550d8274cef85f6626b89b7581172b..b6c7cce5ecd9eee3d49d21d5392be3c5141f4bbc 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 399e8c74265b19f57e638319597118f14bcc1db8..c01a8133d241a907db5396b594ced856793d4476 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 78d65ce2372ec10cd259d6ce797b1e447b6110b1..784c223ef414cd425eae7d9523935f6c5dd1cc84 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 e3e74bc706e274296a79fe1cc789964d9fcdf20c..1d828df672e870b189f2ad4ef78ce0d5b706d94b 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 92656fafe7a41edab32f301dc5156efc30ed5af8..28cdfb5834464719746ca45dc373d18a124b4ab6 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 d7babe0c95e35716823b89bd8525673d1b69ffca..5236ae8c0915d96b812790d3546b79cac86e389c 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 3732c5b069da759ef5eb0f1a805fd819719bbcb1..f24a7e86cadd74848a734c33d23fcf9e3d23f427 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 c0e8ceba4035c8538747562debf70e7c29da70c5..0cdc2b322a4b7c7863d327fe6acdde275dca8f0b 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 bd77d128a1aa654eb99bf212e36aeecddbada9fb..b6fa2b4305956e333ebe3ba729191d38964e072d 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 df48d6f22686b400823d52312722f330b8c49dcb..560ca6b95dd5a98152ae594149b6b649e003257b 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 56dfe552e934160533f292518e6541de536c3e69..e8d25f550eae5fdbfeffadea097dfd367769460d 160000 --- a/plugins/serverdensity +++ b/plugins/serverdensity @@ -1 +1 @@ -Subproject commit 56dfe552e934160533f292518e6541de536c3e69 +Subproject commit e8d25f550eae5fdbfeffadea097dfd367769460d diff --git a/roles/alerta b/roles/alerta index b13621a4b2e89654f7f8569ce9208256dbb38547..b46f8c23c5429a576a647c83c71251d9caf893c0 160000 --- a/roles/alerta +++ b/roles/alerta @@ -1 +1 @@ -Subproject commit b13621a4b2e89654f7f8569ce9208256dbb38547 +Subproject commit b46f8c23c5429a576a647c83c71251d9caf893c0 diff --git a/roles/apache b/roles/apache index 73d0461f3ca30139487ada3a1a8adb031cf545ba..42d55cd1d33f96598d8f663ca75a84d8ec28b639 160000 --- a/roles/apache +++ b/roles/apache @@ -1 +1 @@ -Subproject commit 73d0461f3ca30139487ada3a1a8adb031cf545ba +Subproject commit 42d55cd1d33f96598d8f663ca75a84d8ec28b639 diff --git a/roles/aptproxy b/roles/aptproxy index a43f205cc52d1b25086fce024d7df2e932b453fb..d36f534e91c7c4c9d4d172bb6367d0d8ceba7026 160000 --- a/roles/aptproxy +++ b/roles/aptproxy @@ -1 +1 @@ -Subproject commit a43f205cc52d1b25086fce024d7df2e932b453fb +Subproject commit d36f534e91c7c4c9d4d172bb6367d0d8ceba7026 diff --git a/roles/cloud b/roles/cloud index ae4afc5780b8c73b9ed488d0abe2317adf3e7a7b..fe244ad281dc36f26f065f2d40f2ec3f4d24cc35 160000 --- a/roles/cloud +++ b/roles/cloud @@ -1 +1 @@ -Subproject commit ae4afc5780b8c73b9ed488d0abe2317adf3e7a7b +Subproject commit fe244ad281dc36f26f065f2d40f2ec3f4d24cc35 diff --git a/roles/common b/roles/common index 13c6d3048f5e133e5d74c2753c93a7065c0b62ac..f59264d6a81e38a3c598faf00bc8c9b01ebad1a0 160000 --- a/roles/common +++ b/roles/common @@ -1 +1 @@ -Subproject commit 13c6d3048f5e133e5d74c2753c93a7065c0b62ac +Subproject commit f59264d6a81e38a3c598faf00bc8c9b01ebad1a0 diff --git a/roles/commonauth b/roles/commonauth index 8f0d766a5807c7b0329a95ccb52022ddf6687970..06909679f390e1bcbff3fdd1670a344e73213d0c 160000 --- a/roles/commonauth +++ b/roles/commonauth @@ -1 +1 @@ -Subproject commit 8f0d766a5807c7b0329a95ccb52022ddf6687970 +Subproject commit 06909679f390e1bcbff3fdd1670a344e73213d0c diff --git a/roles/commonconnect b/roles/commonconnect index 3fe101adc00a84626520639bb939adcba1ca4b8a..5d24c9c9b2038d96ffbda627f655db451013dbed 160000 --- a/roles/commonconnect +++ b/roles/commonconnect @@ -1 +1 @@ -Subproject commit 3fe101adc00a84626520639bb939adcba1ca4b8a +Subproject commit 5d24c9c9b2038d96ffbda627f655db451013dbed diff --git a/roles/commonkeys b/roles/commonkeys index 30afcd007db8b5356244f3b54de55d6694a95014..8347b105d4438d5f1af4d8c156ebb5ac1308bc48 160000 --- a/roles/commonkeys +++ b/roles/commonkeys @@ -1 +1 @@ -Subproject commit 30afcd007db8b5356244f3b54de55d6694a95014 +Subproject commit 8347b105d4438d5f1af4d8c156ebb5ac1308bc48 diff --git a/roles/compass b/roles/compass index 13a1d6195002faa380cf205c4816c1e868564c7e..7450e42d661fdf81b82fa405e2a97e71a8d8ab69 160000 --- a/roles/compass +++ b/roles/compass @@ -1 +1 @@ -Subproject commit 13a1d6195002faa380cf205c4816c1e868564c7e +Subproject commit 7450e42d661fdf81b82fa405e2a97e71a8d8ab69 diff --git a/roles/composer b/roles/composer index 8a64916d61ad3be3de979b9144f1f9ffb301d091..e61be347a42dec8ccfcf11e70b8d8073087e8882 160000 --- a/roles/composer +++ b/roles/composer @@ -1 +1 @@ -Subproject commit 8a64916d61ad3be3de979b9144f1f9ffb301d091 +Subproject commit e61be347a42dec8ccfcf11e70b8d8073087e8882 diff --git a/roles/discourse b/roles/discourse index 32a015b817adaa66c91a3583537ad00164674618..ff0699ec5c320fa7aa33478a791ebadffd127731 160000 --- a/roles/discourse +++ b/roles/discourse @@ -1 +1 @@ -Subproject commit 32a015b817adaa66c91a3583537ad00164674618 +Subproject commit ff0699ec5c320fa7aa33478a791ebadffd127731 diff --git a/roles/docker b/roles/docker index 7432fe265fdce7a29b870abfca838d02f5835bcd..fa4edd45b3aefd810e3954335fefc32011bb639c 160000 --- a/roles/docker +++ b/roles/docker @@ -1 +1 @@ -Subproject commit 7432fe265fdce7a29b870abfca838d02f5835bcd +Subproject commit fa4edd45b3aefd810e3954335fefc32011bb639c diff --git a/roles/drupal b/roles/drupal index 4020622aac629e98793141f47310b994f5599b0d..002d0490a248bc663fac08b5f5c6accca80d1bcb 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 d62f08552345926b833633eaad1292686b1435d2..bd99fda4c235f83665dc0e9b13e453f264754d9a 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 48f1c870449f131ffbb2c12f1d1ffa6e74417fd7..14d81e18ea8d1020fc03ce66d77baa676b5d5a67 160000 --- a/roles/drupalconsole +++ b/roles/drupalconsole @@ -1 +1 @@ -Subproject commit 48f1c870449f131ffbb2c12f1d1ffa6e74417fd7 +Subproject commit 14d81e18ea8d1020fc03ce66d77baa676b5d5a67 diff --git a/roles/drush b/roles/drush index e26e0f86df6360387890d2d14355cdb8acf65f83..4ddc0c812cabd8fca4dab0b7523e764c8b70bb0b 160000 --- a/roles/drush +++ b/roles/drush @@ -1 +1 @@ -Subproject commit e26e0f86df6360387890d2d14355cdb8acf65f83 +Subproject commit 4ddc0c812cabd8fca4dab0b7523e764c8b70bb0b diff --git a/roles/elastalert b/roles/elastalert index 9891d043726ff79629dd05d84456ffe0c844b8ac..b0b2d823fe78f91b5130657a4c81066771ce35c4 160000 --- a/roles/elastalert +++ b/roles/elastalert @@ -1 +1 @@ -Subproject commit 9891d043726ff79629dd05d84456ffe0c844b8ac +Subproject commit b0b2d823fe78f91b5130657a4c81066771ce35c4 diff --git a/roles/elasticsearch b/roles/elasticsearch index 811fe4a04a1baa2d19a45de339f365ee13ad7488..2b9a251bb086948aea1e56df202c2367c0209822 160000 --- a/roles/elasticsearch +++ b/roles/elasticsearch @@ -1 +1 @@ -Subproject commit 811fe4a04a1baa2d19a45de339f365ee13ad7488 +Subproject commit 2b9a251bb086948aea1e56df202c2367c0209822 diff --git a/roles/fail2ban b/roles/fail2ban index 1a483f0f7a8d6956f01d9490dd94114ed6ecee26..c1cfffe15b2c6c84f0dfd271f764666c03785c5c 160000 --- a/roles/fail2ban +++ b/roles/fail2ban @@ -1 +1 @@ -Subproject commit 1a483f0f7a8d6956f01d9490dd94114ed6ecee26 +Subproject commit c1cfffe15b2c6c84f0dfd271f764666c03785c5c diff --git a/roles/fluentd b/roles/fluentd index b7697c402fdaaf8f25fe7bedc1edd9eeef177236..330300cc8569ffc15db64f594cd03d96b3ece2fc 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 613e1d300b0ed11dad6d6b8009eaab7489e1e85a..22a7fb5238f4d7baa38889b4d6fc0cd9baf81f26 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 cf56dba605d3dbb3a423ff19b9198df5f9ccc99d..a5f9f4e6b464bb4c9f38221fd51f45f62da4e753 160000 --- a/roles/gcloud +++ b/roles/gcloud @@ -1 +1 @@ -Subproject commit cf56dba605d3dbb3a423ff19b9198df5f9ccc99d +Subproject commit a5f9f4e6b464bb4c9f38221fd51f45f62da4e753 diff --git a/roles/gitlab b/roles/gitlab index 01d2dc77784e492c7c9c79a7e095d39a9e6b9659..72f8afb0e9b8fb983ecad718cabae012981a9eb8 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 1a44893ba473783d52dae599c7aabee1d5350340..ed8299967e04a9c2c5406bbb4d527df22d01085e 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 57a8da20fbd2b57748c582ca25a0575bb20528e7..8901cf42c5862db86772c1e4527c2fb5311dd2f5 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 e0f9c1eaf5c14b546701fa0b56c9d791e806522e..c3dd6a82720d19c7a96312a125aa0490bdc78ceb 160000 --- a/roles/golang +++ b/roles/golang @@ -1 +1 @@ -Subproject commit e0f9c1eaf5c14b546701fa0b56c9d791e806522e +Subproject commit c3dd6a82720d19c7a96312a125aa0490bdc78ceb diff --git a/roles/haproxy b/roles/haproxy index 45764672063f92dba2040bf4e74424352888b06d..82a938edf8ef84d0a2b4e1182d8efe85e1c02bb8 160000 --- a/roles/haproxy +++ b/roles/haproxy @@ -1 +1 @@ -Subproject commit 45764672063f92dba2040bf4e74424352888b06d +Subproject commit 82a938edf8ef84d0a2b4e1182d8efe85e1c02bb8 diff --git a/roles/heartbeat b/roles/heartbeat index 689480e702c63ae8c26925e6629d958e98ada75c..adaf4c6abbdd7d04be6e2b9eadb97d1165172142 160000 --- a/roles/heartbeat +++ b/roles/heartbeat @@ -1 +1 @@ -Subproject commit 689480e702c63ae8c26925e6629d958e98ada75c +Subproject commit adaf4c6abbdd7d04be6e2b9eadb97d1165172142 diff --git a/roles/jailkit b/roles/jailkit index 06010f4bd521eae66cf5e6fa26bfaa3415400b7a..f1c0bf1f1293be65ddcb5a3c2278b346d3dc9915 160000 --- a/roles/jailkit +++ b/roles/jailkit @@ -1 +1 @@ -Subproject commit 06010f4bd521eae66cf5e6fa26bfaa3415400b7a +Subproject commit f1c0bf1f1293be65ddcb5a3c2278b346d3dc9915 diff --git a/roles/java b/roles/java index 335e50b617242e843c592402d07d9bdd0a27c9da..24aa8fed759f419dd558f9b8182bfe9e67e6995d 160000 --- a/roles/java +++ b/roles/java @@ -1 +1 @@ -Subproject commit 335e50b617242e843c592402d07d9bdd0a27c9da +Subproject commit 24aa8fed759f419dd558f9b8182bfe9e67e6995d diff --git a/roles/kibana b/roles/kibana index f0a08e8398d94a0fcd56ea82bdf3ba85b266bb2d..bfa984d5c6f18bee474efb566ecedc7a8782d254 160000 --- a/roles/kibana +++ b/roles/kibana @@ -1 +1 @@ -Subproject commit f0a08e8398d94a0fcd56ea82bdf3ba85b266bb2d +Subproject commit bfa984d5c6f18bee474efb566ecedc7a8782d254 diff --git a/roles/letsencrypt b/roles/letsencrypt index 00251859025ebe7bab6b99777b2437c23a241dd5..47acb75ad542309acfa18df6ef5086dfcc46412b 160000 --- a/roles/letsencrypt +++ b/roles/letsencrypt @@ -1 +1 @@ -Subproject commit 00251859025ebe7bab6b99777b2437c23a241dd5 +Subproject commit 47acb75ad542309acfa18df6ef5086dfcc46412b diff --git a/roles/mailhog b/roles/mailhog index 8b6025d14f32f11d9ab747e27dbc6d85d0efbb35..2562fd520d3fb0c8b9aeb5fe782c15a87cfb35d6 160000 --- a/roles/mailhog +++ b/roles/mailhog @@ -1 +1 @@ -Subproject commit 8b6025d14f32f11d9ab747e27dbc6d85d0efbb35 +Subproject commit 2562fd520d3fb0c8b9aeb5fe782c15a87cfb35d6 diff --git a/roles/matomo b/roles/matomo index a6c6b1e26b1fadd38ffd5eff15343fe6f7298c7a..8247f38bf56ff05af729e6e884605f381f45e5b8 160000 --- a/roles/matomo +++ b/roles/matomo @@ -1 +1 @@ -Subproject commit a6c6b1e26b1fadd38ffd5eff15343fe6f7298c7a +Subproject commit 8247f38bf56ff05af729e6e884605f381f45e5b8 diff --git a/roles/matterbridge b/roles/matterbridge index ae244aa6640f3f5e690c4a7b195d2cdbc9935eef..2e633dcad27089819df058cfeae16e40c713d346 160000 --- a/roles/matterbridge +++ b/roles/matterbridge @@ -1 +1 @@ -Subproject commit ae244aa6640f3f5e690c4a7b195d2cdbc9935eef +Subproject commit 2e633dcad27089819df058cfeae16e40c713d346 diff --git a/roles/memcache b/roles/memcache index 05f92fb85d1e9a3dd124a6a4014868c4b1660ecd..1a0ace7019574d9812f59fbc8659ae98103ea3d4 160000 --- a/roles/memcache +++ b/roles/memcache @@ -1 +1 @@ -Subproject commit 05f92fb85d1e9a3dd124a6a4014868c4b1660ecd +Subproject commit 1a0ace7019574d9812f59fbc8659ae98103ea3d4 diff --git a/roles/mongodb b/roles/mongodb index bbbb58deef2b28864b640b16c8b8e9b2f0cebe24..1af80125eb293b2d7ff18a1e3d399b941138974f 160000 --- a/roles/mongodb +++ b/roles/mongodb @@ -1 +1 @@ -Subproject commit bbbb58deef2b28864b640b16c8b8e9b2f0cebe24 +Subproject commit 1af80125eb293b2d7ff18a1e3d399b941138974f diff --git a/roles/mysql b/roles/mysql index 056458a6045d2704dbc3f2623d692579bb7fadd6..b4f6b995361a22d6088ebb5b7356359b617de66d 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 375555e16a7f9f0e4cc9f353f74366430f6566be..74b34ef4b47491b9f5dab27d46681e7d89015394 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 ad73aed47209337042d90684f01531f34737abbc..884861104c594cd31939009af92dfbfb4a8a1ece 160000 --- a/roles/netdata +++ b/roles/netdata @@ -1 +1 @@ -Subproject commit ad73aed47209337042d90684f01531f34737abbc +Subproject commit 884861104c594cd31939009af92dfbfb4a8a1ece diff --git a/roles/nextcloud b/roles/nextcloud index eb07fcf177db8c8b23f9628f914d4fb57972a7e2..2a3e7049c5b5066ee0e38c12f596fe154f310be6 160000 --- a/roles/nextcloud +++ b/roles/nextcloud @@ -1 +1 @@ -Subproject commit eb07fcf177db8c8b23f9628f914d4fb57972a7e2 +Subproject commit 2a3e7049c5b5066ee0e38c12f596fe154f310be6 diff --git a/roles/nginx b/roles/nginx index 9deee73993bd0edbd43453e735ba644e45dbd114..2c707220e8a50abab2dfeec54130ef2ceeed2e98 160000 --- a/roles/nginx +++ b/roles/nginx @@ -1 +1 @@ -Subproject commit 9deee73993bd0edbd43453e735ba644e45dbd114 +Subproject commit 2c707220e8a50abab2dfeec54130ef2ceeed2e98 diff --git a/roles/nodejs b/roles/nodejs index fcf9bb71c1fb6bcbda3bfb78c27ab25db5161da8..8facd7c944bfdb005e256bafe96c736eb1164cfe 160000 --- a/roles/nodejs +++ b/roles/nodejs @@ -1 +1 @@ -Subproject commit fcf9bb71c1fb6bcbda3bfb78c27ab25db5161da8 +Subproject commit 8facd7c944bfdb005e256bafe96c736eb1164cfe diff --git a/roles/openphoto b/roles/openphoto index 1595aefee40989d65e9bfc5a7a911e15a369a993..5d6586fdb6cda08d49903b63b0e10ced695a1aa2 160000 --- a/roles/openphoto +++ b/roles/openphoto @@ -1 +1 @@ -Subproject commit 1595aefee40989d65e9bfc5a7a911e15a369a993 +Subproject commit 5d6586fdb6cda08d49903b63b0e10ced695a1aa2 diff --git a/roles/oracle b/roles/oracle index dc3438adc73608b20dca4669f29fbee2f2c08a19..952af903dc21275a07ac7362448d3c8da74ce827 160000 --- a/roles/oracle +++ b/roles/oracle @@ -1 +1 @@ -Subproject commit dc3438adc73608b20dca4669f29fbee2f2c08a19 +Subproject commit 952af903dc21275a07ac7362448d3c8da74ce827 diff --git a/roles/owncloud b/roles/owncloud index db2067be5c0d53cf0b5869cc4fd5b2b9d60fb78c..fac5abe77650435362b418c01626ec1e0b6a1c12 160000 --- a/roles/owncloud +++ b/roles/owncloud @@ -1 +1 @@ -Subproject commit db2067be5c0d53cf0b5869cc4fd5b2b9d60fb78c +Subproject commit fac5abe77650435362b418c01626ec1e0b6a1c12 diff --git a/roles/php b/roles/php index f0081b5b4b8fbc81922acc43fe1ede0048346262..87b3b368b1846de50aa0caaa2a316948235cbb54 160000 --- a/roles/php +++ b/roles/php @@ -1 +1 @@ -Subproject commit f0081b5b4b8fbc81922acc43fe1ede0048346262 +Subproject commit 87b3b368b1846de50aa0caaa2a316948235cbb54 diff --git a/roles/redis b/roles/redis index b5b6662a3b7a89c73ca091661eb0e0edcbfe4dac..d901833735b61ae034f301127d623922b8842783 160000 --- a/roles/redis +++ b/roles/redis @@ -1 +1 @@ -Subproject commit b5b6662a3b7a89c73ca091661eb0e0edcbfe4dac +Subproject commit d901833735b61ae034f301127d623922b8842783 diff --git a/roles/s3 b/roles/s3 index 00d0e3b56f9fe69f8c591500cdd7e883bde64ddf..b661dd06c517241d89dab61f04d1df32ebe1bc12 160000 --- a/roles/s3 +++ b/roles/s3 @@ -1 +1 @@ -Subproject commit 00d0e3b56f9fe69f8c591500cdd7e883bde64ddf +Subproject commit b661dd06c517241d89dab61f04d1df32ebe1bc12 diff --git a/roles/satis b/roles/satis index b354b93a0ac4101c9e0652845340b757aa6e124c..1a6ae5d586754a19414f8a526c78501992782d1c 160000 --- a/roles/satis +++ b/roles/satis @@ -1 +1 @@ -Subproject commit b354b93a0ac4101c9e0652845340b757aa6e124c +Subproject commit 1a6ae5d586754a19414f8a526c78501992782d1c diff --git a/roles/serverdensity b/roles/serverdensity index f02df753545d93f8abe0bb5b1b0f5bd865a1db0c..e7fd0d2241903c3a1f11cc5761e89d49f2e4fc21 160000 --- a/roles/serverdensity +++ b/roles/serverdensity @@ -1 +1 @@ -Subproject commit f02df753545d93f8abe0bb5b1b0f5bd865a1db0c +Subproject commit e7fd0d2241903c3a1f11cc5761e89d49f2e4fc21 diff --git a/roles/sftp b/roles/sftp index f574a02bbfe706d37887fdd138ab7c11c131c54d..1cbf9fffb18abbbe6d215b754c2db864bccb9b84 160000 --- a/roles/sftp +++ b/roles/sftp @@ -1 +1 @@ -Subproject commit f574a02bbfe706d37887fdd138ab7c11c131c54d +Subproject commit 1cbf9fffb18abbbe6d215b754c2db864bccb9b84 diff --git a/roles/spideroak b/roles/spideroak index cc4dba492a21b76568679cd3c91e35189936967d..51aa672d18b6da44ba381219c42486a3f9e7ee6e 160000 --- a/roles/spideroak +++ b/roles/spideroak @@ -1 +1 @@ -Subproject commit cc4dba492a21b76568679cd3c91e35189936967d +Subproject commit 51aa672d18b6da44ba381219c42486a3f9e7ee6e diff --git a/roles/svnserver b/roles/svnserver index d0d25ec895ce70ccd5047ffb6906321397eac45a..ce7dfb881f98a4ebfa51977a56d9e2b75d351081 160000 --- a/roles/svnserver +++ b/roles/svnserver @@ -1 +1 @@ -Subproject commit d0d25ec895ce70ccd5047ffb6906321397eac45a +Subproject commit ce7dfb881f98a4ebfa51977a56d9e2b75d351081 diff --git a/roles/tomcat b/roles/tomcat index 09147cae0e65160d16ebd0b9e1746429241dd4f7..6f76ca193105e4ffd2f17767e0da44e5657e4a34 160000 --- a/roles/tomcat +++ b/roles/tomcat @@ -1 +1 @@ -Subproject commit 09147cae0e65160d16ebd0b9e1746429241dd4f7 +Subproject commit 6f76ca193105e4ffd2f17767e0da44e5657e4a34 diff --git a/roles/uptime b/roles/uptime index 98265c7bd9350017866adc755d496003e4a081c3..ee9f8612b8d291af5a09f76afdce4b8c1c217a1b 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 b7c970c6915fe273c55dce695eb3b647781f5179..e6bd68fb81353e3872e6472be707b428c7d269fc 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 2dd079f9c846fb2cfd7bb1b15b95d2e7136db44a..6b7179d354962232456ff12206042bca78cb451c 160000 --- a/roles/varnish +++ b/roles/varnish @@ -1 +1 @@ -Subproject commit 2dd079f9c846fb2cfd7bb1b15b95d2e7136db44a +Subproject commit 6b7179d354962232456ff12206042bca78cb451c diff --git a/roles/virtualbox b/roles/virtualbox index 622e0e8eaf1084671f83d14997386e4ea6d689f2..4126ae614112d2e6c10275852b5f3d0332566469 160000 --- a/roles/virtualbox +++ b/roles/virtualbox @@ -1 +1 @@ -Subproject commit 622e0e8eaf1084671f83d14997386e4ea6d689f2 +Subproject commit 4126ae614112d2e6c10275852b5f3d0332566469 diff --git a/roles/vpn b/roles/vpn index b40b39c90e09179e18a9d0d99975a66d5de47dc2..dd43174974e164aeee7ff8f430497aa3b8402165 160000 --- a/roles/vpn +++ b/roles/vpn @@ -1 +1 @@ -Subproject commit b40b39c90e09179e18a9d0d99975a66d5de47dc2 +Subproject commit dd43174974e164aeee7ff8f430497aa3b8402165 diff --git a/roles/wkhtmltopdf b/roles/wkhtmltopdf index 0046e2773af8e56ace3ef3958cea533629a8278a..b9620023b4319ef97aba822fe7a8c37f85e61efd 160000 --- a/roles/wkhtmltopdf +++ b/roles/wkhtmltopdf @@ -1 +1 @@ -Subproject commit 0046e2773af8e56ace3ef3958cea533629a8278a +Subproject commit b9620023b4319ef97aba822fe7a8c37f85e61efd diff --git a/roles/youtrack b/roles/youtrack index a99286e34e8f14f0e0359b16979bc88a94cae701..1b465af619d2c780be56e1d6c2283c7e6f35bd64 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 48ff1fee691263de469e175c97fc0f0469cbc7c5..fde5965e11a7be6e69e7bbb2bb9fad6adcf91daa 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 190d839fc98996d4454e6fe0bdd74a3a1f8b5c9b..299baa64c89d16f7c5f30597ae00cc1c2b740404 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 b295f28357d695a3722236478df139a27236a220..dbdd174927106f926c4e594ea478b1237ff2ef1d 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 5cc5d82ac3051e2a7699c55be92a95d35b355585..48588b3b8c2dcb4b1382a787852a8b275155eb91 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 68b8886fdd5ee8a6a48dadb2d8d1acfcfd5f8011..fc1caec4efe09a3073831c0eb1b901b5b215e41e 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 0879ca9b3403589d14cab61e959ed32bb57c0101..b840054e198285e34abd9cdc7a3244b48e26eb27 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 c89e7dfb7f7c7b200382746fbead3f4beab73e46..26c766a20f80baad66ff244d60e6a5177479594c 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 ed8d8c1ad469cf3b8dd2482b985fc3e6baf36738..6aa0ce9c37215efc288450e3a35a7a7736025510 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 93d7973bf608b711c5c00caba1c66078b7a4cbe0..92d749e21057fd158f3aedd93f1e52660449c1a8 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 f4ad282f474150aa2777706567e5a1286c4baac8..a950238d4dec6ab27d8850ef34a061e939c935bc 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 9620ff1ae2ebf36268bcd623c9af7f32f31f60c9..ba9fa52620f69756c7a26ce332317674bac3d795 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 a829e4e8ae41b7db84b0b04a7f94dc40886c2789..0e215bdda410ff75c86302a4b14b668b71ea5a99 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 2de3c89127485f91d6274f18e8f3e5ed1d59e4e6..85c6c1527021a3424f38c621b63a7526b9dfaad9 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 2789ce2e33e42c8395e358c7073efbb1c0894665..a10e2fcdc1883309f7bd9b9c74f443bb76b0fb60 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 b90b7151cc995c2590438dba17cd4beb314dfaea..c2d9c73531eb52ac84dc9fb8a50a5734ab31be94 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 ddeff1e7ba5a57d337a4643401625eaa681aa70a..135d5ba04f48acc4405cf7ae88090c7cd3927b99 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 3f88c5b375486047f3b3b0151dd006075a2271d2..16f109a52cd45a828d90bbc38b3b67fad615323e 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 00103cc81a3ff22bc38d126486393df9c6894d41..a7f4bb6ec2812f321c313ef0f4820b0a698731d0 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 7489501933ae5fce171e261ea642312d27225f80..61ebd54e5bfe0fd3a0c8e594e3bc59344a52d41c 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 4f6f41a9d63c4015b8d0fcac738a1d402a888b9f..9f633c75e80ff4c46f00a1340d4eaf434b7bbcf4 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 ea7860e2f3c39652475ea5fa7201d9e3d6af8a12..7ca9c23478c5bd34255607eb59e7218fcd261b06 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 55f95178c24ca88ca613b08d81b9617cfba1bfc3..ffef02f506327abfc293b85763d710a381b51197 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 3d42c785f22ffb39624ea4731511b7c99d8bf53c..b79851ffbdb55f1dbe1442f8cd9bac8aa0d65810 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 9691e1f0642ef228fd3e37a683dfd80e61aa2383..94704f97ed8b61e2acb2b603d51b550d98d11478 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 a0641ec8ebe501c33e040e4702629588e39e03a7..78931bd800a4085fe97b936aef2c6cc963080fdd 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 00ad230a65b9b7a4a1c3d980415647cf6a1f3e48..4021ec903a55d2e3d291b66d97e3b6ef25bd0cc2 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 4764dbb58e64df0aa090094f02572de4398df140..9b83a941eaf8b8369565e489fea125c14c6f0ddc 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 ac4cf7ad0df911ff040df6c26dd18b3640cd5bb9..d0d64bbb53ae14cafdf750ce778dbe8fd9b37036 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 fb2c6662d92a95c281e7a3403a924eebf70550b8..8b38141d590dcb2b2737fe681c830caa12811ae2 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 bd716ee617d64411eb784d5aabd8ee14c89610ff..be0243745bd8d4e1a79131f5bb4bdc5983abcdfc 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 04f81f137c201517594f23b2e1cc3d04197d2904..4879833095f9f34fc5b07a83a4cbcf0cedae2405 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 5f7e889fe83c88ff60bcdda4c7205035b63e48ee..b8264ebc60b3804fff041a79576f61054f5145ad 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 fbcfdc144fbdc62ca4ff7da5f3b8fa84e687ab33..ece39f415ede2c1b48eb988b1fc85e7372103b4a 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 9dc10696d44ff9c82200b4fdbc3fcdf693aab29a..ba32647586f899598de2d7ea2d680719bc164a2f 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 b4fab22f744e2f06a0a666417ad5fc920de18a32..aaaeb242f8e35d1305d717756a2390c2d01862e4 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 b87c8816e408c2e22ce82ab56385e32a33f1b9bf..6c7d7007e1a3d3e5c5590ce2be7da2b8d6e0ee77 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 a15ccb116b9438cc4ae5215f948af98e61a611ca..319af2f0e2de078f21c58ae5690b1c1419c078f4 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 8fa2cdba0cdd51bb58bb1ecacdd5c62516bee001..37b42c264d5d6eff59bbef9c0806e7f2224d4049 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 5749228082e0d05b8829351be253bcece6ffb001..bc78d82750d43d85922d061671985d2e33fa87ec 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 015147c3e6f68aa9ef5f8af645bf7b535145da66..d2e958c4597fada12aae5521f388d2dbad8017e3 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 2af448d530411970727a1f9088964a46552ac091..fce280510955c0d5f536a0fee205db1901fd5374 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 4aeb7b3ee77320997e4e9c2d459b6b92c4bd4158..3390b6f06a251f98df20c8ee46a594a89e90ef55 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 a637d691e0e1cd5af8832445167bc965457a2b1d..612e2191aaa3300bc6627a4dbd71ac94d37d8d4d 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 df7df446a21076d0d539eb672f68034e1da5491b..630659465639753d00ca978c646f710409f010b2 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 2f6267afc984ec0d20c37c41409a99eaf9401a89..0f305eb6662b38b8a25eb13d7d28316176efe14f 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 583c1576c5fb960a96e1b50d54446d3c7a0b1167..38ac06a91a4f38e753b024025d59df0e4d878a99 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 2a65717d194da5504a742299bf248b8f7d47704a..898698b61adc3d1302c9ad965aace30304a090b7 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 703a2439f444e1b03a82552594aef326108545a7..2ffc946f01ba7b7859d52a277e780825e2146961 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 cc6fa1c96f44e7d05171328df98c4c693fd4c635..b6f2cbb486eb1cc9c0258d4511b8dc358100a68d 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 faa49274c235a5e2ea0c7b71f57701da27c5057c..d132648dde57ce40fd6fb5fc1b51035ffeefb584 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 6569bd17c57175fca1d4e4fc63bae247bf074f20..f5589225eb24a559d6efbd74e9d5bc24ef1c3f83 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 1bde6d4a242aba7e2354515fa5f62cf405cbf9b2..b600b0548581efc1a7c8860e3f960d70eb53675b 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 9e496ea92125c383abd6c5acd9b889d69a954257..7832c225c6464df6f3c07e42b8ef35639ac4fd23 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 bb4d3058f9b8154937866fb9d4640c84786ad8b0..488a548b65d4825307a251e0b4ba19929762a336 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 13de6d675cb1ab28c7a84987b80f4da9cb753d4e..222622e661ab208b1988c6ff1e6e5def2559004e 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 c1fedafb80222e2a96689c9d6aea873b482fa7e5..220818d98a534a1d6242814acdfaadfaf5ceef8f 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 2d81b45bc4fa17cdf92752e71d3dfa03100afe55..44b4552cf7b60cf488d40fb9a1f31522ba898359 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 627cb3462bc21499568dc2c6dc9940a0ce4c17a9..fec27c1e9cd11e12a32a25fe023cedd9f93067ef 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 e93e44053f6a809becd3e7e348db0ed170066785..41432d359dc56678d1cfd632f6ac3c500e648588 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 41f2a545d334904c06595d046c5242a9590fab84..80696fe5450ea825fa8245cb412d6c3acffc6e3f 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 8691a77e2755b399b9c4b231abd4b71bb6385f81..268c3632308077984aa654ce7200e0eadaeedfdd 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 1e6f7fdba1ddbb2b711a7bb80caea40fe2dad2e1..73c6ce28acb95790fcd5439c9de12a491c530133 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 e1e09590cb0bec39fa1fda1eb53ea10a62a93105..cb8ffbfeb5b53534754a70866ae9363b7755010e 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 699db296516809d5855bee133fb27c2d5461de5d..b3f44775b691cfefa410b4d3ab7e2cd560154864 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 699db296516809d5855bee133fb27c2d5461de5d +Subproject commit b3f44775b691cfefa410b4d3ab7e2cd560154864