Fix ansible-lint errors
This commit is contained in:
		
							parent
							
								
									503bd8b396
								
							
						
					
					
						commit
						b098704e23
					
				
					 10 changed files with 21 additions and 26 deletions
				
			
		|  | @ -3,12 +3,12 @@ | ||||||
|   hosts: all |   hosts: all | ||||||
|   become: true |   become: true | ||||||
|   tasks: |   tasks: | ||||||
|   - name: Get new password |     - name: Get new password | ||||||
|     ansible.builtin.pause: |       ansible.builtin.pause: | ||||||
|       prompt: Enter the new password |         prompt: Enter the new password | ||||||
|       echo: false |         echo: false | ||||||
|     register: new_user_password |       register: new_user_password | ||||||
|   - name: Change password |     - name: Change password | ||||||
|     ansible.builtin.user: |       ansible.builtin.user: | ||||||
|       name: "{{ interactive_user }}" |         name: "{{ interactive_user }}" | ||||||
|       password: "{{ new_user_password.user_input | password_hash('sha512') }}" |         password: "{{ new_user_password.user_input | password_hash('sha512') }}" | ||||||
|  |  | ||||||
|  | @ -7,13 +7,6 @@ runner: | ||||||
|   file: /data/.runner |   file: /data/.runner | ||||||
|   # Execute how many tasks concurrently at the same time. |   # Execute how many tasks concurrently at the same time. | ||||||
|   capacity: 1 |   capacity: 1 | ||||||
|   # Extra environment variables to run jobs. |  | ||||||
|   #envs: |  | ||||||
|   #  A_TEST_ENV_NAME_1: a_test_env_value_1 |  | ||||||
|   #  A_TEST_ENV_NAME_2: a_test_env_value_2 |  | ||||||
|   # Extra environment variables to run jobs from a file. |  | ||||||
|   # It will be ignored if it's empty or the file doesn't exist. |  | ||||||
|   #env_file: .env |  | ||||||
|   # The timeout for a job to be finished. |   # The timeout for a job to be finished. | ||||||
|   # Please note that the Forgejo instance also has a timeout (3h by default) for the job. |   # Please note that the Forgejo instance also has a timeout (3h by default) for the job. | ||||||
|   # So the job could be stopped by the Forgejo instance if it's timeout is shorter than this. |   # So the job could be stopped by the Forgejo instance if it's timeout is shorter than this. | ||||||
|  |  | ||||||
|  | @ -3,7 +3,8 @@ | ||||||
|   hosts: serguzim_net |   hosts: serguzim_net | ||||||
|   become: true |   become: true | ||||||
|   tasks: |   tasks: | ||||||
|   - name: Unlock backups |     - name: Unlock backups | ||||||
|     ansible.builtin.shell: |       ansible.builtin.shell: | ||||||
|       cmd: autorestic unlock --force && autorestic exec -va unlock |         cmd: autorestic unlock --force && autorestic exec -va unlock | ||||||
|       chdir: "{{ (services_path, 'backup') | path_join }}" |         chdir: "{{ (services_path, 'backup') | path_join }}" | ||||||
|  |       changed_when: true | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| #!/usr/bin/env bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
|  | template_dir="./templates/new_role" | ||||||
| roles_dir="./playbooks/roles" | roles_dir="./playbooks/roles" | ||||||
| 
 | 
 | ||||||
| read -p "Enter the new role name: " new_role | read -p "Enter the new role name: " new_role | ||||||
|  | @ -14,6 +15,6 @@ if [ -d "$roles_dir/$new_role" ]; then | ||||||
|   exit 1 |   exit 1 | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| cp -r "$roles_dir/_TEMPLATE" "$roles_dir/$new_role" | cp -r "$template_dir" "$roles_dir/$new_role" | ||||||
| 
 | 
 | ||||||
| sed -i "s/NAME_/${new_role}_/g" "$roles_dir/$new_role"/**/*.yml | sed -i "s/mynewrolename_/${new_role}_/g" "$roles_dir/$new_role"/**/*.yml | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue