File tree Expand file tree Collapse file tree 11 files changed +38
-18
lines changed
Expand file tree Collapse file tree 11 files changed +38
-18
lines changed Original file line number Diff line number Diff line change 44 gather_facts : false
55 tasks :
66 - name : Testing role
7- ansible.builtin.include_role :
7+ ansible.builtin.import_role :
88 name : pgalonza.linux.audit
99 tasks_from : main.yml
1010 vars :
Original file line number Diff line number Diff line change 44 gather_facts : false
55 tasks :
66 - name : Testing role
7- ansible.builtin.include_role :
7+ ansible.builtin.import_role :
88 name : pgalonza.linux.bash_profile
99 tasks_from : main.yml
10+ vars :
11+ bash_prompt_users :
12+ - test_user
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Prepare
3+ hosts : all
4+ gather_facts : false
5+ tasks :
6+ - name : Collect only os_family facts
7+ ansible.builtin.setup :
8+ gather_subset :
9+ - ' !all'
10+ - os_family
11+ - name : Create test user
12+ ansible.builtin.user :
13+ name : test_user
14+ create_home : true
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ def test_massage_file(host):
77def test_profile_file (host ):
88 distro_name = host .system_info .distribution
99 print (distro_name )
10- user_home = host .user ().home
10+ user_home = host .user ('test_user' ).home
1111
1212 if distro_name in ['debian' , 'ubuntu' ]:
1313 profile_name = '.profile'
Original file line number Diff line number Diff line change 99 - ' !all'
1010 - os_family
1111 - name : Testing role
12- ansible.builtin.include_role :
12+ ansible.builtin.import_role :
1313 name : pgalonza.linux.nginx
1414 tasks_from : main.yml
Original file line number Diff line number Diff line change 44 gather_facts : false
55 tasks :
66 - name : Testing role
7- ansible.builtin.include_role :
7+ ansible.builtin.import_role :
88 name : pgalonza.linux.prepare
99 tasks_from : main.yml
1010 vars :
11- ansible_user : test_user
11+ owner_user : test_user
1212 ssh_key_dir : /tmp
1313 deploy_user : test_ansible
Original file line number Diff line number Diff line change 3232 path : " /tmp/{{ item }}"
3333 loop :
3434 - id_rsa
35- - ansible_id_rsa
35+ - test_ansible_id_rsa
3636 delegate_to : localhost
Original file line number Diff line number Diff line change 44 gather_facts : false
55 tasks :
66 - name : Testing role
7- ansible.builtin.include_role :
7+ ansible.builtin.import_role :
88 name : pgalonza.linux.security
99 tasks_from : main.yml
1010 vars :
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ Role Variables
2121[ SSHD documentation] ( https://man.openbsd.org/sshd_config )
2222* sshd_port
2323
24+ * owner_user - personal linux user
25+
2426Dependencies
2527------------
2628
Original file line number Diff line number Diff line change 33
44sshd_port : 22
55ssh_key_dir : ~/.ssh
6- deploy_user : ansible
6+ deploy_user : ansible
7+ owner_user : " {{ ansible_user }}"
You can’t perform that action at this time.
0 commit comments